使用 CUDA 支持构建 OpenCV [英] Build OpenCV with CUDA support

查看:36
本文介绍了使用 CUDA 支持构建 OpenCV的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 CMake 生成 Visual Studio 2013 解决方案.接下来我尝试构建它,但得到以下错误:

Im use CMake to generate visual studio 2013 solution. Next im try to build it, but get follow error:

构建 NVCC(设备)对象 modules/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'

我尝试使用 cuda 6.5 和 7.0 版本 2.10 和 3.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,但未检测到 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆