Skip to content

Commit c9994c0

Browse files
sys-igcigcbot
authored andcommitted
[Autobackout][FunctionalRegression]Revert of change: 6ca4e41: cleanup unneeded fields
cleanup unneeded fields
1 parent 3ac675e commit c9994c0

File tree

3 files changed

+24
-13
lines changed

3 files changed

+24
-13
lines changed

IGC/Compiler/CISACodeGen/CISABuilder.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4427,15 +4427,15 @@ namespace IGC
44274427
return true;
44284428

44294429
// API check.
4430-
bool enableForRetry = m_program->m_DriverInfo->enableVISAPreRASchedulerForRetry() ||
4430+
bool enableForRetey = m_program->m_DriverInfo->enableVISAPreRASchedulerForRetry() ||
44314431
context->m_retryManager.AllowVISAPreRAScheduler();
44324432
// PreRA scheduler runs always when VRT is enabled
4433-
enableForRetry |= m_program->m_Platform->supportsVRT() && m_program->m_DriverInfo->supportsVRT() &&
4433+
enableForRetey |= m_program->m_Platform->supportsVRT() && m_program->m_DriverInfo->supportsVRT() &&
44344434
(context->getModuleMetaData()->compOpt.EnableVRT || IGC_IS_FLAG_ENABLED(EnableVRT));
44354435

44364436
if (IGC_IS_FLAG_ENABLED(EnableVISAPreSched) &&
44374437
m_program->m_DriverInfo->enableVISAPreRAScheduler() &&
4438-
enableForRetry)
4438+
enableForRetey)
44394439
return true;
44404440

44414441
return false;
@@ -4817,6 +4817,10 @@ namespace IGC
48174817
{
48184818
SaveOption(vISA_TotalGRFNum, NumGRFSetting);
48194819
}
4820+
else if (m_program->getNumGRFPerThread() > 0)
4821+
{
4822+
SaveOption(vISA_TotalGRFNum, m_program->getNumGRFPerThread());
4823+
}
48204824

48214825
if (context->getModuleMetaData()->compOpt.WaEnableALTModeVisaWA)
48224826
{
@@ -4894,18 +4898,14 @@ namespace IGC
48944898
}
48954899
}
48964900
} else { // Other shader types
4897-
if (IGC_GET_FLAG_VALUE(ForceHWThreadNumberPerEU) != 0)
4898-
{
4901+
if (IGC_GET_FLAG_VALUE(ForceHWThreadNumberPerEU) != 0) {
48994902
SaveOption(vISA_HWThreadNumberPerEU,
49004903
IGC_GET_FLAG_VALUE(ForceHWThreadNumberPerEU));
4901-
}
4902-
else if ((m_program->m_Platform->supportsAutoGRFSelection() &&
4903-
context->m_DriverInfo.supportsAutoGRFSelection() &&
4904-
IGC_IS_FLAG_ENABLED(ForceSupportsAutoGRFSelection)) ||
4905-
(m_program->m_Platform->supportsVRT() &&
4906-
m_program->m_DriverInfo->supportsVRT() &&
4907-
IGC_IS_FLAG_ENABLED(EnableVRT)))
4908-
{
4904+
} else if (m_program->m_Platform->supportsAutoGRFSelection() &&
4905+
context->m_DriverInfo.supportsAutoGRFSelection() &&
4906+
IGC_IS_FLAG_ENABLED(ForceSupportsAutoGRFSelection)
4907+
|| m_program->m_Platform->supportsVRT() && m_program->m_DriverInfo->supportsVRT() && IGC_IS_FLAG_ENABLED(EnableVRT)
4908+
) {
49094909
// When user hasn't specified number of threads, we can rely on
49104910
// compiler heuristics
49114911
SaveOption(vISA_AutoGRFSelection, true);

IGC/Compiler/CISACodeGen/ShaderCodeGen.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ class CShader
145145
virtual int getAnnotatedNumThreads() { return -1; }
146146
virtual bool IsRegularGRFRequested() { return false; }
147147
virtual bool IsLargeGRFRequested() { return false; }
148+
virtual unsigned getNumGRFPerThread() { return 0; }
149+
virtual bool getEnableVRT() { return false; }
148150
virtual bool hasReadWriteImage(llvm::Function& F)
149151
{
150152
IGC_UNUSED(F);

IGC/common/MDFrameWork.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,15 @@ enum class ShaderTypeMD
300300
// Shaders that satisfy `isPrimaryShaderIdentifier()` can also have
301301
// a collection of other names that they go by.
302302
std::vector<std::string> Aliases;
303+
// Number of GRF registers available for this RT entry function.
304+
// On platforms with VRT support it is possible to configure 32, 64, 96,
305+
// 128, 160, 192, 224 and 256 registers per thread
306+
// If this setting is greater than 0 than EnableVRT must be false.
307+
uint32_t NumGRF = 0;
308+
// Enables compiler heuristics to optimize GRF usage for this
309+
// RT entry function.
310+
// If this setting is "true", NumGRF must be set to 0.
311+
bool EnableVRT = false;
303312
};
304313

305314
struct ConstantAddress

0 commit comments

Comments
 (0)