driver falls while kernel is being executed

Hello, I have a problem described upper.

The point is that setting globalWorkSize about 7-8k leads to driver fall. This problem appears on different videocards.
It seems like problem caused by “not correct” working with device memory, but I can’t even imagine what can be wrong.
Does anybode know how to solve it?

What video cards are you using? NVIDIA or ATI?

Are you correctly allocating the right size of device memory buffers?
Is your code somehow attempting to read memory past the end of the memory buffers?

What do you mean by driver fail? Do you get some error code back? Does the kernel take very long time to execute, which may trigger a watchdog timer?

Problem occurs both on ATI and Nvidia.

When this happens, picture dissapears from display (black screen), than get back with message in tray like this: “Videodriver AMD videdriver had failed and was succesfully restored”.

Well, I haven’t an idea how to check memory accesses for correctness.

Is your code somehow attempting to read memory past the end of the memory buffers?

I’m not sure this is possible. Number of work-items less or equals number of elements in array which is being handled.

Does the kernel take very long time to execute, which may trigger a watchdog timer?

Yeah, it can be true. But if it’s so, how long kernel can stay in queue (executing)?
Have we possibilty to turn off watchdog timer?

What OS are you using? If Windows, then this thread might help.
The Official NVIDIA Forums | NVIDIA.
They talk about CUDA, but the OS doesn’t case who’s using the GPU. The time that a kernel may run before getting killed appears to vary, based on my reading of forums and such, but somewhere around 5 to 10 seconds.

There are some general information at

Thanks! I’ll try it!

Well, finally I solved this problem using synchronization between two kernels through clWaitForEvents(). And one more carefully look at mem_obj allocation =)