Skip to content

Commit

Permalink
Merge pull request #146 from BillyONeal/develop
Browse files Browse the repository at this point in the history
Add support for CUDA versions through 12.1.
  • Loading branch information
simogasp authored Mar 24, 2023
2 parents c0dc3d8 + 9e5a50d commit fd21d35
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions cmake/ChooseCudaCC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function(chooseCudaCC SUPPORTED_CC SUPPORTED_GENCODE_FLAGS)

set(CC_LIST_BY_SYSTEM_PROCESSOR "")
if(CMAKE_SYSTEM_PROCESSOR IN_LIST OTHER_SUPPORTED_PROCESSORS)
list(APPEND CC_LIST_BY_SYSTEM_PROCESSOR "20;21;30;35;50;52;60;61;70;75;80;86")
list(APPEND CC_LIST_BY_SYSTEM_PROCESSOR "20;21;30;35;50;52;60;61;70;75;80;86;89;90")
endif()
if(CMAKE_SYSTEM_PROCESSOR IN_LIST TEGRA_SUPPORTED_PROCESSORS)
list(APPEND CC_LIST_BY_SYSTEM_PROCESSOR "32;53;62;72")
Expand All @@ -78,10 +78,17 @@ function(chooseCudaCC SUPPORTED_CC SUPPORTED_GENCODE_FLAGS)
# Default setting of the CUDA CC versions to compile.
# Shortening the lists saves a lot of compile time.
#
set(CUDA_MIN_CC 20)
set(CUDA_MAX_CC 86)
if(CUDA_VERSION VERSION_GREATER_EQUAL 11.1)

# The current version last time this list was updated was CUDA 12.1.
if(CUDA_VERSION VERSION_GREATER_EQUAL 12)
set(CUDA_MIN_CC 50)
set(CUDA_MAX_CC 90)
elseif(CUDA_VERSION VERSION_GREATER_EQUAL 11.8)
set(CUDA_MIN_CC 35)
set(CUDA_MAX_CC 90)
elseif(CUDA_VERSION VERSION_GREATER_EQUAL 11.1)
set(CUDA_MIN_CC 35)
set(CUDA_MAX_CC 86)
elseif(CUDA_VERSION_MAJOR GREATER_EQUAL 11)
set(CUDA_MIN_CC 35)
set(CUDA_MAX_CC 80)
Expand All @@ -92,8 +99,10 @@ function(chooseCudaCC SUPPORTED_CC SUPPORTED_GENCODE_FLAGS)
set(CUDA_MIN_CC 30)
set(CUDA_MAX_CC 72)
elseif(CUDA_VERSION_MAJOR GREATER_EQUAL 8)
set(CUDA_MIN_CC 20)
set(CUDA_MAX_CC 62)
elseif(CUDA_VERSION_MAJOR GREATER_EQUAL 7)
set(CUDA_MIN_CC 20)
set(CUDA_MAX_CC 53)
else()
message(FATAL_ERROR "We do not support a CUDA SDK below version 7.0")
Expand Down

0 comments on commit fd21d35

Please sign in to comment.