@@ -3450,7 +3450,8 @@ namespace IGC
3450
3450
3451
3451
if (ctx->platform .getMinDispatchMode () == SIMDMode::SIMD16)
3452
3452
{
3453
- AddCodeGenPasses (*ctx, shaders, Passes, SIMDMode::SIMD32, false );
3453
+ bool abortOnSpills = ctx->platform .isCoreXE2 () && (ctx->getModuleMetaData ()->csInfo .forcedSIMDSize != 32 );
3454
+ AddCodeGenPasses (*ctx, shaders, Passes, SIMDMode::SIMD32, abortOnSpills);
3454
3455
AddCodeGenPasses (*ctx, shaders, Passes, SIMDMode::SIMD16, false );
3455
3456
3456
3457
ctx->SetSIMDInfo (SIMD_SKIP_HW, SIMDMode::SIMD8, ShaderDispatchMode::NOT_APPLICABLE);
@@ -3755,9 +3756,23 @@ namespace IGC
3755
3756
return SIMDStatus::SIMD_FUNC_FAIL;
3756
3757
}
3757
3758
3758
- EP.m_canAbortOnSpill = false ; // spill is always allowed since we don't do SIMD size lowering
3759
3759
// Next we check if there is a required sub group size specified
3760
3760
CodeGenContext* pCtx = GetContext ();
3761
+
3762
+ CShader* simd16Program = m_parent->GetShader (SIMDMode::SIMD16);
3763
+ CShader* simd32Program = m_parent->GetShader (SIMDMode::SIMD32);
3764
+
3765
+ bool compileFunctionVariants = pCtx->m_enableSimdVariantCompilation &&
3766
+ (m_FGA && IGC::isIntelSymbolTableVoidProgram (m_FGA->getGroupHead (&F)));
3767
+
3768
+ if ((simd16Program && simd16Program->ProgramOutput ()->m_programSize > 0 ) ||
3769
+ (simd32Program && simd32Program->ProgramOutput ()->m_programSize > 0 ))
3770
+ {
3771
+ bool canCompileMultipleSIMD = compileFunctionVariants;
3772
+ if (!(canCompileMultipleSIMD && (pCtx->getModuleMetaData ()->csInfo .forcedSIMDSize == 0 )))
3773
+ return SIMDStatus::SIMD_FUNC_FAIL;
3774
+ }
3775
+
3761
3776
MetaDataUtils* pMdUtils = EP.getAnalysis <MetaDataUtilsWrapper>().getMetaDataUtils ();
3762
3777
FunctionInfoMetaDataHandle funcInfoMD = pMdUtils->getFunctionsInfoItem (&F);
3763
3778
uint32_t simd_size = getReqdSubGroupSize (F, pMdUtils);
@@ -3860,7 +3875,7 @@ namespace IGC
3860
3875
return SIMDStatus::SIMD_PASS;
3861
3876
}
3862
3877
3863
- if (simdMode == SIMDMode::SIMD16 && !hasSubGroupForce && !forceLowestSIMDForStackCalls && !hasSubroutine)
3878
+ if (simdMode == SIMDMode::SIMD16 && !pCtx-> platform . isCoreXE2 () && ! hasSubGroupForce && !forceLowestSIMDForStackCalls && !hasSubroutine)
3864
3879
{
3865
3880
pCtx->SetSIMDInfo (SIMD_SKIP_PERF, simdMode, ShaderDispatchMode::NOT_APPLICABLE);
3866
3881
return SIMDStatus::SIMD_FUNC_FAIL;
0 commit comments