cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

KNeumann
Adept II

Driver crashed completely in while loop in kernel

Hi,

I've come across a strange problem which has to do with a while loop in a kernel:

The Kernel function: (runs on GPU)

__kernel void myKernel( ..., unsigned nWidth, ... ) {

     ...

     unsigned g_id_x = get_global_id(0);

     ...

     while( g_id_x < inWidth ) {      // step over never steps over this line

Now, whenever I try executing this code, the application stops responding and I am not able to close it. Also, ending the debugging in VS does not work, it just hangs forever.

When I debug the kernel with gDEBugger I can step into the kernel and continue to the while statement. Then, when I want to step over, it hangs immediately.

When I then try to start another OpenCL Application, the platform can't be accessed, so I guess the whole AMP OpenCL driver hangs due to the bug above.

The only thing left to do is to restart the system. If I do, the system does actually not reboot, but hangs when windows was shut-down and I have to turn off the PC myself (which doesn't happen if I haven't had the bug before).

0 Likes