summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrzemysław Dolata <snowball91b@gmail.com>2018-04-06 16:16:48 +0200
committerWook Song <wook16.song@samsung.com>2020-01-23 22:50:38 +0900
commit31cae2770e0417a3eb63338b9bbe27f1e68bc2cf (patch)
treea53dad4d890e05bffc3605ba3b366eadf1e84792
parent42ac3c6d5ce16bcf1c283b0d337be3b48fabc806 (diff)
parent37e4289024d80632e2c721e865c14be63aab9d8e (diff)
downloadcaffe-31cae2770e0417a3eb63338b9bbe27f1e68bc2cf.tar.gz
caffe-31cae2770e0417a3eb63338b9bbe27f1e68bc2cf.tar.bz2
caffe-31cae2770e0417a3eb63338b9bbe27f1e68bc2cf.zip
Merge pull request #6237 from jasjuang/master
Make caffe compile through cmake with CUDA 9.1
-rw-r--r--cmake/Cuda.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/Cuda.cmake b/cmake/Cuda.cmake
index 54e26fd5..9325674a 100644
--- a/cmake/Cuda.cmake
+++ b/cmake/Cuda.cmake
@@ -109,6 +109,12 @@ function(caffe_select_nvcc_arch_flags out_variable)
set(__nvcc_flags "")
set(__nvcc_archs_readable "")
+ string(COMPARE GREATER_EQUAL "${CUDA_VERSION}" "9.1" iscudanewerthan91)
+ if(iscudanewerthan91)
+ string(REPLACE "21(20)" "" __cuda_arch_bin "${__cuda_arch_bin}")
+ string(REPLACE "20" "" __cuda_arch_bin "${__cuda_arch_bin}")
+ endif()
+
# Tell NVCC to add binaries for the specified GPUs
foreach(__arch ${__cuda_arch_bin})
if(__arch MATCHES "([0-9]+)\\(([0-9]+)\\)")