Ask Your Question
0

Runtime error building opencl kernel

asked 2013-10-08 09:01:51 -0600

arm gravatar image

On Ubuntu 12.04 LTS with NVidia GeForce 8 series GPU card, I am getting runtime error from the ocl-facedetect sample of OpenCV 2.4.6.1 building the kernel required for the sample:

$./ocl-example-facedetect -t haarcascade_frontalface_alt.xml -i friends.jpg In image read loop0 ~~~~ Loading convertC3C4 Building source:./convertC3C4_GeForce 8600 GT -D GENTYPE4=uchar4.clb ~~~~ Loading RGB2Gray Building source:./RGB2Gray_GeForce 8600 GT -D DEPTH_0.clb ~~~~ Loading resizeLN_C1_D0 Building source:./resizeLN_C1_D0_GeForce 8600 GT .clb ~~~~ Loading set_to_without_mask Building source:./set_to_without_mask_GeForce 8600 GT -D GENTYPE=int.clb ~~~~ Loading calc_sub_hist_D0 Building source:./calc_sub_hist_D0_GeForce 8600 GT .clb clCreateProgramWithSource status=0

clBuildProgram status=-11

BUILD LOG (0) Error: unsupported operation OpenCV Error: Gpu API call (CL_BUILD_PROGRAM_FAILURE) in openCLGetKernelFromSource, file /home/ovuser/OpenCV/opencv-2.4.6.1/modules/ocl/src/initialization.cpp, line 664 terminate called after throwing an instance of 'cv::Exception' what(): /home/ovuser/OpenCV/opencv-2.4.6.1/modules/ocl/src/initialization.cpp:664: error: (-217) CL_BUILD_PROGRAM_FAILURE in function openCLGetKernelFromSource

It seems the OpenCL compiler is unable to build calc_sub_hist_D0 kernel required by the face detect sample. I have put some verbose messages and attached kernel source causing the problem. Can someone point out what's wrong with the kernel source?

image description

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-10-10 14:03:19 -0600

arm gravatar image

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!

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-10-08 09:01:51 -0600

Seen: 966 times

Last updated: Oct 10 '13