3 Replies Latest reply on Oct 21, 2013 4:57 AM by himanshu.gautam

    Error in compile-time arguments with AMD

    neebanv@gmail.com

      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:

       -DCOEFF=0.1f,0.2f,0.5f,0.2f,0.1f 

      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.