Reputation: 2489
I'm building a package tested for CUDA 9,10 from source, trying to compile it for CUDA11.
I've already changed gencode=arch=compute_70
(was set on 30), and added
target_link_libraries(tsnecuda ${CUDA_cusparse_LIBRARY})
Unfortunately, I still get
tsne-cuda/src/util/math_utils.cu(153): error: identifier "cusparseScsr2csc" is undefined
tsne-cuda/src/util/math_utils.cu(165): error: identifier "cusparseXcsrgeamNnz" is undefined
tsne-cuda/src/util/math_utils.cu(195): error: identifier "cusparseScsrgeam" is undefined
3 errors detected in the compilation of "tsne-cuda/src/util/math_utils.cu".
CMake Error at tsnecuda_generated_math_utils.cu.o.cmake:276 (message):
Error generating file
tsne-cuda/build/CMakeFiles/tsnecuda.dir/src/util/./tsnecuda_generated_math_utils.cu.o
Is there a chance the build process somehow ignores my target_link_libraries
? Should I add something else?
Upvotes: 0
Views: 431
Reputation: 152143
Undefined identifier is a compilation issue, not a linking issue.
At least part of the problem here is that CUDA deprecated and removed some functionality from cusparse, including cusparse<t>csr2csc()
. The code would need to be rewritten to compile correctly under the latest versions of CUDA 11.x.
For example, for csr2csc, the call to cusparseScsr2csc
might be refactored to use this function instead.
One example of deprecation/removal notice for cusparse<t>csr2csc
is given here.
Upvotes: 1