Compiled binaries

Compiled binaries

Hi!

Saving compiled binaries does not seem to work with the current build of Intel Open CL drivers. It appears the driver stores the source files (if judging by the size). Is this as designed? Are there any changes planned in the future?

Thanks!
Atmapuri

5 帖子 / 0 全新
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项

Hi,

Can you post the code you are using to query the binaries?

Also please attach the binary queried with the CL_PROGRAM_BINARIES?

Thanks,
Evgeny

Dear Evgeny,

The source is big and not in C++. I can only confirm that the same code which correctly loads AMD CPU, AMD GPU, and NVidia GPU binaries recompiles the source code for Intel Open CL on every run. The only thing I change is the device number on the input.

Do you maybe have some sample C++ code which works for this? Then I can go backward and see what the trick is.

I have attached the binary. I double checked that this binary is not recreated between runs. It always loads the same, but building the program takes the same as if though it is making a full compile. I dont separately specify the soruce code anywhere and the result is a functioning code. Next to that the size of binary is 6x less than what AMD is producing. All this leads me think that the binary does not contain compiled code but rather only compressed source of some kind.

Thanks!
Atmapuri

附件: 

Hi,

The file you attached is binary that could be used in clCreateProgramWithBinary.

The C++ code for retriving the binary should look like that:

size_t binarySizeRet = 0;

size_t binarySize = {0};

unsigned char *binary = NULL;

cl_int iRes = clGetProgramInfo(program, CL_PROGRAM_BINARY_SIZES, sizeof(size_t), &binarySize, &binarySizeRet);

binary = new unsigned char[binarySize];

clGetProgramInfo(program, CL_PROGRAM_BINARIES, sizeof(unsigned char*), &binary, NULL);

Evgeny

Hi!

Ok, if this is binary then load times are about as long as if compiling the source code. But only with Intel driver. After I loaded and created the program with binary, I also cal clBuildProgram on the created program. This seems to be required for the program to work with AMD drivers. Should that be OK or what else could be the cause of slowness?

Thanks!
Atmapuri

发表评论

登录添加评论。还不是成员?立即加入