Opencv编译出现compute_11 not support解决方法

nvcc fatal   : Unsupported gpu architecture 'compute_11'
CMake Error at cuda_compile_generated_matrix_operations.cu.o.cmake:206 (message):
  Error generating
/home/smie/Documents/opencv2.4.11/build/modules/core/CMakeFiles/cuda_compile.dir/__/dynamicuda/src/cuda/./cuda_compile_gene

rated_matrix_operations.cu.o

make[2]: ***
[modules/core/CMakeFiles/cuda_compile.dir/__/dynamicuda/src/cuda/./cuda_compile_generated_matrix_operations.cu.o] Error 1
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs....

首先,这里要说明一下错误是compute_11,不是compute_ll,或者l1,1l之类的,其次网上搜索的解决方法都不靠谱,他们没有找到问题的本因,如这位大佬的blog的解决方法:

When using cmake to do configurations, set the option CUDA_GENERATION to specific your GPU architecture. I ran across the same error and tried this to work out the problem.
this worked for me and shows a possible value for CUDA_GENERATION:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D CUDA_GENERATION=Kepler ..

这不是神奇不神奇的问题,因为我根本没法神奇的解决这个问题好不好,无奈,仔细想一想问题的原因:不支持compute_11。。。不支持。。

ccmake .. 

看一下具体参数的设置,通过指令/cuda定位到cuda设置部分有个参数CUDA_ARCH_BIN,这里从1.1开始到3.5,我把数字1.1删除,错误变成了compute_12不支持,看起啦问题在这里,因为我的CUDA_ARCH_PTX是3.0,所以我把3.0一下全部删除,问题解决,over!

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值