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.

IGIL vs GEN

Israel_M_
Beginner
402 Views

Hi,

I see that on OS X, Apple CL compiler has an IGIL target. Is IGIL code the same as GEN code?

Is there a way to inspect IGIL/GEN programs resulting from building a CL kernel on OS X? This has been possible possible on Windows and Linux for a while now.

Thank you in advance.

 

0 Kudos
3 Replies
Jeffrey_M_Intel1
Employee
402 Views

I'm no expert on the Apple OpenCL tools, but after researching here I can say that IGIL is not the same as Gen assembler.  It is most likely an intermediate output from the LLVM CLANG frontend.

In theory it may be possible to use Gen assembly kernels to Windows or Linux to run, or to use with our tools.  However, this isn't validated and a more portable format like SPIR/SPIR-V may be a better choice.  Is your goal to bring over a CL kernel built in OS X to Linux or Windows?

0 Kudos
Israel_M_
Beginner
402 Views

Dear Jeffrey,

Jeffrey M. (Intel) wrote:

Is your goal to bring over a CL kernel built in OS X to Linux or Windows?

Fortunately, I have the .cl sources, so portability is not a problem.

I wanted to get better understanding of how my CL code maps to hardware, and I thought getting to read corresponding assembly would be helpful. I will see if I can get Apple CLVM IGILPlugin to produce IGIL source; otherwise, I will use Linux CL SDK to produce GEN source, and hope it is not too much different from what I am getting on OS X. 

0 Kudos
Jeffrey_M_Intel1
Employee
402 Views

Thanks for the clarification.  Please let us know if you find scenarios where our compiler output could be better.

0 Kudos
Reply