Visible to Intel only — GUID: GUID-20F86BF5-54F0-4DDA-872D-8695B4CBF941
Visible to Intel only — GUID: GUID-20F86BF5-54F0-4DDA-872D-8695B4CBF941
fsycl-add-default-spec-consts-image
Enables or disables generation of a copy of every device image that uses a specialization constant, and replaces all instances of that specialization constant with default values defined in the relevant specialization_id variable.
Syntax
Linux: |
-fsycl-add-default-spec-consts-image -fno-sycl-add-default-spec-consts-image |
Windows: |
-fsycl-add-default-spec-consts-image -fno-sycl-add-default-spec-consts-image |
Arguments
None
Default
OFF |
No device image copies are generated and specialization constants are unchanged. |
Description
This option enables or disables generation of a copy of every device image that uses a specialization constant, and replaces all instances of that specialization constant with default values defined in the relevant specialization_id variable.
If a device image does not use a specialization constant, no copy is generated. In this case, SYCL runtime chooses between a new generated device image and the original one depending on whether a specialization constant value was changed from the specified default value in the relevant specialization_id variable.
This option is only useful if used with Ahead of Time (AOT) Compilation.
If you specify -fno-sycl-add-default-spec-consts-image, it disables generation of copies of device images that use specialization constants where all instances are replaced with default values.
When using this option, you must also specify option -fsycl.
For information about available SYCL drivers, refer to Invoke the Compiler.
This option only applies to host compilation. When offloading is enabled, it does not impact device-specific compilation.
IDE Equivalent
Alternate Options
None
Example
Consider the following command:
icpx -fsycl -fsycl-add-default-spec-consts-image ./code.cpp
The above command generates this error:
warning: -fsycl-add-default-spec-consts-image flag has an effect only in Ahead of Time Compilation mode (AOT).
The following command successfully causes generation of device image copies:
icpx -fsycl -fsycl-add-default-spec-consts-image -fsycl-targets=spir64_gen -Xs "-device skl" ./code.cpp
The following command prevents generation of device image copies:
icpx -fsycl -fno-sycl-add-default-spec-consts-image -fsycl-targets=spir64_gen -Xs "-device skl" ./code.cpp