diff options
author | Brad King <brad.king@kitware.com> | 2017-08-11 13:11:37 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-08-11 13:11:43 (GMT) |
commit | eda45e9f17cdc401c6450d0e8eca65e5b068330f (patch) | |
tree | a70e597461d082e45853fd35a7854172d017be81 | |
parent | f8a61c578badb0015423580b38341bc00a3c7fd4 (diff) | |
parent | cbf1393aa4b957ec3c2c5cc4852dcebab825c5b6 (diff) | |
download | CMake-eda45e9f17cdc401c6450d0e8eca65e5b068330f.zip CMake-eda45e9f17cdc401c6450d0e8eca65e5b068330f.tar.gz CMake-eda45e9f17cdc401c6450d0e8eca65e5b068330f.tar.bz2 |
Merge topic 'FindCUDA-cuda9'
cbf1393a FindCUDA: Add CUDA9/Volta recognition
Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1119
-rw-r--r-- | Modules/FindCUDA/select_compute_arch.cmake | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Modules/FindCUDA/select_compute_arch.cmake b/Modules/FindCUDA/select_compute_arch.cmake index 8fb44d8..b604a17 100644 --- a/Modules/FindCUDA/select_compute_arch.cmake +++ b/Modules/FindCUDA/select_compute_arch.cmake @@ -30,12 +30,17 @@ endif () if (CUDA_VERSION VERSION_GREATER "7.5") list(APPEND CUDA_KNOWN_GPU_ARCHITECTURES "Pascal") - list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "6.0" "6.1" "6.1+PTX") + list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "6.0" "6.1") else() list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "5.2+PTX") endif () - +if (CUDA_VERSION VERSION_GREATER "8.5") + list(APPEND CUDA_KNOWN_GPU_ARCHITECTURES "Volta") + list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "7.0" "7.0+PTX") +else() + list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "6.1+PTX") +endif() ################################################################################################ # A function for automatic detection of GPUs installed (if autodetection is enabled) @@ -141,6 +146,9 @@ function(CUDA_SELECT_NVCC_ARCH_FLAGS out_variable) elseif(${arch_name} STREQUAL "Pascal") set(arch_bin 6.0 6.1) set(arch_ptx 6.1) + elseif(${arch_name} STREQUAL "Volta") + set(arch_bin 7.0 7.0) + set(arch_ptx 7.0) else() message(SEND_ERROR "Unknown CUDA Architecture Name ${arch_name} in CUDA_SELECT_NVCC_ARCH_FLAGS") endif() |