cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

geneva
Journeyman III

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

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.

0 Likes
3 Replies
ravkum
Staff

Hi, Looks like a bug. Could you please provide the full reproducible source code (including the host)?

0 Likes
roger512
Adept II

as far as i know goto isn't available in OpenCL.

0 Likes

it is available. but section 6.9.l of specification states Whether or not irreducible control flow is illegal is implementation defined.

0 Likes