SIMD16 drop in case of PTSS exhaustion fix

Final SIMD16 drop in case of PTSS exhaustion now correctly
reports failure if it didn't help to compile
This commit is contained in:
Sukhov, Egor
2025-10-20 14:10:47 +00:00
committed by igcbot
parent a42d3f6321
commit 61653f9c0a
3 changed files with 7 additions and 2 deletions

View File

@ -2284,8 +2284,8 @@ void CodeGen(OpenCLProgramContext *ctx) {
IGC_SET_FLAG_VALUE(ForceSIMDRPELimit, 0);
ctx->m_retryManager.kernelSet.insert(shader->entry->getName().str());
ctx->EmitWarning("we couldn't compile without exceeding max permitted PTSS, drop SIMD \n", nullptr);
ctx->m_retryManager.DecreaseState();
} else {
std::string errorMsg = "total scratch space exceeds HW "
"supported limit for kernel " +
shader->entry->getName().str() + ": " + std::to_string(getScratchUse(shader, ctx)) +

View File

@ -64,6 +64,11 @@ bool RetryManager::AdvanceState() {
return (stateId < RetryTableSize);
}
void RetryManager::DecreaseState() {
IGC_ASSERT(stateId < RetryTableSize);
stateId = prevStateId;
}
unsigned RetryManager::GetPerFuncRetryStateId(Function *F) const {
if (IGC_GET_FLAG_VALUE(AllowStackCallRetry) == 2 && F != nullptr && prevStateId < RetryTableSize &&
!PerFuncRetrySet.empty()) {
@ -321,7 +326,6 @@ LLVMContextWrapper::LLVMContextWrapper(bool createResourceDimTypes) : m_UserAddr
if (WA_OpaquePointersCL && WA_OpaquePointersCL->getNumOccurrences() > 0) {
IGC_IsPointerModeAlreadySet = true;
}
if (IGC::canOverwriteLLVMCtxPtrMode(basePtr, IGC_IsPointerModeAlreadySet)) {
bool enableOpaquePointers = AreOpaquePointersEnabled();
IGCLLVM::setOpaquePointers(basePtr, enableOpaquePointers);

View File

@ -656,6 +656,7 @@ public:
RetryManager &operator=(const RetryManager &) = delete;
bool AdvanceState();
void DecreaseState();
bool AllowLICM(llvm::Function *F = nullptr) const;
bool AllowPromotePrivateMemory(llvm::Function *F = nullptr) const;
bool AllowVISAPreRAScheduler(llvm::Function *F = nullptr) const;