@@ -2,9 +2,9 @@ if(NOT WITH_GPU)
2
2
return ()
3
3
endif ()
4
4
5
- set (paddle_known_gpu_archs "20 21(20) 30 35 50 52 60 61 70" )
6
- set (paddle_known_gpu_archs7 "20 21(20) 30 35 50 52" )
7
- set (paddle_known_gpu_archs8 "20 21(20) 30 35 50 52 60 61" )
5
+ set (paddle_known_gpu_archs "30 35 50 52 60 61 70" )
6
+ set (paddle_known_gpu_archs7 "30 35 50 52" )
7
+ set (paddle_known_gpu_archs8 "30 35 50 52 60 61" )
8
8
9
9
######################################################################################
10
10
# A function for automatic detection of GPUs installed (if autodetection is enabled)
@@ -40,7 +40,7 @@ function(detect_installed_gpus out_variable)
40
40
STRING (REGEX REPLACE "\n " ";" nvcc_out "${nvcc_out} " )
41
41
list (GET nvcc_out -1 nvcc_out )
42
42
string (REPLACE "2.1" "2.1(2.0)" nvcc_out "${nvcc_out} " )
43
- set (CUDA_gpu_detect_output ${nvcc_out} CACHE INTERNAL "Returned GPU architetures from caffe_detect_gpus tool" FORCE )
43
+ set (CUDA_gpu_detect_output ${nvcc_out} CACHE INTERNAL "Returned GPU architetures from detect_installed_gpus tool" FORCE )
44
44
endif ()
45
45
endif ()
46
46
@@ -137,10 +137,6 @@ function(select_nvcc_arch_flags out_variable)
137
137
set (${out_variable} _readable ${nvcc_archs_readable} PARENT_SCOPE )
138
138
endfunction ()
139
139
140
- if (NOT CUDA_FOUND )
141
- return ()
142
- endif ()
143
-
144
140
message (STATUS "CUDA detected: " ${CUDA_VERSION} )
145
141
if (${CUDA_VERSION} LESS 7.0 )
146
142
set (paddle_known_gpu_archs ${paddle_known_gpu_archs} )
@@ -163,37 +159,11 @@ if(NOT WITH_DSO)
163
159
list (APPEND EXTERNAL_LIBS ${CUDNN_LIBRARY} ${CUDA_CUBLAS_LIBRARIES} ${CUDA_curand_LIBRARY} ${NCCL_LIBRARY} )
164
160
endif (NOT WITH_DSO )
165
161
166
- # find libcuda.so and lbnvrtc.so
167
- # For libcuda.so, we will find it under lib, lib64, and then the
168
- # stubs folder, in case we are building on a system that does not
169
- # have cuda driver installed. On windows, we also search under the
170
- # folder lib/x64.
171
-
172
- find_library (CUDA_CUDA_LIB cuda
173
- PATHS ${CUDA_TOOLKIT_ROOT_DIR}
174
- PATH_SUFFIXES lib lib64 lib/stubs lib64/stubs lib/x64 )
175
- find_library (CUDA_NVRTC_LIB nvrtc
176
- PATHS ${CUDA_TOOLKIT_ROOT_DIR}
177
- PATH_SUFFIXES lib lib64 lib/x64 )
178
-
179
162
# setting nvcc arch flags
180
163
select_nvcc_arch_flags (NVCC_FLAGS_EXTRA )
181
164
list (APPEND CUDA_NVCC_FLAGS ${NVCC_FLAGS_EXTRA} )
182
165
message (STATUS "Added CUDA NVCC flags for: ${NVCC_FLAGS_EXTRA_readable} " )
183
166
184
- if (CUDA_CUDA_LIB )
185
- # message(STATUS "Found libcuda: ${CUDA_CUDA_LIB}")
186
- list (APPEND Caffe2_DEPENDENCY_LIBS ${CUDA_CUDA_LIB} )
187
- else ()
188
- message (FATAL_ERROR "Cannot find libcuda.so." )
189
- endif ()
190
- if (CUDA_NVRTC_LIB )
191
- # message(STATUS "Found libnvrtc: ${CUDA_NVRTC_LIB}")
192
- list (APPEND Caffe2_DEPENDENCY_LIBS ${CUDA_NVRTC_LIB} )
193
- else ()
194
- message (FATAL_ERROR "Cannot find libnvrtc.so." )
195
- endif ()
196
-
197
167
# Set C++11 support
198
168
set (CUDA_PROPAGATE_HOST_FLAGS OFF )
199
169
0 commit comments