Build Opencv 2.4.11 with Cuda 7.5 problem

asked 2016-08-01 21:38:21 -0600

ChiaYu gravatar image

updated 2016-08-02 00:11:28 -0600

Hello,

The systems I use are Windows 10 with Nvidia Geforce 940M, the compute capability is 5.0. The version of Visual Studio is 2013, Opencv is 2.4.11, and the Cuda's version is 7.5. I use the code fragments below to test if the Opencv with Cuda work successfully.

  • cv::gpu::getCudaEnabledDeviceCount() return 1.

  • cv::gpu::DeviceInfo dev_info(0),dev_info.isCompatible() return false.

Some says the return value is false might be the wrong compute capability I set when I built the Opencv with Cuda. But I'm sure I set the CUDA_ARCH_BIN is 5.0 and the CUDA_ARCH_PTX is blank when I built it. Here is the steps I tried.

  • Set the Cuda's bin path and the TBB's bin path to the environment value In the Cmake
  • BUILD_DOCS and BUILD_EXAMPLES un-checked
  • WITH_TBB, WITH_OPENCL, WITH_CUBLAS, WITH_CUDA, and WITH_CUFFT checked
  • CUDA_ARCH_BIN sets to 5.0
  • CUDA_ARCH_PTX sets to blank
  • CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE un-checked
  • Add directories to TBB_INCLUDE_DIRS, TBB_LIB_DIR, and TBB_STDDEF_PATH

I don't know if the steps I tried are wrong or not. I have stuck for this problem for a few days and rebuilt the Opencv with Cuda for a few times. Hope someone can help me to handle this problem.

Thank you so much!

edit retag flag offensive close merge delete

Comments

for various reasons, can you please replace the image with a text version ?

berak gravatar imageberak ( 2016-08-01 23:55:58 -0600 )edit

thank you !

berak gravatar imageberak ( 2016-08-02 00:13:02 -0600 )edit