diff options
author | zasdfg bnm <qasdfgtyuiop@gmail.com> | 2020-09-29 06:28:02 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-09-29 09:32:25 (GMT) |
commit | 5f6b0ba8b15f557b4bcc986860df888a861e5853 (patch) | |
tree | 3baa83ef4a6fb4583c2568c04f12265bd6bf444e /Modules | |
parent | 177fc020731bcee747295573c92cd0f7ca200e53 (diff) | |
download | CMake-5f6b0ba8b15f557b4bcc986860df888a861e5853.zip CMake-5f6b0ba8b15f557b4bcc986860df888a861e5853.tar.gz CMake-5f6b0ba8b15f557b4bcc986860df888a861e5853.tar.bz2 |
FindCUDA/select_compute_arch: Add CUDA 11.1 and SM86 support
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() |