Skip to content

Commit

Permalink
Changed -> CUDAToolkit_VERSION_MAJOR
Browse files Browse the repository at this point in the history
  • Loading branch information
lohika-denis-kotov committed Oct 6, 2023
1 parent cd1c1e0 commit 4d288c1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions modules/nvidia_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ find_library(CUDNN_PATH
HINTS "$ENV{CUDNN_PATH}" "${CUDA_TOOLKIT_ROOT_DIR}" "${CUDA_PATH}" "$ENV{CUDA_PATH}"
PATH_SUFFIXES nvidia/current lib64 lib/x64 lib)

if((${CUDAToolkit_VERSION_MAJOR} LESS_EQUAL 10))
if(CUDAToolkit_VERSION_MAJOR LESS_EQUAL 10)
set(CUTENSOR_LIB_DIRS lib/10.2 libcutensor/10.2)
elseif((${CUDAToolkit_VERSION_MAJOR} GREATER_EQUAL 11) AND (${CUDAToolkit_VERSION_MINOR} LESS_EQUAL 0))
elseif(CUDAToolkit_VERSION_MAJOR GREATER_EQUAL 11 AND CUDAToolkit_VERSION_MINOR LESS_EQUAL 0)
set(CUTENSOR_LIB_DIRS lib/11.0 libcutensor/11.0)
elseif((${CUDAToolkit_VERSION_MAJOR} GREATER_EQUAL 11) AND (${CUDAToolkit_VERSION_MINOR} GREATER_EQUAL 1))
elseif(CUDAToolkit_VERSION_MAJOR GREATER_EQUAL 11 AND CUDAToolkit_VERSION_MINOR GREATER_EQUAL 1)
set(CUTENSOR_LIB_DIRS lib/11 libcutensor/11)
else()
set(CUTENSOR_LIB_DIRS lib/${CUDAToolkit_VERSION_MAJOR} libcutensor/${CUDAToolkit_VERSION_MAJOR})
Expand Down Expand Up @@ -130,11 +130,11 @@ set_target_properties(CUDA::cutensor PROPERTIES IMPORTED_LOCATION "${CUTENSOR_PA
set_target_properties(CUDA::cutensor PROPERTIES IMPORTED_IMPLIB "${CUTENSOR_PATH}")

if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
if(${CUDAToolkit_VERSION_MAJOR} LESS_EQUAL 10)
if(CUDAToolkit_VERSION_MAJOR LESS_EQUAL 10)
set(CMAKE_CUDA_ARCHITECTURES "30;35;50;60;72")
elseif(${CUDAToolkit_VERSION_MAJOR} EQUAL 11 AND ${CUDAToolkit_VERSION_MINOR} LESS_EQUAL 7)
elseif(CUDAToolkit_VERSION_MAJOR EQUAL 11 AND CUDAToolkit_VERSION_MINOR LESS_EQUAL 7)
set(CMAKE_CUDA_ARCHITECTURES "35;50;60-virtual;61;70-virtual;75;86")
elseif(${CUDAToolkit_VERSION_MAJOR} EQUAL 11 AND ${CUDAToolkit_VERSION_MINOR} EQUAL 8)
elseif(CUDAToolkit_VERSION_MAJOR EQUAL 11 AND CUDAToolkit_VERSION_MINOR EQUAL 8)
set(CMAKE_CUDA_ARCHITECTURES "35;50;60-virtual;61;70-virtual;75;86;89-virtual;90-virtual")
else()
set(CMAKE_CUDA_ARCHITECTURES "50;60-virtual;61;70-virtual;75;86;89-virtual;90-virtual")
Expand Down

0 comments on commit 4d288c1

Please sign in to comment.