diff options
author | Brad King <brad.king@kitware.com> | 2020-09-30 12:05:41 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-09-30 12:05:50 (GMT) |
commit | d4c149a738cec00a01c65a5a24d9aa73a1dc5fd8 (patch) | |
tree | 549c4bfda9e529c10fab4ad8b9d77b930ba8ea10 /Modules | |
parent | 7d4e9a3a3a579db66b2850beee9b70cd8e5fa6fa (diff) | |
parent | 5f6b0ba8b15f557b4bcc986860df888a861e5853 (diff) | |
download | CMake-d4c149a738cec00a01c65a5a24d9aa73a1dc5fd8.zip CMake-d4c149a738cec00a01c65a5a24d9aa73a1dc5fd8.tar.gz CMake-d4c149a738cec00a01c65a5a24d9aa73a1dc5fd8.tar.bz2 |
Merge topic 'cuda-11.1-sm86' into release-3.18
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')
-rw-r--r-- | Modules/FindCUDA/select_compute_arch.cmake | 16 |
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() |