使用 CUDA 构建 OpenCV
我正在尝试使用 Visual C++ 2008 Express 版本构建 openCV 库。我从 opencv svn 服务器下载了最新的代码并使用 CMake 2.8 创建项目。我在默认目录中安装了“CUDA Toolkit 32bit”和“NPP Library 32bit”,但每次尝试构建库时,总是出现以下错误:
26>### Assertion failure at line 2135 of ../../be/cg/NVISA/cgtarget.cxx:
26>### Compiler Error in file C:/Users/[...]/AppData/Local/Temp/tmpxft_00000ca4_00000000-19_surf.compute_20.cpp3.i during Code_Expansion phase:
26>### asm m constraint must have simple variable
26>nvopencc ERROR: C:/Program Files (x86)/NVIDIA GPU Computing Toolkit/CUDA/v3.2/bin/../open64/lib//be.exe returned non-zero status 1
26>CMake Error at CMakeFiles/cuda_compile_generated_surf.cu.obj.cmake:256 (message):
26> Error generating file
26> B:/OCV/modules/gpu/Release/cuda_compile_generated_surf.cu.obj
26>Project : error PRJ0019: Ein Tool hat einen Fehlercode aus folgender Quelle zurückgegeben: "Building NVCC (Device) object modules/gpu/Release/cuda_compile_generated_surf.cu.obj"
26>Das Buildprotokoll wurde unter "file://b:\OCV\modules\gpu\opencv_gpu.dir\Release\BuildLog.htm" gespeichert.
26>opencv_gpu - 1 Fehler, 0 Warnung(en)
我正在使用 NVIDIA Geforce GT 540M 在 Acer Aspire 5742g 上构建库我不知道为什么它不想工作。我已经在配备 GTX 280 的 PC 上以相同的方式构建了库。
I am trying to build the openCV libraries with visual c++ 2008 express edition. I downloaded the latest code from the opencv svn server and used CMake 2.8 to create the projects. I installed the "CUDA Toolkit 32bit" and the "NPP library 32bit" in the default directory but everytime I try to build the libraries I always get the following error:
26>### Assertion failure at line 2135 of ../../be/cg/NVISA/cgtarget.cxx:
26>### Compiler Error in file C:/Users/[...]/AppData/Local/Temp/tmpxft_00000ca4_00000000-19_surf.compute_20.cpp3.i during Code_Expansion phase:
26>### asm m constraint must have simple variable
26>nvopencc ERROR: C:/Program Files (x86)/NVIDIA GPU Computing Toolkit/CUDA/v3.2/bin/../open64/lib//be.exe returned non-zero status 1
26>CMake Error at CMakeFiles/cuda_compile_generated_surf.cu.obj.cmake:256 (message):
26> Error generating file
26> B:/OCV/modules/gpu/Release/cuda_compile_generated_surf.cu.obj
26>Project : error PRJ0019: Ein Tool hat einen Fehlercode aus folgender Quelle zurückgegeben: "Building NVCC (Device) object modules/gpu/Release/cuda_compile_generated_surf.cu.obj"
26>Das Buildprotokoll wurde unter "file://b:\OCV\modules\gpu\opencv_gpu.dir\Release\BuildLog.htm" gespeichert.
26>opencv_gpu - 1 Fehler, 0 Warnung(en)
I am building the libraries on my Acer Aspire 5742g with the NVIDIA Geforce GT 540M and I don't know why it doesn't want to work. I already built the libraries in the same way on my PC with a GTX 280.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不是编译最新版本 cuda 的专家
我唯一确定的是cuda 4.0支持VS2010。
下载Cuda工具包4.1并升级到VS2010。
S
I'm not that expert on compiling the latest versions of cuda
The only thing I'm sure about is that cuda 4.0 support VS2010.
Download Cuda tool kit 4.1 and to upgrade to VS2010.
S
确保正确遵循本指南:如何在 Windows 7 上使用 GPU (CUDA) 构建 OpenCV 2.2
Make sure you follow this guide properly: How to Build OpenCV 2.2 with GPU (CUDA) on Windows 7
首先,确保您的 PC 支持 NVIDIA 显卡。其次,确保你的cuda安装正确。
First, make sure that your PC supports NVIDIA graphics. Second, make sure that your cuda installation is correct.