Visible to Intel only — GUID: GUID-5E81DE48-71FA-4FA1-B319-E3132DCAD6A5
Visible to Intel only — GUID: GUID-5E81DE48-71FA-4FA1-B319-E3132DCAD6A5
Ahead-Of-Time Compilation
The overhead of JIT compilation at runtime can be avoided by Ahead-Of-Time (AOT) compilation. With AOT compilation, the binary will contain the actual assembly code of the platform that was selected at compile time instead of the SPIR-V intermediate code. The advantage is that we do not need to JIT compile the code from SPIR-V to assembly during execution, which makes the code run faster. The disadvantage is that now the code cannot run anywhere other than the platform for which it was compiled.
When compiling in Ahead-Of-Time (AOT) mode for an Intel® GPU, one need to add an extra compiler option (-Xs) to indicate the specific GPU target.
AOT Compiler Options for SYCL
Intel® Data Center GPU Max Series:
icpx -fsycl -fsycl-targets=spir64_gen -Xs "-device 0x0BD5 -revision_id 0x2f" source.c
AOT Compiler Options for OpenMP
Intel® Data Center GPU Max Series:
icx -fiopenmp -fopenmp-targets=spir64_gen -Xs "-device 0x0BD5 -revision_id 0x2F" source.c
Notes
The compiler options shown above can also be used when compiling OpenMP Fortran programs in AOT mode (using ifx).
In JIT-mode, the Intel® Graphics Compiler knows the type of the hardware and will adjust automatically. The extra -revision_id option is only needed for AOT mode.