Skip to content

Commit ba71846

Browse files
bcheng0127igcbot
authored andcommitted
[Autobackout][FuncReg]Revert of change: 7613e49
Revert: Enable pre RA scheduling for ACC register pressure rever Enable pre RA scheduling for ACC register pressure
1 parent 4821a8e commit ba71846

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

visa/HWCaps.inc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,11 @@ SPDX-License-Identifier: MIT
762762
return false;
763763
}
764764

765+
bool enablePreSchedACC() const
766+
{
767+
return false;
768+
}
769+
765770
bool hasDoubleAcc() const
766771
{
767772
return getOption(vISA_hasDoubleAcc);

visa/LocalScheduler/G4_Sched.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2623,6 +2623,11 @@ bool preRA_ACC_Scheduler::run()
26232623
AccSubPass accSub(*kernel.fg.builder, kernel);
26242624

26252625
for (auto bb : kernel.fg) {
2626+
if (bb->size() < SMALL_BLOCK_SIZE || bb->size() > LARGE_BLOCK_SIZE) {
2627+
//Skip small and large blocks.
2628+
continue;
2629+
}
2630+
26262631
preDDD ddd(mem, kernel, bb);
26272632
SchedConfig config(0);
26282633
BB_ACC_Scheduler S(kernel, ddd);

visa/Optimizer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2089,12 +2089,12 @@ int Optimizer::optimization()
20892089
// HW workaround before RA
20902090
runPass(PI_preRA_HWWorkaround);
20912091

2092-
if (builder.enableACCBeforRA() && kernel.getOption(vISA_PreSchedForAcc))
2092+
if (builder.enableACCBeforRA() && builder.enablePreSchedACC())
20932093
{
20942094
runPass(PI_ACCSchedule);
20952095
}
20962096

2097-
if (builder.enableACCBeforRA() && !kernel.getOption(vISA_PreSchedForAcc))
2097+
if (builder.enableACCBeforRA() && !builder.enablePreSchedACC())
20982098
{
20992099
runPass(PI_accSubBeforeRA);
21002100
}
@@ -2137,7 +2137,7 @@ int Optimizer::optimization()
21372137
runPass(PI_localSchedule);
21382138
}
21392139

2140-
if (!builder.enableACCBeforRA() && !kernel.getOption(vISA_PreSchedForAcc))
2140+
if (!builder.enableACCBeforRA() && !builder.enablePreSchedACC())
21412141
{
21422142
runPass(PI_expandMulPostSchedule);
21432143

visa/include/VISAOptionsDefs.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ DEF_VISA_OPTION(vISA_EnableSplitVariables, ET_BOOL, "-noSplitVariables", UNUSED
8282
DEF_VISA_OPTION(vISA_ChangeMoveType, ET_BOOL, "-ALTMode", UNUSED, true)
8383
DEF_VISA_OPTION(vISA_accSubstitution, ET_BOOL, "-noAccSub", UNUSED, true)
8484
DEF_VISA_OPTION(vISA_accSubBeforeRA, ET_BOOL, "-noAccSubBRA", UNUSED, true)
85-
DEF_VISA_OPTION(vISA_PreSchedForAcc, ET_BOOL, "-preSchedForAcc", UNUSED, false)
86-
DEF_VISA_OPTION(vISA_DepthFirstPreSchedForAcc, ET_BOOL, "-depthFirstPreSchedForAcc", UNUSED, false)
85+
DEF_VISA_OPTION(vISA_PreSchedForAcc, ET_BOOL, "-preSchedForAcc", UNUSED, true)
8786
DEF_VISA_OPTION(vISA_EnableGatherWithImm, ET_BOOL, "-gatherWithImm", UNUSED, 0)
8887
DEF_VISA_OPTION(vISA_doAccSubAfterSchedule, ET_BOOL, "-accSubPostSchedule", UNUSED, true)
8988
DEF_VISA_OPTION(vISA_localizationForAccSub, ET_BOOL, "-localizeForACC", UNUSED, false)

0 commit comments

Comments
 (0)