OCL error - assertion failed
Hi,
I´m working on OpenCV 2.4.4(C++), built using CMAKE with OCL support.
GPU - NVIDIA GeForce 9800 GT
CPU - AMD Opteron 252 (2 processors)
Code compiles with no errors, but during runtime I get this error (tried surf_matcher and squares samples):
OpenCV Error: Assertion failed ((localThreads[0] <= clCxt->impl->maxWorkItemSize s[0]) && (localThreads[1] <= clCxt->impl->maxWorkItemSizes[1]) && (localThreads[ 2] <= clCxt->impl->maxWorkItemSizes[2]) && ((localThreads[0] * localThreads[1] * localThreads[2]) <= kernelWorkGroupSize) && (localThreads[0] * localThreads[1] * localThreads[2]) <= clCxt->impl->maxWorkGroupSize) in unknown function, file . .....\modules\ocl\src\initialization.cpp, line 553
Also, while trying to run CUDA code for surf_matcher, I got runtime error saying:
"Too many resources requested for launch."
Anyone encountered this kind of problems? Could it be a GPU issue or OpenCV/OpenCL installation related? Thanks.
It is GPU issue. Try to decrease input source resolution.
I´ve tried with smaller images if that´s what you meant, but did not help with OCL or CUDA. There are also some restrictions on how small the image can actually be so I could not try some really small values. I have forgot to mention, CUDA worked with some samples though, but not with surf_matcher that I need.
Could you specify exactly which function throws this error?
I am using surf_matcher example, error occurs while using: surf(img1, oclMat(), keypoints1GPU, descriptors1GPU); . And happens inside cv::ocl::openCLVerifyKernel function of initialization.cpp file. Hope that helps.
From what I can see, kernelWorkGroupSize is 128, and localThreads[0,1,2] - 256,1,1. Which seems to be the problem. My GPUs MAX_WORK_GROUP_SIZE is 512, so I am not sure are those numbers related and can I fix it somehow.
So, if it is a GPU problem, is there a way to fix it?
Did you find a fix to this? I have the same problem.
Any fix to this? I have the same problem