nvcc fatal : Unsupported gpu architecture 'compute_11'
使用VS编译OpenCV编译源代码时候,对Cmake生成的工程文件编译,会出现 nvcc fatal : Unsupported gpu architecture 'compute_11' 问题。原因是CUDA7.5不支持较为古老的显卡版本,因此1.1,2.0,2.1,之类的显卡选项是多余的。
需要更改Cmake GUI对工程的配置,去掉对compute_11的支持
1. 打开cmakelist.txt
CMake的选项中声明 -D CUDA_GENERATION=Kepler
即添加:
if(WIN32 AND NOT MINGW)
add_definitions(-D_VARIADIC_MAX=10)
endif(WIN32 AND NOT MINGW) #此处为添加代码
if(1)
add_definitions( -D_CUDA_GENERATION=Maxwell)
不能消除这种现象,问题没有得到解决。
参考:安装caffe的血泪史
linux版本编译OpenCV可能出现的Compute_11问题
对于Maxwell的支持,参考:Vs13+Win7+OpenCV2.4.13+CUDA7.5支持
2.
改正方法:
把CUDA栏目里面,CUDA_ARCH_BIN 项目里面,3.0前面的都去掉,改成如下所示。
之前,
1. 先把CUDA_generation 修改为Auto
2. 打开 sources\cmake 目录,使用文本编辑器编辑OpenCVDetectCUDA.cmake
找到下面一段
if(NOT DEFINED __cuda_arch_bin)
if(ANDROID)
set(__cuda_arch_bin "3.2")
set(__cuda_arch_ptx "")
else()
if(${CUDA_VERSION} VERSION_LESS "5.0")
set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0")
else()
set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1 3.0 3.5")
endif()
set(__cuda_arch_ptx "3.0")
endif()
endif()
把第二个1.1 1.2 1.3 2.0 2.1 去掉,修改为
if(NOT DEFINED __cuda_arch_bin)
if(ANDROID)
set(__cuda_arch_bin "3.2")
set(__cuda_arch_ptx "")
else()
if(${CUDA_VERSION} VERSION_LESS "5.0")
set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0")
else()
set(__cuda_arch_bin "3.0 3.5")
endif()
set(__cuda_arch_ptx "3.0")
endif()
endif()
或者直接修改为使用于本机GTX960 显卡的 5.2,
才能把CUDA_ARCH_BIN 的1.1 1.2 1.3 2.0 2.1 去掉,进而解决 nvcc fatal : Unsupported gpu architecture 'compute_11' 问题。
若不能通过编辑选项去掉,应该有其他可行的方法???
则可以编译通过。
nvcc fatal : Unsupported gpu architecture 'compute_11'的更多相关文章
- install opencv 2.4.10 with issue :"nvcc fatal : Unsupported gpu architecture 'compute_11'"
issue: nvcc fatal : Unsupported gpu architecture 'compute_11'CMake Error at cuda_compile_generated ...
- caffe编译问题-nvcc fatal:Unsupported gpu architecture 'compute_20'
错误描述 nvcc fatal : Unsupported gpu architecture 'compute_20' Makefile:: recipe for target '.build_rel ...
- cuda9.0编译caffe报错nvcc fatal : Unsupported gpu architecture 'compute_70'
Tesla V100 cuda9.0 caffe编译的时候报上述错误,修改方法: CUDA_ARCH := #-gencode arch=compute_20,code=sm_20 \ #-genco ...
- Unsupported gpu architecture 'compute_20'
NVCC src/caffe/layers/reduction_layer.cunvcc fatal : Unsupported gpu architecture 'compute_20'Make ...
- Error when Building GPU docker image for caffe: Unsupported gpu architecture 'compute_60'
issue: Error when Building GPU docker image for caffe: Unsupported gpu architecture 'compute_60' rea ...
- nvcc fatal : Cannot find compiler 'cl.exe' in PATH解决方法
我在测试安装的deep learning工具theano.按照官网Baby Steps - Algebra一步步输入. >>> import theano.tensor as T & ...
- [ZZ] GTX 280 GPU architecture
http://anandtech.com/show/2549 Now that NVIDIA’s has announced its newest GPU architecture (the GeFo ...
- 转 关于nvcc fatal : Value 'sm_20' is not defined for option 'gpu-architecture'的问题
原文地址: https://blog.csdn.net/Mao_Jonah/article/details/78965827 关于nvcc fatal : Value ‘sm_20’ is not d ...
- 5 Things You Should Know About the New Maxwell GPU Architecture
The introduction this week of NVIDIA’s first-generation “Maxwell” GPUs is a very exciting moment for ...
随机推荐
- hdu2000 ASCII码排序【C++】
ASCII码排序 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Su ...
- fastclick:处理移动端click事件300毫秒延迟
fastclick:处理移动端click事件300毫秒延迟 1.兼容性 iOS 3及更高版本的移动Safari iOS 5及更高版本的Chrome Android上的Chrome(ICS) Opera ...
- windows 实现vue命令行
在代码编辑器里写好文件的位置,以及相关的命令,保存文件类型是.cmd
- MySQL Master High Available 理论篇(二)
- React Native Mac配置指南
步骤 http://facebook.github.io/react-native/docs/getting-started.html#content 依照React Native官网步骤一步步安装, ...
- javascript 获取当前对象
<a href="dsfjlsdjf" onclick="testGet()"> 请教编写testGet()函数获取这个超链接href属性,限制例如 ...
- 用户向导左右滑动页面实现之ViewPager
接着上一篇博客.上一篇博客是用ImageSwitcher实现用户向导功能,如今用ViewPager实现同样的功能. 直接看代码: 布局文件activity_main.xml <RelativeL ...
- luogu3382【模板】三分法
给出一个N次函数,保证在范围[l,r]内存在一点x,使得[l,x]上单调增,[x,r]上单调减.试求出x的值. 看代码即可. #include <cstdio> #include < ...
- 到底什么是nandflash,norflash,sdram,emmc,rom,ram【转】
本文转载自:http://blog.sina.com.cn/s/blog_6dd8f2b70101le26.html 最近被nandflash,norflash,sdram,emmc,rom,ram搞 ...
- 444D
分类 首先我们要对询问分类,如果相差log级别就第一种询问,否则第二种. 第一种直接暴力lower_bound,复杂度玄学 第二种归并,复杂度玄学 但是就是过了.感觉很容易卡. #include< ...