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

OpenCL binary "IR" output different for every build

allanmac1
Beginner
598 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
598 Views

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

0 Kudos
allanmac1
Beginner
598 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

 

0 Kudos
Ben_A_Intel
Employee
598 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!

0 Kudos
allanmac1
Beginner
598 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

 

0 Kudos
Ben_A_Intel
Employee
598 Views

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

0 Kudos
Ben_A_Intel
Employee
598 Views

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

0 Kudos
allanmac1
Beginner
598 Views

Great, thanks!

0 Kudos
Reply