nvcc致命:不受支持的gpu架构' compute_20'在编译matlab时

时间:2018-05-09 06:50:31

标签: linux cuda gpu matlab-compiler

(CentOS Linux版本7.3; cuda 9.1; GPU:Tesla P100-PCIE)

我已在服务器上安装了Matlab2018a,但当我尝试这样做时:     vl_compilenn('enableGpu', true); 我遇到了这个:

vl_compilenn:   CUDA: MEX config file: 
'/data1/zhangdinghuai/gitrepo/explanatoryGraph/matconvnet-1.0- 
beta24/matlab/src/config/mex_CUDA_glnxa64.xml'
Building with 'nvcc'.
nvcc fatal   : Unsupported gpu architecture 'compute_20'

Building with 'nvcc'.
Error using mex
nvcc fatal   : Unsupported gpu architecture 'compute_20'


Error in vl_compilenn>mex_compile (line 529)
mex(mopts{:}) ;

Error in vl_compilenn (line 487)
mex_compile(opts, srcs{i}, objfile, flags.mexcu) ;

我搜索过类似的问题,但没有一个有效,有人能帮我一把吗?

PS:有关服务器的更多信息如下:

[zhangdinghuai@gpu01 2018a]$ lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1- 
noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-                4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.3.1611 (Core) 
Release:    7.3.1611
Codename:   Core
[zhangdinghuai@gpu01 2018a]$ cat /etc/issue
\S
Kernel \r on an \m

[zhangdinghuai@gpu01 2018a]$ cat /proc/version
Linux version 3.10.0-514.26.1.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Thu Jun 29 16:05:25 UTC 2017

2 个答案:

答案 0 :(得分:1)

在这里的类似帖子中" nvcc fatal : Unsupported gpu architecture 'compute_20' while cuda 9.1+caffe+openCV 3.4.0 is installed"或者在Askububtu,建议您修改makefile.config并注释掉-gencode arch=compute_20

您是否也可以共享您正在使用的确切内核版本,具有PCI ID的精确PCI设备和驱动程序版本(如果有)。这可能会更好地了解您的环境,也可以帮助回答更多问题。

答案 1 :(得分:0)

我的解决方案是修改文件matconvnet / matlab / src / config / mex_CUDA_glnxa64.xml。

更改行

`NVCCFLAGS="-D_FORCE_INLINES -gencode=arch=compute_20,code=sm_20 -gencode=arch=compute_30,code=\"sm_30,compute_30\" $NVCC_FLAGS"`

`NVCCFLAGS="-D_FORCE_INLINES -gencode=arch=compute_20,code=sm_20 -gencode=arch=compute_30,code=\"sm_30,compute_30\" $NVCC_FLAGS"`