OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1718 Discussions

is this a bug with intel opencl compiler?

Weibin_T_
Beginner
427 Views

 

    My project work well if i compile it from opencl source file(test.cl) with clCreateProgramWithSource function. and save the cl program binary into an ir file(test.ir). When i recompile the cl program with clCreateProgramWithBinary , it gets an error while clBuildProgram is called.
     The same code works well both on NVIDIA and AMD GPU platforms, except the intel mic card(5110p).
     Is there something wrong with my code or intel opencl sdk?
     This problem has trapped me for a long time, can anyone help me? It is very important for me, thank you!

comile command:
/opt/intel/bin/icpc -g -o test  -I/opt/intel/opencl-sdk/include -L/opt/intel/opencl/lib64 -lOpenCL *.cpp

run command: ./test test.cl -debug
output:
 CL_PLATFORM_NAME:      Intel(R) OpenCL
 CL_PLATFORM_VERSION:   OpenCL 1.2 LINUX

run command: ./test test.ir
output:
 CL_PLATFORM_NAME:      Intel(R) OpenCL
 CL_PLATFORM_VERSION:   OpenCL 1.2 LINUX
 Error CL_INVALID_PROGRAM in oclLogBuildInfo Call !!!
0 Kudos
1 Solution
Yuri_K_Intel
Employee
427 Views
Hi Weibin T, What is the purpose of saving a binary with one additional byte? oclTest_0.cpp, Line 281: binary_size++; Commenting this line fixes the issue. Thanks, Yuri

View solution in original post

0 Kudos
2 Replies
Yuri_K_Intel
Employee
428 Views
Hi Weibin T, What is the purpose of saving a binary with one additional byte? oclTest_0.cpp, Line 281: binary_size++; Commenting this line fixes the issue. Thanks, Yuri
0 Kudos
Weibin_T_
Beginner
427 Views

Thank you for your tips.

I have fix it.

 

0 Kudos
Reply