Skip to content

Commit 5a201dd

Browse files
authored
Merge pull request #5057 from Queuecumber/cuda-pascal-cmake
[build] Add Pascal to all cuda architectures
2 parents 24d2f67 + 8cd5c3d commit 5a201dd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cmake/Cuda.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ endif()
44

55
# Known NVIDIA GPU achitectures Caffe can be compiled for.
66
# This list will be used for CUDA_ARCH_NAME = All option
7-
set(Caffe_known_gpu_archs "20 21(20) 30 35 50")
7+
set(Caffe_known_gpu_archs "20 21(20) 30 35 50 60 61")
88

99
################################################################################################
1010
# A function for automatic detection of GPUs installed (if autodetection is enabled)
@@ -56,7 +56,7 @@ endfunction()
5656
# caffe_select_nvcc_arch_flags(out_variable)
5757
function(caffe_select_nvcc_arch_flags out_variable)
5858
# List of arch names
59-
set(__archs_names "Fermi" "Kepler" "Maxwell" "All" "Manual")
59+
set(__archs_names "Fermi" "Kepler" "Maxwell" "Pascal" "All" "Manual")
6060
set(__archs_name_default "All")
6161
if(NOT CMAKE_CROSSCOMPILING)
6262
list(APPEND __archs_names "Auto")
@@ -89,6 +89,8 @@ function(caffe_select_nvcc_arch_flags out_variable)
8989
set(__cuda_arch_bin "30 35")
9090
elseif(${CUDA_ARCH_NAME} STREQUAL "Maxwell")
9191
set(__cuda_arch_bin "50")
92+
elseif(${CUDA_ARCH_NAME} STREQUAL "Pascal")
93+
set(__cuda_arch_bin "60 61")
9294
elseif(${CUDA_ARCH_NAME} STREQUAL "All")
9395
set(__cuda_arch_bin ${Caffe_known_gpu_archs})
9496
elseif(${CUDA_ARCH_NAME} STREQUAL "Auto")

0 commit comments

Comments
 (0)