AnsweredAssumed Answered

OpenCL Error:E010:Irreducible ControlFlow Detected (error on Radeon, work on GeForce and CPU)

Question asked by geneva on Dec 7, 2013
Latest reply on Jan 23, 2014 by nou

My OpenCL code work on CPU Core i5-750, work on GPU GeForce 9800GT, but don't work on GPU Radeon 280X!

 

   status=clBuildProgram(program, 1,devices,NULL,NULL,NULL);

 

clBuildProgram return status with error

Error:E010:Irreducible ControlFlow Detected

 

How I can disable Irreducible ControlFlow Detection?

 

Example code which work on CPU, work on Geforce 9800GT, but crush on 280x.

 

void qwe(){
    int CUR = 2;
    int i=0;
    function_recur:;   
    if(i>=300)
        goto continuefor;
    i++;
    if (CUR == 0)
        goto endCUR;
    CUR--;
    goto function_recur;   
    returning:;
    CUR++;
    endCUR:;
    continuefor:;
    if (CUR <2)
        goto returning;
}

 

PS

 

when I start code with option

 

    const char options[]="-cl-strict-aliasing";
    status=clBuildProgram(program, 1,devices,options,NULL,NULL);

 

"qwe()" will work correct

but my program greatly bigger and "-cl-strict-aliasing" don't help.

Outcomes