Skip to content

Commit 6072b2c

Browse files
ksliwinsigcbot
authored andcommitted
_OS_SUMMARY
_OS_DESCRIPTION
1 parent 9d9d6b3 commit 6072b2c

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

IGC/Compiler/CodeGenContext.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -709,10 +709,6 @@ uint32_t CodeGenContext::getNumGRFPerThread(bool returnDefault) {
709709
m_NumGRFPerThread = IGC_GET_FLAG_VALUE(TotalGRFNum);
710710
return m_NumGRFPerThread;
711711
}
712-
if (getModuleMetaData()->csInfo.forceTotalGRFNum != 0) {
713-
m_NumGRFPerThread = getModuleMetaData()->csInfo.forceTotalGRFNum;
714-
return m_NumGRFPerThread;
715-
}
716712

717713
if (hasSyncRTCalls()) {
718714
// read value from CompOptions first
@@ -729,6 +725,16 @@ uint32_t CodeGenContext::getNumGRFPerThread(bool returnDefault) {
729725
m_NumGRFPerThread = IGC_GET_FLAG_VALUE(TotalGRFNum4CS);
730726
return m_NumGRFPerThread;
731727
}
728+
// AIL check after reg check
729+
if (getModuleMetaData()->csInfo.forceTotalGRFNum != 0) {
730+
m_NumGRFPerThread = getModuleMetaData()->csInfo.forceTotalGRFNum;
731+
return m_NumGRFPerThread;
732+
}
733+
if (getModuleMetaData()->compOpt.forceTotalGRFNum != 0) {
734+
m_NumGRFPerThread = getModuleMetaData()->compOpt.forceTotalGRFNum;
735+
return m_NumGRFPerThread;
736+
}
737+
732738
return (returnDefault ? DEFAULT_TOTAL_GRF_NUM : 0);
733739
}
734740

IGC/common/MDFrameWork.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ enum class ShaderTypeMD
437437
bool BufferOffsetArgOptional = true;
438438
bool replaceGlobalOffsetsByZero = false;
439439
unsigned forcePixelShaderSIMDMode = 0;
440+
unsigned int forceTotalGRFNum = 0; // 0 means not forced
440441
bool pixelShaderDoNotAbortOnSpill = false;
441442
bool UniformWGS = false;
442443
bool disableVertexComponentPacking = false;

0 commit comments

Comments
 (0)