CL_OUT_OF_RESOURCES in clEnqueueNDRangeKernel

Hello,

I’ve realized that sometimes clEnqueueNDRangeKernel returns CL_OUT_OF_RESOURCES.
I’ve a kernel with a lot of operations in double loops. If the loops have small limits all runs ok, but if I change the limits to others biggers it returns CL_OUT_OF_RESOURCES.

Anyone know the reason? Is it possible a time out relationship?
Any help will be sincerely appreciated.

Thanks

Assuming you’re not out of memory, usually it means your code crashed on the card.

Try calling clFinish() after every clEnqueueNDRangeKernel call to see which one is actually causing the crash (because jobs are queued, otherwise you have no way of knowing which one actually crashed).