AnsweredAssumed Answered

Error in compile-time arguments with AMD

Question asked by on Oct 17, 2013
Latest reply on Oct 21, 2013 by himanshu.gautam

This is regarding compile time argument in openCL. I have an array of constants of fixed size, and I am passing it as compile-time argument, as follows:


And in the Kernel, I am reading it as,

__kernel void Smoothing(__global const float *in, __global float *out) { float chnWeight[] = {COEFF}; } 

This way, using intel-SDK, I am getting a considerable amount of performance benefit, compared to passing the Coefficients as another argument to the kernel.

The problem is in AMD, this is not getting compiled. I am getting the following error :

0.2f: Catastrophic error: cannot open source file "0.2f" 1 catastrophic error detected in the compilation of "0.2f". Compilation terminated. 

I understand that in AMD (comma) is also taken as a separating character for the compile time arguments, and this is causing the error.


I am using OpenCL 1.2 AMD-APP (1311.2)


Any help to solve this problem will be appreciated. Thanks in advance.