[SYCL][NewOffloadModel] Add ESIMD Procesing to clang-linker-wrapper.#21449
[SYCL][NewOffloadModel] Add ESIMD Procesing to clang-linker-wrapper.#21449maksimsab wants to merge 1 commit intointel:syclfrom
Conversation
91961ee to
75e21a3
Compare
| Settings.GenerateModuleDescWithDefaultSpecConsts = true; | ||
|
|
||
| Settings.SplitMode = Settings.ESIMDOptions.SplitMode = *SYCLModuleSplitMode; | ||
| // TODO: fill AllowDeviceImageDependencies, ESIMDOptions.OptLevel and |
There was a problem hiding this comment.
This is left like this because it is more convenient to do when it is moved to clang-sycl-linker.
This patch add getSYCLPostLinkSettings function in clang-linker-wrapper which constructs Settings for SYCLPostLink library. Also, this patch adds an invocation of ESIMD processing in SYCLPostLink library.
75e21a3 to
ff5f294
Compare
| /// This function analyzes command line arguments and target triple information | ||
| /// to determine the appropriate settings for the SYCL post-link phase. The | ||
| /// settings control various aspects of device code processing including | ||
| /// specialization constants handling, kernel entry point emission, metadata | ||
| /// generation, and ESIMD code splitting. |
There was a problem hiding this comment.
nit - unnecessary words
| /// This function analyzes command line arguments and target triple information | |
| /// to determine the appropriate settings for the SYCL post-link phase. The | |
| /// settings control various aspects of device code processing including | |
| /// specialization constants handling, kernel entry point emission, metadata | |
| /// generation, and ESIMD code splitting. | |
| /// This function analyzes command line arguments and target triple | |
| /// to determine settings for the SYCL post-link phase. The | |
| /// settings control various aspects of device code processing including | |
| /// specialization constants handling, kernel entry point emission, metadata | |
| /// generation, and ESIMD code splitting. |
|
|
||
| if (!Triple.isAMDGCN()) | ||
| Settings.EmitParamInfo = true; | ||
| // Enable program metadata |
There was a problem hiding this comment.
nit: unnecessary comment
| // Enable program metadata |
| if (Triple.isNVPTX() || Triple.isAMDGCN() || Triple.isNativeCPU()) | ||
| Settings.EmitProgramMetadata = true; | ||
|
|
||
| // Emit kernel names if we are producing SYCLBIN. |
There was a problem hiding this comment.
nit: unnecessary comment just repeating the code
| // Emit kernel names if we are producing SYCLBIN. |
| if (Args.hasArg(OPT_syclbin_EQ)) | ||
| Settings.EmitKernelNames = true; | ||
| // Specialization constant info generation is mandatory - | ||
| // add options unconditionally |
There was a problem hiding this comment.
nit
| // add options unconditionally | |
| // add options unconditionally. |
| bool SplitEsimd = | ||
| Args.hasFlag(OPT_sycl_device_code_split_esimd, | ||
| OPT_no_sycl_device_code_split_esimd, SplitEsimdByDefault); | ||
| if (SplitEsimd) | ||
| Settings.ESIMDOptions.SplitESIMD = true; |
There was a problem hiding this comment.
nit. SplitEsimd is not used anywhere else. and Settings.ESIMDOptions.SplitESIMD is clear enough, so no need to create temporary SplitEsimd
| bool SplitEsimd = | |
| Args.hasFlag(OPT_sycl_device_code_split_esimd, | |
| OPT_no_sycl_device_code_split_esimd, SplitEsimdByDefault); | |
| if (SplitEsimd) | |
| Settings.ESIMDOptions.SplitESIMD = true; | |
| Settings.ESIMDOptions.SplitESIMD = Args.hasFlag(OPT_sycl_device_code_split_esimd, | |
| OPT_no_sycl_device_code_split_esimd, SplitEsimdByDefault); |
| if (SplitEsimd) | ||
| Settings.ESIMDOptions.SplitESIMD = true; | ||
|
|
||
| Settings.ESIMDOptions.LowerESIMD = true; |
There was a problem hiding this comment.
nit: here comment would be useful to explain why LowerESIMD setting is set to true unconditionally.
YuriPlyakhin
left a comment
There was a problem hiding this comment.
LGTM. several nits.
This patch add getSYCLPostLinkSettings function in clang-linker-wrapper
which constructs Settings for SYCLPostLink library. Also, this patch adds
an invocation of ESIMD processing in SYCLPostLink library.