diff options
author | Robert Maynard <rmaynard@nvidia.com> | 2021-11-19 18:54:40 (GMT) |
---|---|---|
committer | Robert Maynard <rmaynard@nvidia.com> | 2021-11-19 18:54:40 (GMT) |
commit | fedca357d21992421448003d83a1f583f49344b5 (patch) | |
tree | c9b77d666024b64fc391e9c791181a0010c2e526 /Modules/FindCUDAToolkit.cmake | |
parent | 4e84a4763d702590fb06d62540e35a614dcd5133 (diff) | |
download | CMake-fedca357d21992421448003d83a1f583f49344b5.zip CMake-fedca357d21992421448003d83a1f583f49344b5.tar.gz CMake-fedca357d21992421448003d83a1f583f49344b5.tar.bz2 |
FindCUDAToolkit: Correct cusparse dependencies for 10.1, 11.2.2
Diffstat (limited to 'Modules/FindCUDAToolkit.cmake')
-rw-r--r-- | Modules/FindCUDAToolkit.cmake | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake index d22a676..de5f376 100644 --- a/Modules/FindCUDAToolkit.cmake +++ b/Modules/FindCUDAToolkit.cmake @@ -933,6 +933,23 @@ if(CUDAToolkit_FOUND) _CUDAToolkit_find_and_add_import_lib(cusolver DEPS cublas cusparse) _CUDAToolkit_find_and_add_import_lib(cusolver_static DEPS cublas_static cusparse_static culibos) + + if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 10.1.2) + # cusolver depends on liblapack_static.a starting with CUDA 10.1 update 2, + # https://docs.nvidia.com/cuda/archive/11.5.0/cusolver/index.html#static-link-lapack + _CUDAToolkit_find_and_add_import_lib(cusolver_lapack_static ALT lapack_static) # implementation detail static lib + _CUDAToolkit_find_and_add_import_lib(cusolver_static DEPS cusolver_lapack_static) + endif() + + if(CUDAToolkit_VERSION VERSION_GREATER 11.2.1) + # cusolver depends on libcusolver_metis and cublasLt + # https://docs.nvidia.com/cuda/archive/11.2.2/cusolver/index.html#link-dependency + _CUDAToolkit_find_and_add_import_lib(cusolver DEPS cublasLt) + + _CUDAToolkit_find_and_add_import_lib(cusolver_metis_static ALT metis_static) # implementation detail static lib + _CUDAToolkit_find_and_add_import_lib(cusolver_static DEPS cusolver_metis_static cublasLt_static) + endif() + # nvGRAPH depends on cuRAND, and cuSOLVER. _CUDAToolkit_find_and_add_import_lib(nvgraph DEPS curand cusolver) _CUDAToolkit_find_and_add_import_lib(nvgraph_static DEPS curand_static cusolver_static) |