normalize creating some compiler errors ?!?

Hi all,

I’m trying to use the normalize function and have no idea why but my kernel doesn’t compile…
As soon as I remove the normalize line then everything’s fine…

float4 Dir = (float4)(pos_org[i].x, pos_org[i].y, pos_org[i].z, 0);
//float4 ND = normalize(Dir); <= uncomment that and allocate NDir to v instead and BOOM..
v = Dir;

note that v is also a float4…

I seriously have no idea what’s going on here… is there any compiler option I have to precise ?
Or would that not be available in my driver ?
Note that I use OpenCL 1.1
My GPU is a AMD Radeon HD 6770M

Also… I can’t get the exact compiler error…
I use the c++ bindings and haven’t found a way to get the errors list…

err =, "-cl-fast-relaxed-math");

o_Program is a cl::Program

Thanks in advance !

forget the compiler error section I’m now able to display them with :

std::cout << "Build Status: " << o_Program.getBuildInfo<CL_PROGRAM_BUILD_STATUS>(devices[0]) << std::endl;
std::cout << "Build Options:	" << o_Program.getBuildInfo<CL_PROGRAM_BUILD_OPTIONS>(devices[0]).c_str() << std::endl;
std::cout << "Build Log:	 " << o_Program.getBuildInfo<CL_PROGRAM_BUILD_LOG>(devices[0]).c_str() << std::endl;

The log gives me :
calclCompile failedError: Creating kernel … failed!

hum… I’ve created my own normalize macro for the time being but it’s a bit annoying…