Skip to content

Commit 2a9efc9

Browse files
esukhovigcbot
authored andcommitted
Drop to SIMD16/SIMD8 when we exhaust PTSS
Drop to SIMD16/SIMD8 when we exhaust PTSS. Implemented as third retry stage with lowered SIMD.
1 parent 125069b commit 2a9efc9

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

IGC/Compiler/CISACodeGen/OpenCLKernelCodeGen.cpp

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3594,15 +3594,23 @@ namespace IGC
35943594
}
35953595
else
35963596
{
3597-
std::string errorMsg =
3598-
"total scratch space exceeds HW "
3599-
"supported limit for kernel " +
3600-
shader->entry->getName().str() + ": " +
3601-
std::to_string(getScratchUse(shader, ctx)) + " bytes (max permitted PTSS " +
3602-
std::to_string(shader->ProgramOutput()->m_scratchSpaceSizeLimit) +
3603-
" bytes)";
3604-
3605-
ctx->EmitError(errorMsg.c_str(), nullptr);
3597+
if(IGC_GET_FLAG_VALUE(ForceSIMDRPELimit) != 0) {
3598+
IGC_SET_FLAG_VALUE(ForceSIMDRPELimit, 0);
3599+
ctx->m_retryManager.kernelSet.insert(shader->entry->getName().str());
3600+
ctx->EmitWarning("we couldn't compile without exceeding max permitted PTSS, drop SIMD \n", nullptr);
3601+
}
3602+
else {
3603+
3604+
std::string errorMsg =
3605+
"total scratch space exceeds HW "
3606+
"supported limit for kernel " +
3607+
shader->entry->getName().str() + ": " +
3608+
std::to_string(getScratchUse(shader, ctx)) + " bytes (max permitted PTSS " +
3609+
std::to_string(shader->ProgramOutput()->m_scratchSpaceSizeLimit) +
3610+
" bytes)";
3611+
3612+
ctx->EmitError(errorMsg.c_str(), nullptr);
3613+
}
36063614
}
36073615
}
36083616
}

0 commit comments

Comments
 (0)