Skip to content

Commit a569f6b

Browse files
Coderx7vera121
authored andcommitted
Minor correction concerning compilation compatibility with CUDA 9.0
Since CUDA 9.0 doesn't support sm_20 and sm_21 anymore. This PR allows Caffe to compile with CUDA 9.0 and newer versions successfully. This addresses the discussion concerning [#6237](BVLC/caffe#6237) in [master (#6237)](BVLC/caffe@cb150ec#diff-2004a3d3e6b4ed2e2812bb0b4b998f18)
1 parent ceade38 commit a569f6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmake/Cuda.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ function(caffe_select_nvcc_arch_flags out_variable)
113113
set(__nvcc_flags "")
114114
set(__nvcc_archs_readable "")
115115

116-
string(COMPARE GREATER_EQUAL "${CUDA_VERSION}" "9.1" iscudanewerthan91)
117-
if(iscudanewerthan91)
116+
string(COMPARE GREATER_EQUAL "${CUDA_VERSION}" "9.0" iscudanewerthan90)
117+
if(iscudanewerthan90)
118118
string(REPLACE "21(20)" "" __cuda_arch_bin "${__cuda_arch_bin}")
119119
string(REPLACE "20" "" __cuda_arch_bin "${__cuda_arch_bin}")
120120
endif()

0 commit comments

Comments
 (0)