mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
feature: add option to store walker command content in cpu memory
Related-To: NEO-10066 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9ca2091725
commit
7c16278bee
@@ -54,6 +54,7 @@ struct EncodeDispatchKernelArgs {
|
||||
IndirectHeap *dynamicStateHeap = nullptr;
|
||||
const void *threadGroupDimensions = nullptr;
|
||||
void *outWalkerPtr = nullptr;
|
||||
void *cpuWalkerBuffer = nullptr;
|
||||
std::list<void *> *additionalCommands = nullptr;
|
||||
PreemptionMode preemptionMode = PreemptionMode::Initial;
|
||||
NEO::RequiredPartitionDim requiredPartitionDim = NEO::RequiredPartitionDim::none;
|
||||
|
||||
@@ -413,6 +413,10 @@ void EncodeDispatchKernel<Family>::encode(CommandContainer &container, EncodeDis
|
||||
*buffer = walkerCmd;
|
||||
}
|
||||
|
||||
if (args.cpuWalkerBuffer) {
|
||||
*reinterpret_cast<WalkerType *>(args.cpuWalkerBuffer) = walkerCmd;
|
||||
}
|
||||
|
||||
PreemptionHelper::applyPreemptionWaCmdsEnd<Family>(listCmdBufferStream, *args.device);
|
||||
|
||||
if (NEO::PauseOnGpuProperties::pauseModeAllowed(NEO::debugManager.flags.PauseOnEnqueue.get(), args.device->debugExecutionCounter.load(), NEO::PauseOnGpuProperties::PauseMode::AfterWorkload)) {
|
||||
|
||||
@@ -498,7 +498,6 @@ void *programPartitionedWalker(void *&inputAddress, uint32_t &totalBytesProgramm
|
||||
uint32_t tileCount,
|
||||
bool forceExecutionOnSingleTile) {
|
||||
auto computeWalker = putCommand<WalkerType>(inputAddress, totalBytesProgrammed);
|
||||
WalkerType cmd = *inputWalker;
|
||||
|
||||
if (partitionCount > 1) {
|
||||
auto partitionType = inputWalker->getPartitionType();
|
||||
@@ -508,7 +507,7 @@ void *programPartitionedWalker(void *&inputAddress, uint32_t &totalBytesProgramm
|
||||
assert(inputWalker->getThreadGroupIdStartingZ() == 0u);
|
||||
assert(partitionType != WalkerType::PARTITION_TYPE::PARTITION_TYPE_DISABLED);
|
||||
|
||||
cmd.setWorkloadPartitionEnable(true);
|
||||
inputWalker->setWorkloadPartitionEnable(true);
|
||||
|
||||
auto workgroupCount = 0u;
|
||||
if (partitionType == WalkerType::PARTITION_TYPE::PARTITION_TYPE_X) {
|
||||
@@ -520,15 +519,15 @@ void *programPartitionedWalker(void *&inputAddress, uint32_t &totalBytesProgramm
|
||||
}
|
||||
|
||||
if (forceExecutionOnSingleTile) {
|
||||
cmd.setPartitionSize(workgroupCount);
|
||||
inputWalker->setPartitionSize(workgroupCount);
|
||||
} else {
|
||||
cmd.setPartitionSize(Math::divideAndRoundUp(workgroupCount, partitionCount));
|
||||
inputWalker->setPartitionSize(Math::divideAndRoundUp(workgroupCount, partitionCount));
|
||||
}
|
||||
}
|
||||
|
||||
appendWalkerFields<GfxFamily, WalkerType>(cmd, tileCount);
|
||||
appendWalkerFields<GfxFamily, WalkerType>(*inputWalker, tileCount);
|
||||
|
||||
*computeWalker = cmd;
|
||||
*computeWalker = *inputWalker;
|
||||
|
||||
return computeWalker;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user