GPU: Hawaii (R9 295x2)
Code simply like this:
kernel void fit(global const float* a, global const float* b, float c, float d)
queue_t default_queue = get_default_queue();
enqueue_kernel(default_queue, CLK_ENQUEUE_FLAGS_WAIT_KERNEL, ndrange_1D(1),
kernel2(a, b, c, d);
The program exits as:
Error in clEnqueueNDRangeKernel (-5): CL_OUT_OF_RESOURCES
Note I runs only for ndrange_1D(1), I don't know why out of resources. If enquene kernel2 from host side (parameters a-d are same), no problem.
How to debug this issue?
It would be difficult to get more information on this kind of run-time errors. Also, kernel debugging (CodeXL) is not supported at this moment for OpenCL 2.0 kernels. If you can share a repro (please mention the setup details also), we could take a look and forward it to concerned team, if needed.