Pass active partitions from dispatched kernel to context

Related-To: NEO-6244

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2021-10-04 16:37:12 +00:00
committed by Compute-Runtime-Automation
parent 85a52b7702
commit 0b64ecba3f
6 changed files with 198 additions and 11 deletions

View File

@@ -42,6 +42,7 @@ size_t ImplicitScalingDispatch<GfxFamily>::getSize(bool emitSelfCleanup,
args.emitPipeControlStall = ImplicitScalingHelper::isPipeControlStallRequired();
args.emitBatchBufferEnd = false;
args.staticPartitioning = staticPartitioning;
args.preferredStaticPartitioning = preferStaticPartitioning;
return static_cast<size_t>(WalkerPartition::estimateSpaceRequiredInCommandBuffer<GfxFamily>(args));
}
@@ -76,6 +77,7 @@ void ImplicitScalingDispatch<GfxFamily>::dispatchCommands(LinearStream &commandS
args.emitBatchBufferEnd = false;
args.secondaryBatchBuffer = useSecondaryBatchBuffer;
args.staticPartitioning = staticPartitioning;
args.preferredStaticPartitioning = preferStaticPartitioning;
if (staticPartitioning) {
UNRECOVERABLE_IF(tileCount != partitionCount);

View File

@@ -32,6 +32,7 @@ struct WalkerPartitionArgs {
bool useAtomicsForSelfCleanup = false;
bool initializeWparidRegister = false;
bool emitPipeControlStall = false;
bool preferredStaticPartitioning = false;
};
template <typename GfxFamily>
@@ -457,6 +458,7 @@ uint64_t computeControlSectionOffset(WalkerPartitionArgs &args) {
if (args.emitSelfCleanup) {
size += computeSelfCleanupSectionSize<GfxFamily>(args.useAtomicsForSelfCleanup);
}
size += args.preferredStaticPartitioning ? sizeof(LOAD_REGISTER_MEM<GfxFamily>) : 0u;
return size;
}
@@ -587,6 +589,10 @@ void constructDynamicallyPartitionedCommandBuffer(void *cpuPointer,
programTilesSynchronizationWithAtomics<GfxFamily>(currentBatchBufferPointer, totalBytesProgrammed, tileAtomicAddress, args.tileCount);
}
if (args.preferredStaticPartitioning) {
programMiLoadRegisterMem<GfxFamily>(currentBatchBufferPointer, totalBytesProgrammed, args.workPartitionAllocationGpuVa, wparidCCSOffset);
}
//this bb start goes to the end of partitioned command buffer
programMiBatchBufferStart<GfxFamily>(
currentBatchBufferPointer,