Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Build Opencv 2.4.11 with Cuda 7.5 problem

Hello,

The systems I use are Windows 10 with Nvidia Getforce 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. The image is the steps I tried.

image description

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!

Build Opencv 2.4.11 with Cuda 7.5 problem

Hello,

The systems I use are Windows 10 with Nvidia Getforce 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. The image Here is the steps I tried.

image description

  • 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!