summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Ehrlich <max.ehr@gmail.com>2016-12-02 10:13:50 -0500
committerMax Ehrlich <max.ehrlich@sri.com>2016-12-02 12:49:49 -0500
commit8cd5c3df98734f4c43e1b7f43c05401fda0a94ac (patch)
tree6e1258d2a8782553e7a7aadcf6873601e18c8cd8
parent24d2f67173db3344141dce24b1008efffbfe1c7d (diff)
downloadcaffeonacl-8cd5c3df98734f4c43e1b7f43c05401fda0a94ac.tar.gz
caffeonacl-8cd5c3df98734f4c43e1b7f43c05401fda0a94ac.tar.bz2
caffeonacl-8cd5c3df98734f4c43e1b7f43c05401fda0a94ac.zip
Add Pascal to all cuda architectures
The known gpu architectures were missing the Pascal sm_60 and sm_61 compute capabilities. When building for this GPU, but on a separate machine, like a CI server or inside a docker image, caffe would be built for at most capability sm_50 and crash when run on the Pascal GPU.
-rw-r--r--cmake/Cuda.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmake/Cuda.cmake b/cmake/Cuda.cmake
index eeeb7325..7146a244 100644
--- a/cmake/Cuda.cmake
+++ b/cmake/Cuda.cmake
@@ -4,7 +4,7 @@ endif()
# Known NVIDIA GPU achitectures Caffe can be compiled for.
# This list will be used for CUDA_ARCH_NAME = All option
-set(Caffe_known_gpu_archs "20 21(20) 30 35 50")
+set(Caffe_known_gpu_archs "20 21(20) 30 35 50 60 61")
################################################################################################
# A function for automatic detection of GPUs installed (if autodetection is enabled)
@@ -56,7 +56,7 @@ endfunction()
# caffe_select_nvcc_arch_flags(out_variable)
function(caffe_select_nvcc_arch_flags out_variable)
# List of arch names
- set(__archs_names "Fermi" "Kepler" "Maxwell" "All" "Manual")
+ set(__archs_names "Fermi" "Kepler" "Maxwell" "Pascal" "All" "Manual")
set(__archs_name_default "All")
if(NOT CMAKE_CROSSCOMPILING)
list(APPEND __archs_names "Auto")
@@ -89,6 +89,8 @@ function(caffe_select_nvcc_arch_flags out_variable)
set(__cuda_arch_bin "30 35")
elseif(${CUDA_ARCH_NAME} STREQUAL "Maxwell")
set(__cuda_arch_bin "50")
+ elseif(${CUDA_ARCH_NAME} STREQUAL "Pascal")
+ set(__cuda_arch_bin "60 61")
elseif(${CUDA_ARCH_NAME} STREQUAL "All")
set(__cuda_arch_bin ${Caffe_known_gpu_archs})
elseif(${CUDA_ARCH_NAME} STREQUAL "Auto")