I recently converted my code to be dependant on event queues rather than doing a clFlush() everytime. I therefore modified the relevant arguments. The following occurs with my NVIDIA SDK on my GTX 560.

I am now getting a confusing error when I try to read back the information that I have calculated: I get a CL_INVALID_KERNEL_ARGS when I try to run clEnqueueReadBuffer. I haven't changed any of the args or configuration.

Even more confusing, is that my kernel works fine when the first two kernel args are __global. When I switch to an identical kernel which has __constant args I get this error at runtime (CL_INVALID_KERNEL_ARGS).

Can anyone advise as to what might be the issue?

The same code runs fine on the Intel SDK and Segfaults on the AMD SDK.