Optimize preemption programming

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe 2021-03-29 17:44:01 +00:00 committed by Compute-Runtime-Automation
parent 40ecee5733
commit 21e89b121a
1 changed files with 6 additions and 4 deletions

View File

@ -269,10 +269,12 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandLists(
NEO::PreemptionHelper::programStateSip<GfxFamily>(child, *neoDevice);
}
NEO::PreemptionHelper::programCmdStream<GfxFamily>(child,
cmdQueuePreemption,
commandQueuePreemptionMode,
csr->getPreemptionAllocation());
if (cmdQueuePreemption != commandQueuePreemptionMode) {
NEO::PreemptionHelper::programCmdStream<GfxFamily>(child,
cmdQueuePreemption,
commandQueuePreemptionMode,
csr->getPreemptionAllocation());
}
statePreemption = cmdQueuePreemption;
const bool sipKernelUsed = devicePreemption == NEO::PreemptionMode::MidThread ||