refactor: flush Task method

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-15011

Also correct ults
This commit is contained in:
Kamil Kopryk
2025-06-11 00:42:05 +00:00
committed by Compute-Runtime-Automation
parent a52260ce63
commit bb52c358b9
29 changed files with 330 additions and 290 deletions

View File

@@ -964,24 +964,15 @@ CompletionStamp CommandQueueHw<GfxFamily>::enqueueNonBlocked(
PRINT_DEBUG_STRING(debugManager.flags.PrintDebugMessages.get(), stdout, "preemption = %d.\n", static_cast<int>(dispatchFlags.preemptionMode));
CompletionStamp completionStamp = getHeaplessStateInitEnabled() ? csr.flushTaskStateless(
commandStream,
commandStreamStart,
dsh,
ioh,
&getIndirectHeap(IndirectHeap::Type::surfaceState, 0u),
taskLevel,
dispatchFlags,
getDevice())
: csr.flushTask(
commandStream,
commandStreamStart,
dsh,
ioh,
&getIndirectHeap(IndirectHeap::Type::surfaceState, 0u),
taskLevel,
dispatchFlags,
getDevice());
CompletionStamp completionStamp = csr.flushTask(
commandStream,
commandStreamStart,
dsh,
ioh,
&getIndirectHeap(IndirectHeap::Type::surfaceState, 0u),
taskLevel,
dispatchFlags,
getDevice());
if (isHandlingBarrier) {
clearLastBcsPackets();
@@ -1193,24 +1184,15 @@ CompletionStamp CommandQueueHw<GfxFamily>::enqueueCommandWithoutKernel(
dispatchFlags.csrDependencies.makeResident(getGpgpuCommandStreamReceiver());
}
completionStamp = getHeaplessStateInitEnabled() ? getGpgpuCommandStreamReceiver().flushTaskStateless(
*commandStream,
commandStreamStart,
&getIndirectHeap(IndirectHeap::Type::dynamicState, 0u),
&getIndirectHeap(IndirectHeap::Type::indirectObject, 0u),
&getIndirectHeap(IndirectHeap::Type::surfaceState, 0u),
taskLevel,
dispatchFlags,
getDevice())
: getGpgpuCommandStreamReceiver().flushTask(
*commandStream,
commandStreamStart,
&getIndirectHeap(IndirectHeap::Type::dynamicState, 0u),
&getIndirectHeap(IndirectHeap::Type::indirectObject, 0u),
&getIndirectHeap(IndirectHeap::Type::surfaceState, 0u),
taskLevel,
dispatchFlags,
getDevice());
completionStamp = getGpgpuCommandStreamReceiver().flushTask(
*commandStream,
commandStreamStart,
&getIndirectHeap(IndirectHeap::Type::dynamicState, 0u),
&getIndirectHeap(IndirectHeap::Type::indirectObject, 0u),
&getIndirectHeap(IndirectHeap::Type::surfaceState, 0u),
taskLevel,
dispatchFlags,
getDevice());
if (isHandlingBarrier) {
clearLastBcsPackets();

View File

@@ -91,22 +91,14 @@ CompletionStamp &CommandMapUnmap::submit(TaskCountType taskLevel, bool terminate
gtpinNotifyPreFlushTask(&commandQueue);
completionStamp = commandQueue.getHeaplessStateInitEnabled() ? commandStreamReceiver.flushTaskStateless(queueCommandStream,
offset,
&commandQueue.getIndirectHeap(IndirectHeap::Type::dynamicState, 0u),
&commandQueue.getIndirectHeap(IndirectHeap::Type::indirectObject, 0u),
&commandQueue.getIndirectHeap(IndirectHeap::Type::surfaceState, 0u),
taskLevel,
dispatchFlags,
commandQueue.getDevice())
: commandStreamReceiver.flushTask(queueCommandStream,
offset,
&commandQueue.getIndirectHeap(IndirectHeap::Type::dynamicState, 0u),
&commandQueue.getIndirectHeap(IndirectHeap::Type::indirectObject, 0u),
&commandQueue.getIndirectHeap(IndirectHeap::Type::surfaceState, 0u),
taskLevel,
dispatchFlags,
commandQueue.getDevice());
completionStamp = commandStreamReceiver.flushTask(queueCommandStream,
offset,
&commandQueue.getIndirectHeap(IndirectHeap::Type::dynamicState, 0u),
&commandQueue.getIndirectHeap(IndirectHeap::Type::indirectObject, 0u),
&commandQueue.getIndirectHeap(IndirectHeap::Type::surfaceState, 0u),
taskLevel,
dispatchFlags,
commandQueue.getDevice());
commandQueue.updateLatestSentEnqueueType(EnqueueProperties::Operation::dependencyResolveOnGpu);
@@ -263,22 +255,14 @@ CompletionStamp &CommandComputeKernel::submit(TaskCountType taskLevel, bool term
}
}
completionStamp = commandQueue.getHeaplessStateInitEnabled() ? commandStreamReceiver.flushTaskStateless(*kernelOperation->commandStream,
0,
dsh,
ioh,
ssh,
taskLevel,
dispatchFlags,
commandQueue.getDevice())
: commandStreamReceiver.flushTask(*kernelOperation->commandStream,
0,
dsh,
ioh,
ssh,
taskLevel,
dispatchFlags,
commandQueue.getDevice());
completionStamp = commandStreamReceiver.flushTask(*kernelOperation->commandStream,
0,
dsh,
ioh,
ssh,
taskLevel,
dispatchFlags,
commandQueue.getDevice());
if (isHandlingBarrier) {
commandQueue.clearLastBcsPackets();
@@ -436,22 +420,14 @@ CompletionStamp &CommandWithoutKernel::submit(TaskCountType taskLevel, bool term
gtpinNotifyPreFlushTask(&commandQueue);
completionStamp = commandQueue.getHeaplessStateInitEnabled() ? commandStreamReceiver.flushTaskStateless(*kernelOperation->commandStream,
0,
&commandQueue.getIndirectHeap(IndirectHeap::Type::dynamicState, 0u),
&commandQueue.getIndirectHeap(IndirectHeap::Type::indirectObject, 0u),
&commandQueue.getIndirectHeap(IndirectHeap::Type::surfaceState, 0u),
taskLevel,
dispatchFlags,
commandQueue.getDevice())
: commandStreamReceiver.flushTask(*kernelOperation->commandStream,
0,
&commandQueue.getIndirectHeap(IndirectHeap::Type::dynamicState, 0u),
&commandQueue.getIndirectHeap(IndirectHeap::Type::indirectObject, 0u),
&commandQueue.getIndirectHeap(IndirectHeap::Type::surfaceState, 0u),
taskLevel,
dispatchFlags,
commandQueue.getDevice());
completionStamp = commandStreamReceiver.flushTask(*kernelOperation->commandStream,
0,
&commandQueue.getIndirectHeap(IndirectHeap::Type::dynamicState, 0u),
&commandQueue.getIndirectHeap(IndirectHeap::Type::indirectObject, 0u),
&commandQueue.getIndirectHeap(IndirectHeap::Type::surfaceState, 0u),
taskLevel,
dispatchFlags,
commandQueue.getDevice());
if (isHandlingBarrier) {
commandQueue.clearLastBcsPackets();