F1217 09:24:27.107496 4541 syncedmem.cpp:71] Check failed: error == cudaSuccess (30 vs. 0) unknown
F1217 09:24:27.107496 4541 syncedmem.cpp:71] Check failed: error == cudaSuccess (30 vs. 0) unknown error
或者
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
CXX src/gtest/gtest-all.cpp
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
CXX/LD -o .build_release/test/test_all.testbin src/caffe/test/test_caffe_main.cpp
參考連結:
https://blog.csdn.net/u010167269/article/details/50703923
1、官網檢視自己電腦顯示卡的計算能力
檢視連結:https://developer.nvidia.com/cuda-gpus
可知:我的電腦對應的顯示卡計算能力是6.1
GeForce CUDA-Enabled GeForce Products
GeForce Desktop Products
GPU Compute Capability
GeForce GTX 1050 6.1
2、開啟caffe目錄下的Makefile.config,修改CUDA_ARCH:
[email protected]:~$ cd caffe
[email protected]:~/caffe$ sudo gedit Makefile.config
# For CUDA >= 9.0, comment the *_20 and *_21 lines for compatibility.
CUDA_ARCH := #-gencode arch=compute_20,code=sm_20 \
#-gencode arch=compute_20,code=sm_21 \
#-gencode arch=compute_30,code=sm_30 \
#-gencode arch=compute_35,code=sm_35 \
#-gencode arch=compute_50,code=sm_50 \
#-gencode arch=compute_52,code=sm_52 \
#-gencode arch=compute_60,code=sm_60 \
-gencode arch=compute_61,code=sm_61 \
-gencode arch=compute_61,code=compute_61
只留下 *_61結尾的最後兩行,其他都註釋掉