Errors
- nvcc fatal : Unsupported gpu architecture 'compute_20'
仔细查看了一下 Makefile.config 中 CUDA_ARCH 设置未按规定设置:
# CUDA architecture setting: going with all of them.
# For CUDA < 6.0, comment the *_50 through *_61 lines for compatibility.
# For CUDA < 8.0, comment the *_60 and *_61 lines for compatibility.
# 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
Solution: 因为我装的是CUDA9.0所以把下面这两行删除就可以了
-gencode arch=compute_20,code=sm_20
-gencode arch=compute_20,code=sm_21 \
- /usr/bin/ld: warning: libcudart.so.7.5, needed by /usr/local/lib/libopencv_core.so, not found (try using -rpath or -rpath-link)
[HAlmawi](https://github.com/HAlmawi)
Problem fixed.
Solution: I downloaded OpenCV again, did the cmake (where it recognized cuda 6.5), and then create a soft link between the /usr/local/lib/libopencv_core.so with the newly installed OpenCV's /lib/libopencv_core.so
Solution: sudo ln -s /usr/local/cuda/lib64/libcudart.so.9.1.85 /usr/local/cuda/lib64/libcudart.so.7.5
- Check failed: error == cudaSuccess (35 vs. 0) CUDA driver version is insufficient for CUDA runtime version
[catmonkeylee](https://github.com/catmonkeylee) commented
When try the deviceQuery sample, I got the same error:
./deviceQuery Starting...
CUDA Device Query (Runtime API) version (CUDART static linking)
cudaGetDeviceCount returned 35
-> CUDA driver version is insufficient for CUDA runtime version
Result = FAIL
[AminBW](https://github.com/AminBW) commented
Hi
I had the same problem in Ubuntu:
cudaSuccess (35 vs. 0) CUDA driver version is insufficient for CUDA runtime version
I solved it easily by installing nvidia-modprobe and cuda-driver using apt-get:
sudo apt-get install nvidia-modprobe
sudo apt-get install cuda-driver
hope it will work for you ;)
Solution: Upgrade CUDA 8.0 to 9.1
- BatchReindexLayerTest/3.TestGradient, where TypeParam = caffe::GPUDevice<double>
https://blog.csdn.net/balixiaxuetian/article/details/79154013
google了一下,貌似使用CUDA 9.1加双显卡的都有这个错误,暂且不管它,目前不影响使用。使用mnist测试程序是可以运行的。CUDA 9.0则测试全部通过。
Solution: modify caffe/Makefile
https://blog.csdn.net/m0_38082419/article/details/79379066
319 # Debugging
320 ifeq ($(DEBUG), 1)
321 COMMON_FLAGS += -DDEBUG -g -O0
322 NVCCFLAGS += -G
323 else
324 COMMON_FLAGS += -DNDEBUG -O2
325 NVCCFLAGS += -G
326 endif