alariq

Compiler crash on a simple kernel

Discussion created by alariq on Nov 9, 2012
Latest reply on Nov 15, 2012 by alariq

Hello, All

 

I have a simple kernel which makes open cl api to crash on

clBuildProgram(); 

i call it lioke this:

clBuildProgram(program, 1, device, 0, NULL, NULL); // <- crash occures inside this call. somewhere inside aticaldd.dll

This crash happens only if i build my program in Release mode.

However KernelAnalyzer2 also can't build this kernel. It just can't finish to build it.

I suppose that crash occures somewhere at the code generation stage, because if i make mistake in the kernel - there is no crash.

I have Catalyst 12.8

 

Here is the kernel itself:

 

#pragma OPENCL EXTENSION cl_khr_byte_addressable_store : enable

 

#define pixel    uchar

 

struct _OCL_BUF_INFO {

    int i_mb_width;

    int i_mb_height;

    int i_stride;

    float qp;

} ;

typedef struct _OCL_BUF_INFO OCL_BUF_INFO;

 

__kernel

//__attribute((reqd_work_group_size(64,1,1)))

void testKernel(

    __global const pixel*     fenc_plane,

    OCL_BUF_INFO         h,

    __global uchar*     dbgout)

{

    const size_t li = get_local_id(0);

    const int xy = li % 16;

    //uchar fenc[16] = {0};

    uchar16 fenc;

    fenc = vload16(0, fenc_plane );

 

    for(int i=0;i<16;++i)

        dbgout[i + 16*xy] = ((uchar*)&fenc)[i];  // this line causes issue, if i'll change fenc type to: uchar fenc[16] everything is ok.

 

    return;

}

 

 

 

does
Détecter la langue » English

Outcomes