mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
Add adjustNumberOfThreadsInThreadGroup method to EncodeDispatchKernel
Related-To: NEO-7357 Signed-off-by: Rafal Maziejuk <rafal.maziejuk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
73bd55ad40
commit
b7380237c2
@@ -48,6 +48,7 @@ struct HardwareCommandsHelper : public PerThreadDataHelper {
|
||||
uint32_t numSamplers,
|
||||
const uint32_t threadGroupCount,
|
||||
uint32_t numThreadsPerThreadGroup,
|
||||
uint32_t simd,
|
||||
const Kernel &kernel,
|
||||
uint32_t bindingTablePrefetchSize,
|
||||
PreemptionMode preemptionMode,
|
||||
|
||||
@@ -118,6 +118,7 @@ size_t HardwareCommandsHelper<GfxFamily>::sendInterfaceDescriptorData(
|
||||
uint32_t numSamplers,
|
||||
const uint32_t threadGroupCount,
|
||||
uint32_t threadsPerThreadGroup,
|
||||
uint32_t simd,
|
||||
const Kernel &kernel,
|
||||
uint32_t bindingTablePrefetchSize,
|
||||
PreemptionMode preemptionMode,
|
||||
@@ -149,6 +150,7 @@ size_t HardwareCommandsHelper<GfxFamily>::sendInterfaceDescriptorData(
|
||||
productHelper.updateIddCommand(&interfaceDescriptor, kernelDescriptor.kernelAttributes.numGrfRequired,
|
||||
kernelDescriptor.kernelAttributes.threadArbitrationPolicy);
|
||||
|
||||
EncodeDispatchKernel<GfxFamily>::adjustNumberOfThreadsInThreadGroup(interfaceDescriptor, simd, threadsPerThreadGroup);
|
||||
EncodeDispatchKernel<GfxFamily>::appendAdditionalIDDFields(&interfaceDescriptor, device.getRootDeviceEnvironment(), threadsPerThreadGroup,
|
||||
slmTotalSize, SlmPolicy::SlmPolicyNone);
|
||||
|
||||
@@ -285,6 +287,7 @@ size_t HardwareCommandsHelper<GfxFamily>::sendIndirectState(
|
||||
samplerCount,
|
||||
threadGroupCount,
|
||||
threadsPerThreadGroup,
|
||||
simd,
|
||||
kernel,
|
||||
bindingTablePrefetchSize,
|
||||
preemptionMode,
|
||||
|
||||
@@ -94,7 +94,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, WhenProgramInterfaceDescriptor
|
||||
const uint32_t threadGroupCount = 1u;
|
||||
size_t crossThreadDataSize = kernel->getCrossThreadDataSize();
|
||||
HardwareCommandsHelper<FamilyType>::sendInterfaceDescriptorData(
|
||||
indirectHeap, 0, 0, crossThreadDataSize, 64, 0, 0, 0, threadGroupCount, 1, *kernel, 0, pDevice->getPreemptionMode(), nullptr, *pDevice);
|
||||
indirectHeap, 0, 0, crossThreadDataSize, 64, 0, 0, 0, threadGroupCount, 1, 1, *kernel, 0, pDevice->getPreemptionMode(), nullptr, *pDevice);
|
||||
|
||||
auto usedIndirectHeapAfter = indirectHeap.getUsed();
|
||||
EXPECT_EQ(sizeof(INTERFACE_DESCRIPTOR_DATA), usedIndirectHeapAfter - usedIndirectHeapBefore);
|
||||
|
||||
@@ -83,6 +83,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, KernelSLMAndBarrierTest, GivenStaticSlmSizeWhenProgr
|
||||
0,
|
||||
threadGroupCount,
|
||||
1,
|
||||
1,
|
||||
kernel,
|
||||
4u,
|
||||
pDevice->getPreemptionMode(),
|
||||
@@ -173,6 +174,7 @@ HWTEST_F(KernelSLMAndBarrierTest, GivenInterfaceDescriptorProgrammedWhenOverride
|
||||
0,
|
||||
threadGroupCount,
|
||||
1,
|
||||
1,
|
||||
kernel,
|
||||
4u,
|
||||
pDevice->getPreemptionMode(),
|
||||
|
||||
Reference in New Issue
Block a user