How to set WORK GROUP SIZE?

asked 2018-12-11 03:28:56 -0500

peter_cz gravatar image

updated 2018-12-11 05:35:26 -0500

I have short test program trying to use OpenCL version of functions ...

cv::ocl::setUseOpenCL(true); // enable || disable OpenCL in the processing of UMat

UMat img,gray;
imread("lena30.jpg", 1).copyTo(img);

cvtColor(TIimg, TIgray, COLOR_BGR2GRAY);
GaussianBlur(TIgray, TIgray, Size(5, 5), 1.25);
Canny(TIgray, TIgray, 0, 30);

Unfortunately iat runtime test program complains on workgroupsize...

[ INFO:0] Successfully initialized OpenCL cache directory: /home/root/.cache/opencv/3.4.1/opencl_cache/
[ INFO:0] Preparing OpenCL cache configuration for context: 
OpenCL error CL_INVALID_WORK_GROUP_SIZE (-54) during call: clEnqueueNDRangeKernel('stage1_with_sobel', dims=2, globalsize=512x512x1, localsize=32x32x1) sync=false

How can I set workgroups size and other opencl params before function execution?

edit retag flag offensive close merge delete