diff options
author | Boris Fomitchev <bfomitchev@nvidia.com> | 2017-08-08 21:04:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-08-10 15:10:07 (GMT) |
commit | cbf1393aa4b957ec3c2c5cc4852dcebab825c5b6 (patch) | |
tree | 88b3f9a4ceaf1009f45db3ffc7dd877fc8824f70 | |
parent | bfdfc6db9d51ac874ea12caa89c41a3211c917c2 (diff) | |
download | CMake-cbf1393aa4b957ec3c2c5cc4852dcebab825c5b6.zip CMake-cbf1393aa4b957ec3c2c5cc4852dcebab825c5b6.tar.gz CMake-cbf1393aa4b957ec3c2c5cc4852dcebab825c5b6.tar.bz2 |
FindCUDA: Add CUDA9/Volta recognition
-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() |