AnsweredAssumed Answered

Relational built-in function 'select' causes "Segmentation fault"

Question asked by domjoh on Nov 28, 2014
Latest reply on Dec 2, 2014 by domjoh



I'm trying to use the select built-in function in the following kernel :


__kernel void Kernel1(__global uchar4 *a,

                   __global uchar4 *b,

                   __global uchar4 *c,

                   __global uchar *seuil)


    int g_x = get_global_id(0);

    int g_y = get_global_id(1);

    int index = g_y*256 + g_x;

    c[index] = select((uchar4)0, (uchar4)1, (a[index] - b[index] > *seuil));



but it crashes my application down when running on my AMD GPUs with a meaning less error message (at least for me) when it works just fine on Intel CPU and Nvidia GPUs.

When I try to analyse the kernel code within CodeXL, it crashes at the first compilation attempt, exiting CodeXL with a "Segmentation fault" error.


Does any one have any idea of what the problem could be ?


Thank you.