5 Replies Latest reply on May 30, 2011 11:14 AM by Kamo-chan

    Possible Bug with AMD's OpenCL compiler

    adminc

      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[i] = a[i] + b[i]; }

        • Possible Bug with AMD's OpenCL compiler
          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.

            • Possible Bug with AMD's OpenCL compiler
              adminc

               

              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);