Skip to content

Commit d17abc5

Browse files
itsimbaligcbot
authored andcommitted
Part2:Retry should be applied on per-kernel
Additional fix for retry per-kernel. Actually reverting back a code in OpenCLKernelCodeGen.cpp that decides if retry is needed. There several performance regressions, which were due to retry happened and code was compiled with less optimization options.
1 parent 2019c58 commit d17abc5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

IGC/Compiler/CISACodeGen/OpenCLKernelCodeGen.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2308,16 +2308,20 @@ namespace IGC
23082308
pShader->FillKernel();
23092309
SProgramOutput* pOutput = pShader->ProgramOutput();
23102310

2311+
// Need a better heuristic for NoRetry
23112312
FunctionInfoMetaDataHandle funcInfoMD = pMdUtils->getFunctionsInfoItem(pFunc);
2313+
int subGrpSize = funcInfoMD->getSubGroupSize()->getSIMD_size();
2314+
bool noRetry = ((subGrpSize > 0 || pOutput->m_scratchSpaceUsedBySpills < 1000) &&
2315+
ctx->m_instrTypes.mayHaveIndirectOperands);
23122316

23132317
bool optDisable = false;
23142318
if (ctx->getModuleMetaData()->compOpt.OptDisable)
23152319
{
23162320
optDisable = true;
23172321
}
23182322

2319-
// Need a better heuristic for NoRetry. Currently spill size is used
2320-
if (pOutput->m_scratchSpaceUsedBySpills < 1000 ||
2323+
if (pOutput->m_scratchSpaceUsedBySpills == 0 ||
2324+
noRetry ||
23212325
ctx->m_retryManager.IsLastTry() ||
23222326
(!ctx->m_retryManager.kernelSkip.empty() &&
23232327
ctx->m_retryManager.kernelSkip.count(pFunc->getName().str())) ||

0 commit comments

Comments
 (0)