I'm getting CL_INVALID_WORK_GROUP_SIZE, but my local work size is 299 and my max supported WORK_GROUP_SIZE is 1024.
According to the documentation:
CL_INVALID_WORK_GROUP_SIZE if local_work_size is specified and number of work-items specified by global_work_size is not evenly divisable by size of work-group given by local_work_size or does not match the work-group size specified for kernel using the attribute((reqd_work_group_size(X, Y, Z))) qualifier in program source.
in my case I have
size_t globalWorkSize[2] = { 299, 299 };
size_t localWorkSize[2] = { 299, 299 };
mErr = clEnqueueNDRangeKernel(mCmdQueue, mKernel[0], 2, nullptr,
globalWorkSize, localWorkSize, 0, nullptr, nullptr);
It seems to me I have 299^2 work groups of 1 work item each, I don't get where the problem is to be honest.
The question is why am I getting that error?