0
votes

I am running the face detect sample with opencl acceleration on Ubuntu 12.04 and seeing runtime error when its trying to build the kernel for integral cols for NVIDIA GeForce 8600 GT graphics card.

Building source: ./integral_cols_D4_GeForce 8600 GT .clb clCreateProgramWithSource status=0 source= all_build_options= clBuildProgram status=-42 OpenCV Error: Gpu API call (CL_INVALID_BINARY) in openCLGetKernelFromSource, file /home/ovuser/OpenCV/opencv-2.4.6.1/modules/ocl/src/initialization.cpp, line 668 terminate called after throwing an instance of 'cv::Exception' what(): /home/ovuser/OpenCV/opencv-2.4.6.1/modules/ocl/src/initialization.cpp:668: error: (-217) CL_INVALID_BINARY in function openCLGetKernelFromSource

3

3 Answers

0
votes

From the OpenCL standard:

CL_INVALID_BINARY if program is created with clCreateWithProgramWithBinary and devices listed in device_list do not have a valid program binary loaded.

Your error output however says that the program was built from source. There seems to be a bug in early nvidia sdk and driver version. As you have a pretty old card is suppose that your dirver isn't newer. Try to install the latest nvidia cuda toolkit with the corresponding driver.

0
votes

Sadly with NVidia, you get this error with some kinds of source compilation error like undefined functions.

The best way to debug is to install an OpenCL SDK that supports CPU (AMD or Intel) and try it there: the error message should be better there.

Seb

0
votes

Replacing GeForce 8600 GT with Quadro 600 board fixed the issue. I am quite new to OpenCL but It turned out GeForce 8600GT device does not support DOUBLE_SUPPORT hardware extension as well as atomic operations which are essential for some of the OpenCL kernels used in face detect sample. Hope this helps others!