Skip to content

Commit 1cef739

Browse files
jaladreipsigcbot
authored andcommitted
[Autobackout][FuncReg]Revert of change: 5b7c456
Disable MTP heuristic Disable MTP heuristic
1 parent 737596d commit 1cef739

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

IGC/Compiler/CISACodeGen/EmitVISAPass.cpp

+5-6
Original file line numberDiff line numberDiff line change
@@ -1333,13 +1333,12 @@ bool EmitPass::runOnFunction(llvm::Function& F)
13331333
}
13341334
}
13351335

1336-
bool enableMTPOpt =
1336+
if ((m_currShader->GetShaderType() == ShaderType::COMPUTE_SHADER ||
1337+
m_currShader->GetShaderType() == ShaderType::OPENCL_SHADER) &&
13371338
m_currShader->m_Platform->supportDisableMidThreadPreemptionSwitch() &&
1338-
(m_currShader->GetShaderType() == ShaderType::COMPUTE_SHADER || m_currShader->GetShaderType() == ShaderType::OPENCL_SHADER) &&
1339-
m_currShader->GetContext()->m_instrTypes.numLoopInsts == 0;
1340-
1341-
if (enableMTPOpt && IGC_IS_FLAG_ENABLED(EnableDisableMidThreadPreemptionOpt) &&
1342-
m_currShader->ProgramOutput()->m_InstructionCount < IGC_GET_FLAG_VALUE(MidThreadPreemptionDisableThreshold))
1339+
IGC_IS_FLAG_ENABLED(EnableDisableMidThreadPreemptionOpt) &&
1340+
(m_currShader->GetContext()->m_instrTypes.numLoopInsts == 0) &&
1341+
(m_currShader->ProgramOutput()->m_InstructionCount < IGC_GET_FLAG_VALUE(MidThreadPreemptionDisableThreshold)))
13431342
{
13441343

13451344
{

0 commit comments

Comments
 (0)