cuda环境下安装opencv出现nvcc warning : The 'compute_11'
Posted 塔上的樹
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了cuda环境下安装opencv出现nvcc warning : The 'compute_11'相关的知识,希望对你有一定的参考价值。
警告打印:
- nvcc warning : The ‘compute_11‘, ‘compute_12‘, ‘compute_13‘, ‘sm_11‘, ‘sm_12‘, and ‘sm_13‘ architectures are deprecated, and may be removed in a future release.
找到cmake后产生的OpencvConfig.cmake文件,找到如下代码:
- # Version Compute Capability from which OpenCV has been compiled is remembered
- set(OpenCV_COMPUTE_CAPABILITIES -gencode;arch=compute_11,code=sm_11;-gencode;arch=compute_12,code=sm_12;-gencode;arch=compute_13,code=sm_13;-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_30,code=compute_30)
将"-gencode ;arch=compute_11,code=sm_11";-gencode;arch=compute_12,code=sm_12;-gencode;arch=compute_13,code=sm_13; 等删除。
主要因为此架构在CUDA过时~~将来也将不支持
以上若无果:
在cmakelist中关闭cuda~~
或者在cmake时加上参数-D BUILD_opencv_gpu=OFF
以上是关于cuda环境下安装opencv出现nvcc warning : The 'compute_11'的主要内容,如果未能解决你的问题,请参考以下文章
cuda报错: nvcc fatal : Host compiler targets unsupported OS
ubuntu16.04 安装配置matlab ,python ,cuda8.0,cudnn,opencv3.1的caffe环境