Intel® oneAPI DPC++/C++ Compiler
Developer Guide and Reference
A newer version of this document is available. Customers should click here to go to the newest version.
fopenmp-device-code-split, Qopenmp-device-code-split
Enables parallel compilation of SPIR-V* kernels for OpenMP offload Ahead-Of-Time compilation.
Syntax
| Linux: | -fopenmp-device-code-split=[triple=]per_kernel | 
| Windows: | /Qopenmp-device-code-split:[triple=]per_kernel | 
Arguments
| triple | Is a target device name, such as spir64, spir64_gen, etc.. If triple is specified, code splitting will only be applied for that specific target. | 
| per_kernel | Creates a separate device code module for each SYCL* kernel. Each device code module will contain a kernel and all its dependencies, such as called functions and used variables. | 
Default
| OFF | No device code splitting of SPIR-V* kernels occurs for OpenMP offload Ahead-Of-Time compilation. | 
Description
This option enables parallel compilation of SPIR-V* kernels for OpenMP offload Ahead-Of-Time compilation.
To specify the maximum number of parallel actions to perform, use option -fopenmp-max-parallel-link-jobs (Linux) or /Qopenmp-max-parallel-link-jobs (Windows).
When OpenMP offloading is enabled, this option only applies to device-specific compilation.
IDE Equivalent
Alternate Options
None
Examples
The following shows examples of using this option.
Linux
icpx -fiopenmp -fopenmp-targets=spir64_x86_64 -fopenmp-device-code-split=per_kernel -fopenmp-max-parallel-link-jobs=4 file.cpp
Windows
icx /Qiopenmp /Qopenmp-targets:spir64_x86_64 /Qopenmp-device-code-split:per_kernel /Qopenmp-max-parallel-link-jobs:4 file.cpp