Ubuntu16.04 编译 opencv 出现错误:Unsupported gpu architecture 'compute_20'

方法一:(https://blog.csdn.net/renhanchi/article/details/80493232)
参考其他博客:

我的cuda版本是9.0,估计就是版本问题,网上有人说把cuda降到8.0以下。这个方法真是扯淡~

其实只要在编译的时候加一句话就好了

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D CUDA_GENERATION=Kepler ..

关键就是在最后指定使用Kepler

make的结果:

[100%] Building CXX object modules/python/CMakeFiles/opencv_python.dir/src2/cv2.cpp.o
[100%] Linking CXX executable ../../bin/opencv_test_contrib
[100%] Built target opencv_test_contrib
[100%] Linking CXX shared library ../../lib/cv2.so
[100%] Built target opencv_python

你可能感兴趣的:(Ubuntu16.04 编译 opencv 出现错误:Unsupported gpu architecture 'compute_20')