summaryrefslogtreecommitdiffstats
path: root/Modules/CUDA
diff options
context:
space:
mode:
authorxiny <xiny@nvidia.com>2022-12-19 06:01:06 (GMT)
committerBrad King <brad.king@kitware.com>2023-01-11 21:47:30 (GMT)
commit4d90f65b246fe7f9f9fc1d34fb985cd67b992aa9 (patch)
tree40c87f982c6052c13524abe1dda0815631e63d5e /Modules/CUDA
parent518bccfaeadc54e006f4e2f7ae4d0d0b37c15e8a (diff)
downloadCMake-4d90f65b246fe7f9f9fc1d34fb985cd67b992aa9.zip
CMake-4d90f65b246fe7f9f9fc1d34fb985cd67b992aa9.tar.gz
CMake-4d90f65b246fe7f9f9fc1d34fb985cd67b992aa9.tar.bz2
CUDA: Update set of architectures supported by CUDA 12
Remove architectures 35 and 37 for CUDA 12. Architecture 21 is not in CMAKE_CUDA_ARCHITECTURES_ALL_MAJOR so there is no need to remove it.
Diffstat (limited to 'Modules/CUDA')
-rw-r--r--Modules/CUDA/architectures.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/Modules/CUDA/architectures.cmake b/Modules/CUDA/architectures.cmake
index d646920..7d6a6e0 100644
--- a/Modules/CUDA/architectures.cmake
+++ b/Modules/CUDA/architectures.cmake
@@ -17,7 +17,7 @@ if(CMAKE_CUDA_COMPILER_TOOLKIT_VERSION VERSION_GREATER_EQUAL 9.0)
endif()
list(REMOVE_ITEM CMAKE_CUDA_ARCHITECTURES_ALL 20 21)
- list(REMOVE_ITEM CMAKE_CUDA_ARCHITECTURES_ALL_MAJOR 20 21)
+ list(REMOVE_ITEM CMAKE_CUDA_ARCHITECTURES_ALL_MAJOR 20)
endif()
if(CMAKE_CUDA_COMPILER_TOOLKIT_VERSION VERSION_GREATER_EQUAL 10.0
@@ -51,6 +51,12 @@ if(CMAKE_CUDA_COMPILER_TOOLKIT_VERSION VERSION_GREATER_EQUAL 11.8
list(APPEND CMAKE_CUDA_ARCHITECTURES_ALL_MAJOR 90)
endif()
+if(CMAKE_CUDA_COMPILER_TOOLKIT_VERSION VERSION_GREATER_EQUAL 12.0
+ AND (NOT CMAKE_CUDA_COMPILER_ID STREQUAL "Clang"))
+ list(REMOVE_ITEM CMAKE_CUDA_ARCHITECTURES_ALL 35 37)
+ list(REMOVE_ITEM CMAKE_CUDA_ARCHITECTURES_ALL_MAJOR 35)
+endif()
+
# only generate jit code for the newest arch for all/all-major
list(POP_BACK CMAKE_CUDA_ARCHITECTURES_ALL _latest_arch)
list(TRANSFORM CMAKE_CUDA_ARCHITECTURES_ALL APPEND "-real")