PDA

View Full Version : OpenCL Error:E010:Irreducible ControlFlow Detected



Geneva
12-07-2013, 11:11 AM
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()" work correct
but my program greatly big and "-cl-strict-aliasing" don't help.