Visible to Intel only — GUID: GUID-20D66A6F-F1B6-47C5-AEAA-AF6701510B45
Visible to Intel only — GUID: GUID-20D66A6F-F1B6-47C5-AEAA-AF6701510B45
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 pvc" source.c
AOT Compiler Options for OpenMP
Intel® Data Center GPU Max Series:
icx -fiopenmp -fopenmp-targets=spir64_gen -Xs "-device pvc" 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.