cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

doqtor
Adept I

Running OpenCL 2.0 kernel loaded from binary returning wrong results

The problem is when using logarithms. See below example:

__kernel __attribute__((reqd_work_group_size(256, 1, 1)))

void test(__global double *a, __global double *c)

{

    int local_id = get_local_id(0);

    c[local_id] = log(a[local_id]);

}

Array "a" is filled with numbers from 0 to 255:

double a[256] = {0...255};

Then the first 3 results are OK but then the rest is wrong:

wrong result [3]: -1.74441e+136 <> 1.09861

wrong result [5]: 1.37262 <> 1.60944

wrong result [6]: -1.74441e+136 <> 1.79176

wrong result [7]: -2.68156e+154 <> 1.94591

wrong result [9]: 2.07944 <> 2.19722

wrong result [10]: 2.06577 <> 2.30259

...

wrong result [255]: 4.84812 <> 5.54126

The same kernel works fine when built online or when built as OpenCL1.x online or loaded from binary.

0 Likes
1 Solution

Hi,

Here is an update. It seems that the above issue is no longer reproducible with the latest internal build of the Catalyst driver. So, please keep your patience till that driver version is publicly available.

Regards,

View solution in original post

0 Likes
10 Replies