本文介绍了nvcc fatal:安装了cuda 9.1 + caffe + openCV 3.4.0时不支持的gpu架构'compute_20'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经安装了CUDA 9.1+cudnn-9.1+opencv 3.4.0+caffe
.
当我尝试在caffe
目录中运行make all -j8
时,发生此错误:
When I tried to run make all -j8
in caffe
directory, this error occurred:
我尝试运行:
"cmake -D CMAKE_BUILD_TYPE=RELEASE -D CUDA_GENERATION=Kepler .."
但是没有用.
推荐答案
尝试手动编辑 Makefile.config
从这些行中删除compute_2*
架构(注释解释了原因):
Try manually edit Makefile.config
to remove compute_2*
architectures from these lines (comments explain why):
# 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
并添加compute_6 *体系结构(请参见注释),以便新的CUDA_ARCH如下所示:
And add the compute_6* architectures (see the comments) so that your new CUDA_ARCH looks like this:
# 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_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
那么您需要先make clean
在make all
之前.
这篇关于nvcc fatal:安装了cuda 9.1 + caffe + openCV 3.4.0时不支持的gpu架构'compute_20'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!