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:
pheehu@pheehu:~$ cd caffe
pheehu@pheehu:~/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结尾的最后两行,其他都注释掉