vs2015+opencv3.3.0+cuda9.1编译,出现nvcc fatal : Unsupported gpu architecture 'compute_20'

话不多说,进入正题:

一、vs2015+opencv3.3.0+cuda9.1编译OpenCV时,在配置cmake阶段出现:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_nppi_LIBRARY (ADVANCED)

问题原因:cuda版本的问题,在9.1中原有的nppi被分解为多个库,查看cuda的bin文件夹发现多了以下等名称的以nppi为前缀的dll文件。

 

解决办法:

1、更换cuda版本8.0及以下;

2、参照http://blog.csdn.net/u014613745/article/details/78310916这篇文章的解决办法。

二、vs编译代码阶段出现,nvcc fatal   : Unsupported gpu architecture 'compute_20'错误,导致编译失败

问题原因:在cmake配置阶段,配置了当前版本cuda不支持的计算架构2.0

 

解决办法:删除途中对应选项中的2.0,重新configure、generate、编译即可!

 

posted @ 2018-01-17 09:19  氕氘钏  阅读(921)  评论(0编辑  收藏  举报