Skip to content

Commit 0f49bfb

Browse files
committed
This (rather) hacky change should help fix regressions
1 parent d674eb2 commit 0f49bfb

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

llvm/tools/sycl-post-link/sycl-post-link.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,18 @@ std::string saveModuleProperties(module_split::ModuleDesc &MD,
463463
if (HasLargeGRF)
464464
PropSet[PropSetRegTy::SYCL_MISC_PROP].insert({"isLargeGRF", true});
465465
}
466-
{
466+
// FIXME: Remove 'if' below when possible
467+
// GPU backend has a problem with accepting optimization level options in form
468+
// described by Level Zero specification (-ze-opt-level=1) when 'invoke_simd'
469+
// functionality is involved. JIT compilation results in the following error:
470+
// error: VLD: Failed to compile SPIR-V with following error:
471+
// invalid api option: -ze-opt-level=O1
472+
// -11 (PI_ERROR_BUILD_PROGRAM_FAILURE)
473+
// 'if' below essentially preserves the behavior (presumably mistakenly)
474+
// implemented in intel/llvm#8763: ignore 'optLevel' property for images which
475+
// were produced my merge after ESIMD split
476+
if (MD.getEntryPointGroup().Props.HasESIMD !=
477+
module_split::SyclEsimdSplitStatus::SYCL_AND_ESIMD) {
467478
// Handle sycl-optlevel property
468479
int OptLevel = -1;
469480
for (const Function *F : MD.entries()) {

0 commit comments

Comments
 (0)