Skip to content

Commit 5214d39

Browse files
houjenkoigcbot
authored andcommitted
[Autobackout][FuncReg]Revert of change: 7547a8d
Enable SSOShifter by default (2nd attempt) This includes a fix to skip sso padding when it reaches the kernel size limit
1 parent 2a46d00 commit 5214d39

File tree

4 files changed

+5
-13
lines changed

4 files changed

+5
-13
lines changed

IGC/Compiler/CISACodeGen/CISABuilder.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6172,8 +6172,6 @@ namespace IGC
61726172
shaderOverrideVISAFirstPass(visaOverrideFiles, kernelName);
61736173
}
61746174

6175-
vISA::FINALIZER_INFO* jitInfo = nullptr;
6176-
61776175
// Compile generated VISA text string for inlineAsm
61786176
if (m_hasInlineAsm || visaAsmOverride || additionalVISAAsmToLink)
61796177
{
@@ -6188,9 +6186,6 @@ namespace IGC
61886186
else
61896187
{
61906188
pMainKernel = vMainKernel;
6191-
pMainKernel->GetJitInfo(jitInfo);
6192-
6193-
jitInfo->stats.scratchSpaceSizeLimit = m_program->ProgramOutput()->m_scratchSpaceSizeLimit;
61946189
m_vIsaCompileStatus = vbuilder->Compile(
61956190
m_enableVISAdump ? GetDumpFileName("isa").c_str() : "", nullptr, emitVisaOnly);
61966191
}
@@ -6210,6 +6205,9 @@ namespace IGC
62106205
// Collect metrics from vISA
62116206
context->metrics.CollectRegStats(vISAstats, m_program->entry);
62126207

6208+
vISA::FINALIZER_INFO* jitInfo = nullptr;
6209+
pMainKernel->GetJitInfo(jitInfo);
6210+
62136211
// Depend on vISA information about barriers presence to make sure that it's
62146212
// always set properly, even if a barrier is used as a part of Inline vISA code only.
62156213
if (jitInfo->numBarriers != 0)

IGC/common/igc_flags.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ DECLARE_IGC_REGKEY(bool, LTOForStage1Compilation, true, "LTO for stage 1 c
647647
DECLARE_IGC_REGKEY(bool, EnableTrackPtr, false, "Track Staging Context alloc/dealloc", false)
648648
DECLARE_IGC_REGKEY(bool, ExtraRetrySIMD16, false, "Enable extra simd16 with retry for STAGE1_BEST_PREF", false)
649649
DECLARE_IGC_REGKEY(bool, SaveRestoreIR, true, "Save/Restore IR for staged compilation to avoid duplicated compilations", false)
650-
DECLARE_IGC_REGKEY(DWORD, SSOShifter, 9, "Adjust ScratchSurfaceOffset with shl(hwtid, shifter). 0 menas disabling padding", false)
650+
DECLARE_IGC_REGKEY(DWORD, SSOShifter, 0, "Adjust ScratchSurfaceOffset with shl(hwtid, shifter). 0 menas disabling padding", false)
651651
DECLARE_IGC_REGKEY(DWORD, CodePatch, 2, "Enable Pixel Shader code patching to directly emit code after stitching", false)
652652
DECLARE_IGC_REGKEY(DWORD, CodePatchLimit, 0, "Debug CodePatch via limiting the number of shader been patched", false)
653653
DECLARE_IGC_REGKEY(DWORD, CodePatchExperiments, 0, "Experiment with code patching when != 0", false)

visa/BuildCISAIRImpl.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1863,11 +1863,8 @@ int CISA_IR_Builder::Compile(const char *nameInput, std::ostream *os,
18631863
{
18641864
auto& builder = *func->getKernel()->fg.builder;
18651865
auto& spillMemUsed = builder.getJitInfo()->stats.spillMemUsed;
1866-
auto& scratchSpaceSizeLimit = builder.getJitInfo()->stats.scratchSpaceSizeLimit;
18671866
bool skip_padding =
1868-
builder.kernel.getuInt32Option(vISA_SkipPaddingScratchSpaceSize) >= spillMemUsed ||
1869-
(scratchSpaceSizeLimit != 0 &&
1870-
spillMemUsed + (1U << builder.kernel.getuInt32Option(vISA_SSOShifter)) * 8 > scratchSpaceSizeLimit);
1867+
builder.kernel.getuInt32Option(vISA_SkipPaddingScratchSpaceSize) >= spillMemUsed;
18711868
bool SSO_padding =
18721869
!skip_padding &&
18731870
builder.getPlatform() == Xe_DG2 &&

visa/include/JitterDataStruct.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ struct PERF_STATS {
5656
// spill cost calculation.
5757
uint32_t numGRFSpillFillWeighted = 0;
5858

59-
// The limit of scratch space size per kernel
60-
uint32_t scratchSpaceSizeLimit = 0;
61-
6259
// spillMemUsed is the scratch size in byte of entire vISA stack for this
6360
// function/kernel. It contains spill size and caller/callee save size.
6461
// For kernel/entry functions, the value is the sum of potential callees

0 commit comments

Comments
 (0)