mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 03:39:43 -06:00
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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user