Skip to content

Commit 74792f2

Browse files
davidjwoosys_zuul
authored andcommitted
Disable simple push restriction
Disable the payload size restrictions on simple push constants until the regressions are fixed. Change-Id: I48326e713ffd7bb9f38f1c2e28b00b0afecf93a2
1 parent 098d0c5 commit 74792f2

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

IGC/Compiler/CISACodeGen/DriverInfo.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,9 @@ namespace IGC
282282
return 4 * sizeof(MEGABYTE);
283283
}
284284

285+
// Limits simple push constants based on pushed inputs
286+
virtual bool EnableSimplePushRestriction() const { return false; }
287+
285288

286289
};
287290

IGC/Compiler/CISACodeGen/PushAnalysis.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -955,9 +955,13 @@ namespace IGC
955955
{
956956
auto& inputs = m_context->getModuleMetaData()->pushInfo.inputs;
957957
typedef const std::map<unsigned int, SInputDesc>::value_type& inputPairType;
958-
auto largestPair = std::max_element(inputs.begin(), inputs.end(),
959-
[](inputPairType a, inputPairType b) { return a.second.index < b.second.index; });
960-
unsigned int largestIndex = largestPair != inputs.end() ? largestPair->second.index : 0;
958+
unsigned int largestIndex = 0;
959+
if (m_context->m_DriverInfo.EnableSimplePushRestriction())
960+
{
961+
auto largestPair = std::max_element(inputs.begin(), inputs.end(),
962+
[](inputPairType a, inputPairType b) { return a.second.index < b.second.index; });
963+
largestIndex = largestPair != inputs.end() ? largestPair->second.index : 0;
964+
}
961965
const unsigned int maxPushedGRFs = 96;
962966
if (largestIndex >= maxPushedGRFs)
963967
{

0 commit comments

Comments
 (0)