I’m currently developing a simple blur on an greyscale image.
Currently I’m getting an CL_OUT_OF_RESOURCES on my first clEnqueueReadBuffer call.
After this call every clEnqueueWriteBuffer and clEnqueueReadBuffer fails with that error.
The kernel execution and the wait for finish is successful.
I used to question the maximum allocation size and took buffers that fit into that size but when I was doing that the computer crashed.
Now I’ using a much smaller size and the computer doesn’t crash but the program is not successful, too.
Can anybody tell me how I should find that failure?
OUT_OF_RESOURCES with kernels is often due to memory accesses outside of allocated buffers. Make sure that your buffers are as large as you believe they are, and that you read and write to/from where you intended.
Not writing tmp means that the compiler will optimize away stuff which only purpose is to create tmp, which in your case it appears to be the nested for-loops. The only memory access in there I could find is
I found the failure in the DevDrivers releasenotes.
When the kernel needs to long to execute the graficcard crashes or the known CL_OUT_OF_RESSOURCES occures.
I think I suffer from the same problem. My question is, assuming that the timeout is the cause for the problem, how did you resolve this problem in your case?