diff options
author | Robert Maynard <rmaynard@nvidia.com> | 2023-04-05 15:37:06 (GMT) |
---|---|---|
committer | Robert Maynard <rmaynard@nvidia.com> | 2023-04-05 15:37:06 (GMT) |
commit | 516d807423c00e651161da011daae0e4957f480d (patch) | |
tree | af35082288cc8437a0e196348ece13298d43f525 | |
parent | 624461526f4707a2406ebbd40245a605b6bd41fa (diff) | |
download | CMake-516d807423c00e651161da011daae0e4957f480d.zip CMake-516d807423c00e651161da011daae0e4957f480d.tar.gz CMake-516d807423c00e651161da011daae0e4957f480d.tar.bz2 |
FindCUDAToolkit: Add dependency between cusparse and nvJitLink
Starting in CUDA 12.0 cusparse uses nvJitLink. As part of verifying this PR I also corrected the nvJitLink dependencies
-rw-r--r-- | Modules/FindCUDAToolkit.cmake | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake index c3b6bc3..c8e6772 100644 --- a/Modules/FindCUDAToolkit.cmake +++ b/Modules/FindCUDAToolkit.cmake @@ -1022,12 +1022,20 @@ if(CUDAToolkit_FOUND) endif() endif() + if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 12.0.0) + _CUDAToolkit_find_and_add_import_lib(nvJitLink) + _CUDAToolkit_find_and_add_import_lib(nvJitLink_static DEPS cudart_static_deps) + endif() + _CUDAToolkit_find_and_add_import_lib(culibos) # it's a static library - foreach (cuda_lib cublasLt cufft curand cusparse nppc nvjpeg) + foreach (cuda_lib cublasLt cufft curand nppc nvjpeg) _CUDAToolkit_find_and_add_import_lib(${cuda_lib}) _CUDAToolkit_find_and_add_import_lib(${cuda_lib}_static DEPS culibos) endforeach() + _CUDAToolkit_find_and_add_import_lib(cusparse DEPS nvJitLink) + _CUDAToolkit_find_and_add_import_lib(cusparse_static DEPS nvJitLink_static culibos) + 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 @@ -1114,11 +1122,6 @@ if(CUDAToolkit_FOUND) endif() endif() - if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 12.0.0) - _CUDAToolkit_find_and_add_import_lib(nvJitLink DEPS cuda_driver) - _CUDAToolkit_find_and_add_import_lib(nvJitLink_static DEPS cuda_driver) - endif() - _CUDAToolkit_find_and_add_import_lib(nvrtc_builtins DEPS cuda_driver) _CUDAToolkit_find_and_add_import_lib(nvrtc DEPS nvrtc_builtins nvJitLink) if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 11.5.0) |