summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2022-01-12 20:06:49 (GMT)
committerRobert Maynard <rmaynard@nvidia.com>2022-01-12 20:06:49 (GMT)
commit9e6c26b75c836da355500768f27966711f94c3ce (patch)
treed831fbc541324a527c517dcb23d487922a8bf69b /Modules
parent0c038689be424ca71a6699a993adde3bcaa15b6c (diff)
downloadCMake-9e6c26b75c836da355500768f27966711f94c3ce.zip
CMake-9e6c26b75c836da355500768f27966711f94c3ce.tar.gz
CMake-9e6c26b75c836da355500768f27966711f94c3ce.tar.bz2
FindCUDAToolkit: depend cublas on cublasLt for CUDA 11.0+
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindCUDAToolkit.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake
index de5f376..b2445a4 100644
--- a/Modules/FindCUDAToolkit.cmake
+++ b/Modules/FindCUDAToolkit.cmake
@@ -925,6 +925,13 @@ if(CUDAToolkit_FOUND)
_CUDAToolkit_find_and_add_import_lib(${cuda_lib}_static DEPS culibos)
endforeach()
+ if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 11.0.0)
+ # cublas depends on cublasLt
+ # https://docs.nvidia.com/cuda/archive/11.0/cublas/index.html#static-library
+ _CUDAToolkit_find_and_add_import_lib(cublas DEPS cublasLt)
+ _CUDAToolkit_find_and_add_import_lib(cublas_static DEPS cublasLt_static)
+ endif()
+
# cuFFTW depends on cuFFT
_CUDAToolkit_find_and_add_import_lib(cufftw DEPS cufft)
_CUDAToolkit_find_and_add_import_lib(cufftw DEPS cufft_static)