使用CUDA支持构建OpenCV [英] Build OpenCV with CUDA support
问题描述
我使用CMake来生成visual studio 2013解决方案。下一步尝试构建它,但得到跟随错误:
Im use CMake to generate visual studio 2013 solution. Next im try to build it, but get follow error:
构建NVCC(设备)对象模块/ core / CMakeFiles / cuda_compile.dir / src / cuda / Debug / cuda_compile_generated_gpu_mat.cu.obj
Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/Debug/cuda_compile_generated_gpu_mat.cu.obj
nvcc致命:不支持的gpu架构'compute_11'
nvcc fatal : Unsupported gpu architecture 'compute_11'
尝试版本2.10和3.0与cuda 6.5和7.0。
CUDA_ARCH_BIN设置为:1.1 1.2 1.3 2.0 2.1(2.0)3.0 3.5
Im try version 2.10 and 3.0 with cuda 6.5 and 7.0. CUDA_ARCH_BIN set to : 1.1 1.2 1.3 2.0 2.1(2.0) 3.0 3.5
推荐答案
Ubuntu 14.04,GTX Titan X,opencv-2.4.10
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 ..
我还应用了补丁,
,但我不知道它是否最终被需要。我试过和没有 CUDA_GENERATION = Maxwell
但是没有检测到麦克斯韦。我在补丁之前没有尝试 CUDA_GENERATION = Auto
,这就是为什么我不知道。
I also applied the patch,
but I'm not sure whether it ended up being needed. I had tried with and withoutCUDA_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.
这篇关于使用CUDA支持构建OpenCV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!