cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

adminc
Journeyman III

Possible Bug with AMD's OpenCL compiler

My system is freezing when I attempt to compile the attached kernel.  I also tried running the kernel in CPU mode and the system did not freeze.  The infinite while loop makes X stop responding and requires me to reboot my system.

I am running Ubuntu 10.10 64bit with the 11.5 Driver.  I am using the 2.4 SDK as well.

 

Could someone else confirm this or is there a mistake I am making?  Note: this freezes during the compile; it never actualy gets to execute.

 

 

__kernel void start(__global int * a, __global int * b, __global int * c) { int i = get_global_id(1); while(1) c = a + b; }

0 Likes
5 Replies
himanshu_gautam
Grandmaster

It is expected that this kernel should hang your display as GPU is inside an infinite loop and cannot refresh the display. On CPU  the display will not hang as kernel runs on CPU.

0 Likes

Originally posted by: himanshu.gautam It is expected that this kernel should hang your display as GPU is inside an infinite loop and cannot refresh the display. On CPU  the display will not hang as kernel runs on CPU.

 

 

Yes, this would hang the GPU, however, I don't beleive it ever executes.  The code segment below is the last call I make before the system crashes, specifically the clBuildProgram() call.

printf("Compiling...\n");fflush(stdout); status = clBuildProgram( program, nDevices, devices, "", NULL, NULL); if(status != CL_SUCCESS) { char buf[1024]; CLCHECK( clGetProgramBuildInfo( program, devices[0], CL_PROGRAM_BUILD_LOG, sizeof(buf), buf, NULL) ); printf("BUILD LOG:\n%s\n", buf);fflush(stdout); } CLCHECK(status);

0 Likes

Do you mean you are not able to compile that kernel and your app crashes at clBuildProgram? 

I am able to compile that kernel at my end with internal libraries. So i guess it is fixed internally.

0 Likes

That is correct; it crashes at clBuildProgram.  I have two devices in my system: my 5870 which is found when I specify CL_DEVICE_TYPE_GPU, and my Core 2 Duo which is found on CL_DEVICE_TYPE_CPU.

 

When I compile on the CPU, the my program compiles the kernel successfully, runs it and spins until I terminate the program.  When I compile on the GPU the clBuildProgram() call causes my X to stop responding, (it ignores keyboard / mouse input).

 

Would it be possible to tell if this is actually a bug on the current Driver Im using or something else wrong with my system?

0 Likes

Did you ever get this problem sorted out, because I am experiencing something similiar with one of my kernels. 😕

0 Likes