Ask Your Question
0

No GPU Support(With OpenCv 2.4.8&CUDA5.5)

asked Feb 13 '14

yfy gravatar image

updated Feb 14 '14

berak gravatar image

The error is always that "The library is compiled without CUDA support". However, I used CMake and compile BUILD_ALL project and get new .dll and .lib files in VC2010 path. Can someone tell me the whole way of compiled library with CUDA? Or mainly the specific step. (I found every time I use CMake the WITH_CUDA is always already been checked. Is that not normal?)

Preview: (hide)

1 answer

Sort by » oldest newest most voted
2

answered Feb 14 '14

updated Feb 14 '14

Hello, You have to install CUDA toolkit first, then setting VC directories to CUDA include files, reference directories, .lib files (in VC 10) for all projects (just by opening any VC 10 project, go to Property page, Microsoft.Cpp.Win32.user properties). After that, all the VC projects can see the header and .lib files of CUDA, then you can run cmake to generate OpenCV solution and it will automatically set details for building OpenCV libraries with CUDA (you may want to limit to CUDA architecture 2.0 for building time, because by default OpenCV will be built with CUDA architecture 1.0, 1.1, 2.0, 3.0, 3.5 and this will take very very long time (>5 hours), even with a very strong core i7 machine, just because the compiler of CUDA can not work in parallel mode). I suggest to build OpenCV with latest TBB library for utilizing multicores machine when programming with OpenCV. For running CUDA program, you have set the environment variable PATH to CUDA's .dll files, these files are also needed when you run your program on another machine. It is also surprised that you can install CUDA toolkit and write CUDA programs on a non CUDA machine and run that programs on a real CUDA system after. Hope this help.

Preview: (hide)

Question Tools

Stats

Asked: Feb 13 '14

Seen: 1,800 times

Last updated: Feb 14 '14