mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
refactor: add defaultThreadArbitrationPolicy in cmdlist
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
12ab4e5446
commit
44ef4c1ef2
@@ -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,
|
||||
|
||||
@@ -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) {}
|
||||
|
||||
@@ -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>;
|
||||
|
||||
@@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user