summaryrefslogtreecommitdiffstats
path: root/Modules/FindCUDA
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-09-30 12:05:41 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-09-30 12:05:50 (GMT)
commit21b6b1395630b236b189631c168eace8b1aa23d6 (patch)
treedd23af2b61af335e334305cb4faf10aec738f0f9 /Modules/FindCUDA
parente3ae4061cdc264db79e391f82281c939a229b602 (diff)
parent5f6b0ba8b15f557b4bcc986860df888a861e5853 (diff)
downloadCMake-21b6b1395630b236b189631c168eace8b1aa23d6.zip
CMake-21b6b1395630b236b189631c168eace8b1aa23d6.tar.gz
CMake-21b6b1395630b236b189631c168eace8b1aa23d6.tar.bz2
Merge topic 'cuda-11.1-sm86'
5f6b0ba8b1 FindCUDA/select_compute_arch: Add CUDA 11.1 and SM86 support Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5292
Diffstat (limited to 'Modules/FindCUDA')
-rw-r--r--Modules/FindCUDA/select_compute_arch.cmake16
1 files changed, 13 insertions, 3 deletions
diff --git a/Modules/FindCUDA/select_compute_arch.cmake b/Modules/FindCUDA/select_compute_arch.cmake
index c11725d..9351288 100644
--- a/Modules/FindCUDA/select_compute_arch.cmake
+++ b/Modules/FindCUDA/select_compute_arch.cmake
@@ -7,7 +7,7 @@
# ARCH_AND_PTX : NAME | NUM.NUM | NUM.NUM(NUM.NUM) | NUM.NUM+PTX
# NAME: Fermi Kepler Maxwell Kepler+Tegra Kepler+Tesla Maxwell+Tegra Pascal Volta Turing Ampere
# NUM: Any number. Only those pairs are currently accepted by NVCC though:
-# 2.0 2.1 3.0 3.2 3.5 3.7 5.0 5.2 5.3 6.0 6.2 7.0 7.2 7.5 8.0
+# 2.0 2.1 3.0 3.2 3.5 3.7 5.0 5.2 5.3 6.0 6.2 7.0 7.2 7.5 8.0 8.6
# Returns LIST of flags to be added to CUDA_NVCC_FLAGS in ${out_variable}
# Additionally, sets ${out_variable}_readable to the resulting numeric list
# Example:
@@ -82,16 +82,26 @@ if(CUDA_VERSION VERSION_GREATER_EQUAL "10.0")
list(APPEND CUDA_ALL_GPU_ARCHITECTURES "7.5")
if(CUDA_VERSION VERSION_LESS "11.0")
- set(CUDA_LIMIT_GPU_ARCHITECTURE "8.0")
list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "7.5+PTX")
+ set(CUDA_LIMIT_GPU_ARCHITECTURE "8.0")
endif()
endif()
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.0")
list(APPEND CUDA_KNOWN_GPU_ARCHITECTURES "Ampere")
- list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "8.0" "8.0+PTX")
+ list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "8.0")
list(APPEND CUDA_ALL_GPU_ARCHITECTURES "8.0")
+ if(CUDA_VERSION VERSION_LESS "11.1")
+ list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "8.0+PTX")
+ set(CUDA_LIMIT_GPU_ARCHITECTURE "8.6")
+ endif()
+endif()
+
+if(CUDA_VERSION VERSION_GREATER_EQUAL "11.1")
+ list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "8.6" "8.6+PTX")
+ list(APPEND CUDA_ALL_GPU_ARCHITECTURES "8.6")
+
if(CUDA_VERSION VERSION_LESS "12.0")
set(CUDA_LIMIT_GPU_ARCHITECTURE "9.0")
endif()