Skip to content

Commit 36de542

Browse files
mshelegoigcbot
authored andcommitted
Use correct visa preemption option
Different platforms require different option to be passed to the finalizer in order to enable preemption
1 parent d08d9ce commit 36de542

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

IGC/VectorCompiler/lib/GenXCodeGen/GenXCisaBuilder.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5800,8 +5800,12 @@ collectFinalizerArgs(StringSaver &Saver, const GenXSubtarget &ST,
58005800

58015801
const WA_TABLE *WATable = BC.getWATable();
58025802
// enable preemption if subtarget supports it
5803-
if (ST.hasPreemption())
5804-
addArgument("-enablePreemption");
5803+
if (ST.hasPreemption()) {
5804+
if (ST.getVisaPlatform() >= TARGET_PLATFORM::Xe2)
5805+
addArgument("-enablePreemptionR0Only");
5806+
else
5807+
addArgument("-enablePreemption");
5808+
}
58055809

58065810
if (ST.hasHalfSIMDLSC())
58075811
addArgument("-enableHalfLSC");

0 commit comments

Comments
 (0)