Ask Your Question
0

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

asked 2014-02-13 17:17:25 -0600

yfy gravatar image

updated 2014-02-14 02:00:07 -0600

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?)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2014-02-14 16:52:44 -0600

updated 2014-02-14 16:54:00 -0600

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.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-02-13 17:17:25 -0600

Seen: 1,684 times

Last updated: Feb 14 '14