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.
1663 Discussions

OpenCL binary "IR" output different for every build

allanmac1
Beginner
248 Views

Each time you recompile an OpenCL input file and build an intermediate binary with the "-ir=<file>" switch there is a new timestamp/GUID/something  buried in the binary.

The same input file should generate the same binary output (modulo the same workstation, compiler, driver, etc.).

I really wish this wasn't happening as it's not very friendly to version control systems.

timestamp.png

This is just for the .IR output option and I don't know if it also occurs with the SPIR-V output options.

0 Kudos
7 Replies
Jeffrey_M_Intel1
Employee
248 Views

Thanks for this report.  I'm investigating and will get back to you within a few days.

allanmac1
Beginner
248 Views

Unchanged kernel binaries are still generating a unique ID on every recompile.

Is there a good engineering reason for this?  It's not very version control friendly.

         mov      (1|M0)         null<1>:ud    <RANDOM>:ud  <--- first line of kernel

 

Ben_A_Intel
Employee
248 Views

Allan M. wrote:

Unchanged kernel binaries are still generating a unique ID on every recompile.

Hello,

Are you generating your kernel binaries using the offline compiler or some other mechanism?  If you're using the offline compiler, which version are you using, and what is your command line?

Thanks!

allanmac1
Beginner
248 Views

I'm using ioc64:

Kernel Builder for OpenCL API - compiler command line, version 6.3.0.1904

Command line:

ioc64 -cmd=build -bo="-cl-std=CL1.2 -cl-single-precision-constant -cl-denorms-are-zero -cl-mad-enable -cl-no-signed-zeros -cl-fast-relaxed-math -cl-kernel-arg-info" -device=gpu -input=foo.pre.cl -ir=foo.pre.ir -asm

 

Ben_A_Intel
Employee
248 Views

Thanks, I'm able to reproduce the problem and I'm trying to figure out where that extra instruction is coming from.

Ben_A_Intel
Employee
248 Views

Quick update: We figured out where the extra instruction is coming from (long story) and are working on a fix.

allanmac1
Beginner
248 Views

Great, thanks!

Reply