Skip to content

Commit 3130fd8

Browse files
Artem Gindinsonpszymich
authored andcommitted
Prioritize explicit EnableZEBinary flag over platform settings
This change essentially unifies `EnableZEBinary` and `ForceZEBinary` configuration flags, prioritizing the former over platform's support for ZEBin and removing the latter altogether.
1 parent 53e037c commit 3130fd8

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

IGC/Compiler/CISACodeGen/OpenCLKernelCodeGen.hpp

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,6 @@ namespace IGC
264264
}
265265

266266

267-
// Handle forcing ZEBin
268-
if (IGC_IS_FLAG_SET(ForceZEBinary))
269-
{
270-
m_enableZEBinary = IGC_IS_FLAG_ENABLED(ForceZEBinary);
271-
return;
272-
}
273-
274267
// Logic for native ZEBin support
275268
auto supportsZEBin = [&](CPlatform platformInfo)
276269
{
@@ -290,14 +283,13 @@ namespace IGC
290283
}
291284
};
292285

293-
if (!supportsZEBin(platform))
294-
{
295-
m_enableZEBinary = false;
296-
return;
297-
}
298-
299286
if (IGC_IS_FLAG_SET(EnableZEBinary))
300287
m_enableZEBinary = IGC_IS_FLAG_ENABLED(EnableZEBinary);
288+
// TODO: Should options/internal options precede the platform
289+
// support status? Consider changing the priority if any
290+
// corresponding user scenarios get discovered.
291+
else if (!supportsZEBin(platform))
292+
m_enableZEBinary = false;
301293
else if (m_Options.EnableZEBinary)
302294
m_enableZEBinary = *m_Options.EnableZEBinary;
303295
else if (m_InternalOptions.EnableZEBinary)

IGC/common/igc_flags.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,8 +676,7 @@ DECLARE_IGC_REGKEY(bool, EnableLocalIdCalculationInShader, false,
676676
"shaders on XeHP+. IDs are calculated only if HW generated IDs cannot be"\
677677
"used.", true)
678678
DECLARE_IGC_REGKEY(bool, EnableVector8LoadStore, false, "Enable Vectorizer to generate 8x32i and 4x64i loads and stores", true)
679-
DECLARE_IGC_REGKEY(bool, EnableZEBinary, true, "Enable output in ZE binary format for supported platforms", true)
680-
DECLARE_IGC_REGKEY(bool, ForceZEBinary, false, "Force enable/force disable output in ZE binary format. Overrides EnableZEBinary", true)
679+
DECLARE_IGC_REGKEY(bool, EnableZEBinary, true, "Force-enable output in ZE binary format. Leave unset for compiler to choose based on current platform's support for ZE binary", true)
681680
DECLARE_IGC_REGKEY(bool, ExcludeIRFromZEBinary, false, "Exclude IR sections from ZE binary", true)
682681
DECLARE_IGC_REGKEY(bool, AllocateZeroInitializedVarsInBss, false, "Allocate zero initialized global variables in .bss section in ZEBinary", true)
683682
DECLARE_IGC_REGKEY(DWORD, OverrideOCLMaxParamSize, 0, "Override the value imposed on the kernel by CL_DEVICE_MAX_PARAMETER_SIZE. Value in bytes, if value==0 no override happens.", true)

0 commit comments

Comments
 (0)