solution to CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST error

asked 2014-07-07 14:42:01 -0500

mainul gravatar image

Hi,

I am trying to run face detection on a 5 minute 720P video. I am using opencv API and opencl kernels to do my job. When I try to run the program, it runs fine for intial few number of frames. But after, some frames it gives me an error

OpenCV Error: Gpu API call (CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST) in openCLMemcpy2D, file /opencv-2.4.6.1/modules/ocl/src/initialization.cpp, line 466

Sometimes I get this error after processing 200 frames, sometimes I get this error after 2000 frames. Can anyone suggest me why I am facing this error and what could be a possible solution? I searched internet but did not find anythng.

Here is my psuodo code:

Main()
{
for (;;)
{
    grab a frame;
    detectface(frame);
}
}

    detectface(frame)
{
     tranfer frame to oclMatrix;

     while some conditions are true:
      while some conditions are true:
      kernel1; //parameter: one oclmatrix for source, one for output, two temporary ocl matrix for calculation
      kernel2;//parameter: one oclmatrix for source, one for output, one temporary ocl matrix for calculation
      kernel3;//parameter: one oclmatrix for source, one for output, two temporary ocl matrix for calculation
      kernel4;//parameter: one oclmatrix for source, one for output, one temporary ocl matrix for calculation
      end;
     kernel5; //this does the detection and gives a output. parameter: one oclmatrix for source, one for output, 4 temporary ocl matrix for cascade classifier.
     end;

}
edit retag flag offensive close merge delete