make opencv Unsupported gpu architecture 'compute_11'

由於項目需要,在ubuntu service 14.04 下搭建 OpenCL +OpenCV 環境, 前期安裝了 CUDA7.0 ,GPU爲 NVIDIA TITAN 。


問題描述:
按照網上教程安裝OpenCV ,在make 時出現錯誤,錯誤提示如下:錯誤提示

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....


解決方法:
百度無果,求助萬能谷歌。有高人回答如下:

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 ..

然後,這個問題就奇蹟般的解決了。
總結:

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

This let me install opencv-2.4.9.

另外一種解決方案:

Another option. Ubuntu 14.04, GTX Titan X, opencv-2.4.10

cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_TIFF=ON -D BUILD_EXAMPLES=ON -D CUDA_GENERATION=Auto -D BUILD_NEW_PYTHON_SUPPORT=ON ..

I also applied the patch:
https://github.com/Itseez/opencv/pull/3886/files
but I’m not sure whether it ended up being needed. I had tried with and without >CUDA_GENERATION=Maxwell but Maxwell isn’t detected. I did not try >CUDA_GENERATION=Auto prior to the patch, that’s why I don’t know for sure.

轉載

https://blog.csdn.net/sysuwuhongpeng/article/details/45485719

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章