Fix issues in signal all event packets 5/n

This commit is fixing signal event after append operation.
1st fix is to add signal all packets to timestamp event on copy only lists.
2nd fix is to change order of dispatched commands for compute lists to move
light signal event commands before stalling command.

Related-To: NEO-7490

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2022-12-12 13:43:40 +00:00
committed by Compute-Runtime-Automation
parent e63ce337a4
commit a734921113
2 changed files with 138 additions and 32 deletions

View File

@@ -1832,6 +1832,9 @@ void CommandListCoreFamily<gfxCoreFamily>::appendSignalEventPostWalker(Event *ev
args.commandWithPostSync = true;
NEO::EncodeMiFlushDW<GfxFamily>::programMiFlushDw(*commandContainer.getCommandStream(), baseAddr, Event::STATE_SIGNALED,
args, hwInfo);
if (this->signalAllEventPackets && (event->getPacketsInUse() < event->getMaxPacketsCount())) {
setRemainingEventPackets(event, Event::STATE_SIGNALED);
}
} else {
NEO::PipeControlArgs args;
args.dcFlushEnable = getDcFlushRequired(!!event->signalScope);
@@ -1839,6 +1842,9 @@ void CommandListCoreFamily<gfxCoreFamily>::appendSignalEventPostWalker(Event *ev
args.workloadPartitionOffset = true;
event->setPacketsInUse(this->partitionCount);
}
if (this->signalAllEventPackets && (event->getPacketsInUse() < event->getMaxPacketsCount())) {
setRemainingEventPackets(event, Event::STATE_SIGNALED);
}
NEO::MemorySynchronizationCommands<GfxFamily>::addBarrierWithPostSyncOperation(
*commandContainer.getCommandStream(),
NEO::PostSyncMode::ImmediateData,
@@ -1847,9 +1853,6 @@ void CommandListCoreFamily<gfxCoreFamily>::appendSignalEventPostWalker(Event *ev
hwInfo,
args);
}
if (this->signalAllEventPackets) {
setRemainingEventPackets(event, Event::STATE_SIGNALED);
}
}
}
@@ -1866,6 +1869,9 @@ void CommandListCoreFamily<gfxCoreFamily>::appendEventForProfilingCopyCommand(Ev
NEO::MiFlushArgs args;
const auto &hwInfo = this->device->getHwInfo();
NEO::EncodeMiFlushDW<GfxFamily>::programMiFlushDw(*commandContainer.getCommandStream(), 0, 0, args, hwInfo);
if (this->signalAllEventPackets && (event->getPacketsInUse() < event->getMaxPacketsCount())) {
setRemainingEventPackets(event, Event::STATE_SIGNALED);
}
}
appendWriteKernelTimestamp(event, beforeWalker, false, false);
}
@@ -2199,6 +2205,10 @@ void CommandListCoreFamily<gfxCoreFamily>::appendEventForProfiling(Event *event,
bool workloadPartition = setupTimestampEventForMultiTile(event);
appendWriteKernelTimestamp(event, beforeWalker, true, workloadPartition);
} else {
if (this->signalAllEventPackets && (event->getPacketsInUse() < event->getMaxPacketsCount())) {
setRemainingEventPackets(event, Event::STATE_SIGNALED);
}
const auto &hwInfo = this->device->getHwInfo();
NEO::PipeControlArgs args;
args.dcFlushEnable = getDcFlushRequired(!!event->signalScope);
@@ -2211,9 +2221,6 @@ void CommandListCoreFamily<gfxCoreFamily>::appendEventForProfiling(Event *event,
NEO::MemorySynchronizationCommands<GfxFamily>::addAdditionalSynchronization(*commandContainer.getCommandStream(), baseAddr, false, hwInfo);
bool workloadPartition = isTimestampEventForMultiTile(event);
appendWriteKernelTimestamp(event, beforeWalker, true, workloadPartition);
if (this->signalAllEventPackets) {
setRemainingEventPackets(event, Event::STATE_SIGNALED);
}
}
}
}