refactor: configure additional kernel launch params

Related-To: NEO-12591

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2024-10-22 09:59:40 +00:00
committed by Compute-Runtime-Automation
parent bef5ac958a
commit c9c8f988f5
3 changed files with 18 additions and 0 deletions

View File

@@ -378,6 +378,7 @@ struct CommandListCoreFamily : public CommandListImp {
bool singleEventPacketRequired(bool inputSinglePacketEventRequest) const;
void programEventL3Flush(Event *event);
bool isCopyOffloadAllowed(const NEO::GraphicsAllocation &srcAllocation, const NEO::GraphicsAllocation &dstAllocation) const;
void setAdditionalKernelLaunchParams(CmdListKernelLaunchParams &launchParams, Kernel &kernel) const;
NEO::InOrderPatchCommandsContainer<GfxFamily> inOrderPatchCmds;

View File

@@ -4250,4 +4250,19 @@ void CommandListCoreFamily<gfxCoreFamily>::programEventL3Flush(Event *event) {
args);
}
template <GFXCORE_FAMILY gfxCoreFamily>
void CommandListCoreFamily<gfxCoreFamily>::setAdditionalKernelLaunchParams(CmdListKernelLaunchParams &launchParams, Kernel &kernel) const {
auto &kernelDescriptor = kernel.getImmutableData()->getDescriptor();
if (launchParams.additionalSizeParam == NEO::additionalKernelLaunchSizeParamNotSet) {
launchParams.additionalSizeParam = kernelDescriptor.kernelAttributes.additionalSize;
}
if (launchParams.requiredDispatchWalkOrder == NEO::RequiredDispatchWalkOrder::none) {
launchParams.requiredDispatchWalkOrder = kernelDescriptor.kernelAttributes.walkOrder;
}
if (launchParams.requiredPartitionDim == NEO::RequiredPartitionDim::none) {
launchParams.requiredPartitionDim = kernelDescriptor.kernelAttributes.partitionDim;
}
}
} // namespace L0

View File

@@ -80,6 +80,8 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(K
}
}
setAdditionalKernelLaunchParams(launchParams, *kernel);
auto kernelInfo = kernelImmutableData->getKernelInfo();
NEO::IndirectHeap *ssh = nullptr;