refactor: add defaultThreadArbitrationPolicy in cmdlist

Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2024-05-15 10:25:49 +00:00
committed by Compute-Runtime-Automation
parent 12ab4e5446
commit 44ef4c1ef2
12 changed files with 43 additions and 1 deletions

View File

@@ -62,6 +62,7 @@ struct EncodeDispatchKernelArgs {
uint32_t additionalSizeParam = NEO::additionalKernelLaunchSizeParamNotSet;
uint32_t partitionCount = 0u;
uint32_t reserveExtraPayloadSpace = 0;
int32_t defaultThreadArbitrationPolicy = 0;
bool isIndirect = false;
bool isPredicate = false;
bool isTimestampEvent = false;
@@ -125,6 +126,9 @@ struct EncodeDispatchKernel {
static void appendAdditionalIDDFields(InterfaceDescriptorType *pInterfaceDescriptor, const RootDeviceEnvironment &rootDeviceEnvironment,
const uint32_t threadsPerThreadGroup, uint32_t slmTotalSize, SlmPolicy slmPolicy);
template <typename InterfaceDescriptorType>
static void encodeEuSchedulingPolicy(InterfaceDescriptorType *pInterfaceDescriptor, const KernelDescriptor &kernelDesc, int32_t defaultThreadArbitrationPolicy);
template <typename WalkerType>
static void encodeThreadData(WalkerType &walkerCmd,
const uint32_t *startWorkGroup,

View File

@@ -589,6 +589,11 @@ bool EncodeDispatchKernel<Family>::inlineDataProgrammingRequired(const KernelDes
return false;
}
template <typename Family>
template <typename InterfaceDescriptorType>
void EncodeDispatchKernel<Family>::encodeEuSchedulingPolicy(InterfaceDescriptorType *pInterfaceDescriptor, const KernelDescriptor &kernelDesc, int32_t defaultThreadArbitrationPolicy) {
}
template <typename Family>
template <typename WalkerType>
void EncodeDispatchKernel<Family>::adjustTimestampPacket(WalkerType &walkerCmd, const EncodeDispatchKernelArgs &args) {}

View File

@@ -25,6 +25,7 @@ template void NEO::EncodeDispatchKernel<Family>::programBarrierEnable<Family::IN
template void NEO::EncodeDispatchKernel<Family>::setScratchAddress<false>(uint64_t &scratchAddress, uint32_t requiredScratchSlot0Size, uint32_t requiredScratchSlot1Size, IndirectHeap *ssh, CommandStreamReceiver &csr);
template void NEO::EncodeDispatchKernel<Family>::setScratchAddress<true>(uint64_t &scratchAddress, uint32_t requiredScratchSlot0Size, uint32_t requiredScratchSlot1Size, IndirectHeap *ssh, CommandStreamReceiver &csr);
template void NEO::EncodeDispatchKernel<Family>::programInlineDataHeapless<false>(uint8_t *inlineDataPtr, EncodeDispatchKernelArgs &args, CommandContainer &container, uint64_t offsetThreadData);
template void NEO::EncodeDispatchKernel<Family>::encodeEuSchedulingPolicy<Family::INTERFACE_DESCRIPTOR_DATA>(Family::INTERFACE_DESCRIPTOR_DATA *pInterfaceDescriptor, const KernelDescriptor &kernelDesc, int32_t defaultThreadArbitrationPolicy);
template struct NEO::EncodeStates<Family>;
template struct NEO::EncodeMath<Family>;

View File

@@ -115,6 +115,10 @@ void EncodeDispatchKernel<Family>::encode(CommandContainer &container, EncodeDis
kernelDescriptor.kernelAttributes.barrierCount,
hwInfo);
if (args.isHeaplessStateInitEnabled) {
EncodeDispatchKernel<Family>::encodeEuSchedulingPolicy(&idd, kernelDescriptor, args.defaultThreadArbitrationPolicy);
}
auto &gfxCoreHelper = args.device->getGfxCoreHelper();
auto slmSize = static_cast<uint32_t>(
gfxCoreHelper.computeSlmValues(hwInfo, args.dispatchInterface->getSlmTotalSize()));