File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -1672,8 +1672,8 @@ bool BB_Scheduler::scheduleBlockForLatency(unsigned &MaxPressure,
16721672 return false ;
16731673
16741674 // UpperBoundGRF == 0 means we are scheduling for the fixed number of GRF
1675- if (UpperBoundGRF == 0 &&
1676- MaxPressure >= getLatencyHidingThreshold (kernel, nr) )
1675+ unsigned LatencyPressureThreshold = getLatencyHidingThreshold (kernel, nr);
1676+ if (UpperBoundGRF == 0 && MaxPressure >= LatencyPressureThreshold )
16771677 return false ;
16781678
16791679 // simple ROI check.
@@ -1685,8 +1685,15 @@ bool BB_Scheduler::scheduleBlockForLatency(unsigned &MaxPressure,
16851685 NumOfHighLatencyInsts++;
16861686 }
16871687 }
1688-
1689- return NumOfHighLatencyInsts >= 2 ;
1688+ if (kernel.fg .builder ->hasFiveALUPipes ()) {
1689+ // For latest platform, do scheduling for kernels with low register
1690+ // pressure to improve ILP. Currently, half pressure threshold is used.
1691+ // Maybe tuned in future.
1692+ return (NumOfHighLatencyInsts >= 2 ) ||
1693+ (MaxPressure < (LatencyPressureThreshold / 2 ));
1694+ } else {
1695+ return (NumOfHighLatencyInsts >= 2 );
1696+ }
16901697 };
16911698
16921699 unsigned NumGrfs =
You can’t perform that action at this time.
0 commit comments