Runtime error “CL_INVALID_KERNEL_NAME” when calling ocl::StereoBeliefPropagation module in OpenCV 2.4.5 (Bug #3078)
I am trying to use ocl::StereoBeliefPropagation class for dense stereo correspondence, but the program is terminated at runtime with the following message:
" OpenCV Error: Gpu API call (CL_INVALID_KERNEL_NAME) in openCLGetKernelFromSource, file D:\OpenCV\modules\ocl\src\initialization.cpp, line 647
terminate called after throwing an instance of 'cv::Exception' what(): D:\OpenCV\modules\ocl\src\initialization.cpp:647: error: (-217) CL_INVALID_KERNEL_NAME in function openCLGetKernelFromSource "
I edited the file initialization.cpp, added a std::cout just before the indicated line, recompiled OpenCV and now the message "Trying to access kernel convert_to_S3_C1_D0..." is printed just before the fatal exception is raised. Several other kernel names are similarly printed before the exception, without causing any problems. Apparently, something is wrong with a call to "convert_to_S3_C1_D0" kernel.
I own a GeForce GTX 560 Ti GPU with updated drivers and the CUDA Toolkit 5.0 installed, in a PC with Intel Sandy Bridge CPU. I am compiling OpenCV in 32-bit Windows XP, using GCC 4.7.1 (MinGW), with neither IPP or OpenMP enabled, but with all SSE options turned on.
Related issues (Add)