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

Fix required cusparse symbol not loaded in CUDA 11.1.1 #6806

Merged
merged 1 commit into from Jun 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion cupy_backends/cuda/cupy_cusparse.h
Expand Up @@ -599,7 +599,7 @@ cusparseStatus_t cusparseSpGEMM_copy(...) {
#endif // #if CUSPARSE_VERSION < 11100

#if CUSPARSE_VERSION < 11300
// Types and macros added in cuSparse 11.3 (CUDA 11.2)
// Types and macros added in cuSparse 11.3 (CUDA 11.1.1)

typedef enum {} cusparseSparseToDenseAlg_t;
typedef enum {} cusparseDenseToSparseAlg_t;
Expand Down
7 changes: 6 additions & 1 deletion cupy_backends/cuda/libs/cusparse.pyx
Expand Up @@ -1424,8 +1424,13 @@ cdef Status cusparseDenseToSparse_convert(

cdef load_functions(libname, prefix):
lib = SoftLink(libname, prefix)

# cuSPARSE 11.3.1+ (CUDA 11.2.0+)
global _cusparseCreateCsc
_cusparseCreateCsc = lib.get_func('CreateCsc')

# cuSPARSE 11.3+ (CUDA 11.1.1+)
# Note: CUDA 11.1.0 contains cuSPARSE 11.2.0.275
global _cusparseSparseToDense_bufferSize
_cusparseSparseToDense_bufferSize = lib.get_func('SparseToDense_bufferSize') # NOQA
global _cusparseSparseToDense
Expand All @@ -1437,7 +1442,7 @@ cdef load_functions(libname, prefix):
global _cusparseDenseToSparse_convert
_cusparseDenseToSparse_convert = lib.get_func('DenseToSparse_convert')

IF 11020 <= CUPY_CUDA_VERSION < 12000:
IF 11010 <= CUPY_CUDA_VERSION < 12000:
if _sys.platform == 'linux':
_libname = 'libcusparse.so.11'
else:
Expand Down