Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NameError: name '_create_mkl_sparse' is not defined #1

Open
abhijit57 opened this issue Jul 24, 2023 · 0 comments
Open

NameError: name '_create_mkl_sparse' is not defined #1

abhijit57 opened this issue Jul 24, 2023 · 0 comments

Comments

@abhijit57
Copy link

abhijit57 commented Jul 24, 2023

@grandmaster-ethereal
I have followed all the steps starting from cloning the repository to editable install and additional installation of sparse_dot_mkl as well as intel mkl as mentioned in the Readme.md file in the GitHub repo.

I was trying this code:

from xlr8.similarity import cosine_similarity
import numpy as np

A = np.random.rand(1000,1000)
B = np.random.rand(1000,1000)

cosine_similarity(A, B, blas="mkl")

And encountered this error:
Traceback (most recent call last):
File "", line 1, in
File "e:\data science\iub projects\gra_foundations and grantees\scripts and notebooks\python scripts\xlr8\similarity.py", line 84, in cosine_similarity
kernel_matrix = sparse_dot_product(
File "e:\data science\iub projects\gra_foundations and grantees\scripts and notebooks\python scripts\xlr8\linalg.py", line 198, in sparse_dot_product
a_b = dot_product(a, b)
File "e:\data science\iub projects\gra_foundations and grantees\scripts and notebooks\python scripts\xlr8\linalg.py", line 46, in mkl_dot
mkl_a, a_dbl = _create_mkl_sparse(matrix_a)
NameError: name '_create_mkl_sparse' is not defined

I also manually executed these statements:
from sparse_dot_mkl._mkl_interface._common import (MKL,
_check_return_value,
_create_mkl_sparse,
_destroy_mkl_handle,
_empty_output_check,
_is_allowed_sparse_format,
_order_mkl_handle, _type_check,
debug_print, debug_timer,
sparse_matrix_t)
from sparse_dot_mkl._sparse_sparse import _matmul_mkl

and successfully imported these statements too. But I am still encountering that NameError: '_create_mkl_sparse' is not defined.

Could you please help me with this or look into this issue?
Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant