cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

hojin
Journeyman III

Problem in binary size

Hi.

I am developing some application with AMD OpenCL.

But as I compiled certain small CL code, its binary size was too big, so program was down.

When I use NVIDA or Intel OpenCL Compiler, it works well.

While the size of binary of compiled by Intel is 19kB, that of AMD is 2MB.

Can you check?

Here is a simple example

typedef struct

{

          short block[12][64];

}MB_information;

__kernel main()

{

          MB_information MB;

          Saturate(MB.block);

}

void Saturate(short* Block_Ptr)

{

          Block_Ptr = val;

}

Thank you.

0 Likes
4 Replies
binying
Challenger

I test this modified kernel which works. Hope this is helpful to you. I am using win7, sdk 2.7 and the latest driver on A6

typedef struct

{

          short block[12][64];

}MB_information;

__kernel test(__global int* in_out)

{

          MB_information MB;

          Saturate(MB.block[3]);

}

void Saturate(short* Block_Ptr)

{

          Block_Ptr[3] = 5;

}

0 Likes

can u try this again?

typedef struct

{

          short block[12][64];

}MB_information;

typedef struct

{

          int block_count;

}idct_new_params;

typedef struct 

{

}picture_params;

void Saturate(short* Block_Ptr)

{

                    Block_Ptr[63] ^= 1;

}

__kernel void idct_new(idct_new_params inp, picture_params pp, __global MB_information * MBinfo, __global unsigned char* frf, __global unsigned char* brf, __global unsigned char* crf)

{

                    //int MBA=inp.MBA;

                    //int MBA= get_global_id(0);

                    int block_count=inp.block_count;

                    //MB_information MB=MBinfo[MBA];

                    MB_information MB=MBinfo[0];

 

                    /* copy or add block data into picture */

                    for (int comp=0; comp<block_count; comp++)

                    {

                              Saturate(MB.block[comp]);

                    }

          return;

}

2012-10-12 19 52 48.png

0 Likes

Please Check generated ir

0 Likes