Skip to content

Commit d930d20

Browse files
stefan-iligcbot
authored andcommitted
Increase early recompilation threshold for default GRF
Restore threshold to 500.
1 parent cfa28ef commit d930d20

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

IGC/Compiler/CISACodeGen/EmitVISAPass.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -675,16 +675,16 @@ bool EmitPass::shouldForceEarlyRecompile(MetaDataUtils *pMdUtils,
675675
if (m_currShader->IsRecompilationRequestForced()) {
676676
return true;
677677
}
678-
auto Threshold = IGC_GET_FLAG_VALUE(EarlyRetryRPEThreshold);
678+
auto Threshold = IGC_GET_FLAG_VALUE(EarlyRetryLargeGRFThreshold);
679679
auto GRFPerThread = m_pCtx->getNumGRFPerThread();
680-
// If we are not in large GRF mode and auto GRF is disabled we can lower the
681-
// threshold. We also, as a workaround skip lowering the threshold if we have
682-
// indirect operands in the kernel to avoid cases where recompilaton has
683-
// higher spill count.
680+
// If we are not in large GRF mode and auto GRF is disabled we use
681+
// threshold set for default GRF size if it is lower. We also, as a workaround
682+
// skip lowering the threshold if we have indirect operands in the kernel to
683+
// avoid cases where recompilaton has higher spill count.
684684
if (GRFPerThread <= CodeGenContext::DEFAULT_TOTAL_GRF_NUM &&
685685
!m_pCtx->isAutoGRFSelectionEnabled() &&
686686
!m_pCtx->m_instrTypes.mayHaveIndirectOperands) {
687-
Threshold = Threshold / 2;
687+
Threshold = std::min(Threshold, IGC_GET_FLAG_VALUE(EarlyRetryDefaultGRFThreshold));
688688
}
689689
auto MaxRegPressure = getMaxRegPressureInFunctionGroup(F, pMdUtils);
690690
bool PassedThreshold = MaxRegPressure >= Threshold;

IGC/common/igc_flags.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,8 @@ DECLARE_IGC_REGKEY(DWORD, RegPressureVerbocity, 0, "Different printing types"
857857
DECLARE_IGC_REGKEY(DWORD, RetryRevertExcessiveSpillingKernelThreshold, 10000, "Sets the threshold for Retry Manager to know which kernel is considered as Excessive Spilling and applies different set of rules", false)
858858
DECLARE_IGC_REGKEY(DWORD, RetryRevertExcessiveSpillingKernelCoefficient, 102, "Sets the coefficient for Retry Manager to know whether we should revert back to a previously compiled kernel", false)
859859
DECLARE_IGC_REGKEY(DWORD, ForceSIMDRPELimit, 1000, "Cutoff value for register estimator, when higher than that kernel is switched to lower SIMD when possible", false)
860-
DECLARE_IGC_REGKEY(DWORD, EarlyRetryRPEThreshold, 380, "Cutoff value for register estimation, when highter than that kernel skips first compilation stage and goes to retry immediately. Threshold is halved in case of default GRF.", false)
860+
DECLARE_IGC_REGKEY(DWORD, EarlyRetryLargeGRFThreshold, 500, "Cutoff value for register estimation, when highter than that kernel skips first compilation stage and goes to retry immediately for large GRF.", false)
861+
DECLARE_IGC_REGKEY(DWORD, EarlyRetryDefaultGRFThreshold, 190, "Cutoff value for register estimation, when highter than that kernel skips first compilation stage and goes to retry immediately for default GRF.", false)
861862
DECLARE_IGC_REGKEY(bool, ForceNoFP64bRegioning, false, "force regioning rules for FP and 64b FPU instructions", false)
862863
DECLARE_IGC_REGKEY(bool, EnableA64WA, true, "Guarantee A64 load/store addres-hi is uniform", true)
863864
DECLARE_IGC_REGKEY(bool, EnableSamplerSplit, false, "Split Sampler 3d message to odd and even", false)

0 commit comments

Comments
 (0)