From 9080b0c109ec1c6dfa860e21f098511da2f20ae8 Mon Sep 17 00:00:00 2001 From: Rafal Maziejuk Date: Mon, 30 Jan 2023 12:34:11 +0000 Subject: [PATCH] Delete redundant adjustNumberOfThreadsInThreadGroup method Signed-off-by: Rafal Maziejuk --- opencl/source/helpers/hardware_commands_helper.h | 1 - .../helpers/hardware_commands_helper_base.inl | 3 --- .../helpers/hardware_commands_helper_tests.cpp | 2 +- opencl/test/unit_test/kernel/kernel_slm_tests.cpp | 2 -- shared/source/command_container/command_encoder.h | 2 -- .../command_encoder_bdw_and_later.inl | 3 --- .../command_encoder_xehp_and_later.inl | 3 --- .../command_container/command_encoder_tests.cpp | 15 --------------- 8 files changed, 1 insertion(+), 30 deletions(-) diff --git a/opencl/source/helpers/hardware_commands_helper.h b/opencl/source/helpers/hardware_commands_helper.h index 812e590c78..37fa19b3c5 100644 --- a/opencl/source/helpers/hardware_commands_helper.h +++ b/opencl/source/helpers/hardware_commands_helper.h @@ -48,7 +48,6 @@ 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, diff --git a/opencl/source/helpers/hardware_commands_helper_base.inl b/opencl/source/helpers/hardware_commands_helper_base.inl index 92da85d294..f4c2f28421 100644 --- a/opencl/source/helpers/hardware_commands_helper_base.inl +++ b/opencl/source/helpers/hardware_commands_helper_base.inl @@ -118,7 +118,6 @@ size_t HardwareCommandsHelper::sendInterfaceDescriptorData( uint32_t numSamplers, const uint32_t threadGroupCount, uint32_t threadsPerThreadGroup, - uint32_t simd, const Kernel &kernel, uint32_t bindingTablePrefetchSize, PreemptionMode preemptionMode, @@ -150,7 +149,6 @@ size_t HardwareCommandsHelper::sendInterfaceDescriptorData( productHelper.updateIddCommand(&interfaceDescriptor, kernelDescriptor.kernelAttributes.numGrfRequired, kernelDescriptor.kernelAttributes.threadArbitrationPolicy); - EncodeDispatchKernel::adjustNumberOfThreadsInThreadGroup(interfaceDescriptor, simd, threadsPerThreadGroup); EncodeDispatchKernel::appendAdditionalIDDFields(&interfaceDescriptor, device.getRootDeviceEnvironment(), threadsPerThreadGroup, slmTotalSize, SlmPolicy::SlmPolicyNone); @@ -287,7 +285,6 @@ size_t HardwareCommandsHelper::sendIndirectState( samplerCount, threadGroupCount, threadsPerThreadGroup, - simd, kernel, bindingTablePrefetchSize, preemptionMode, diff --git a/opencl/test/unit_test/helpers/hardware_commands_helper_tests.cpp b/opencl/test/unit_test/helpers/hardware_commands_helper_tests.cpp index e0a77799e2..471fe900a3 100644 --- a/opencl/test/unit_test/helpers/hardware_commands_helper_tests.cpp +++ b/opencl/test/unit_test/helpers/hardware_commands_helper_tests.cpp @@ -94,7 +94,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, WhenProgramInterfaceDescriptor const uint32_t threadGroupCount = 1u; size_t crossThreadDataSize = kernel->getCrossThreadDataSize(); HardwareCommandsHelper::sendInterfaceDescriptorData( - indirectHeap, 0, 0, crossThreadDataSize, 64, 0, 0, 0, threadGroupCount, 1, 1, *kernel, 0, pDevice->getPreemptionMode(), nullptr, *pDevice); + indirectHeap, 0, 0, crossThreadDataSize, 64, 0, 0, 0, threadGroupCount, 1, *kernel, 0, pDevice->getPreemptionMode(), nullptr, *pDevice); auto usedIndirectHeapAfter = indirectHeap.getUsed(); EXPECT_EQ(sizeof(INTERFACE_DESCRIPTOR_DATA), usedIndirectHeapAfter - usedIndirectHeapBefore); diff --git a/opencl/test/unit_test/kernel/kernel_slm_tests.cpp b/opencl/test/unit_test/kernel/kernel_slm_tests.cpp index a699c37dc1..472ae09e59 100644 --- a/opencl/test/unit_test/kernel/kernel_slm_tests.cpp +++ b/opencl/test/unit_test/kernel/kernel_slm_tests.cpp @@ -83,7 +83,6 @@ HWCMDTEST_P(IGFX_GEN8_CORE, KernelSLMAndBarrierTest, GivenStaticSlmSizeWhenProgr 0, threadGroupCount, 1, - 1, kernel, 4u, pDevice->getPreemptionMode(), @@ -174,7 +173,6 @@ HWTEST_F(KernelSLMAndBarrierTest, GivenInterfaceDescriptorProgrammedWhenOverride 0, threadGroupCount, 1, - 1, kernel, 4u, pDevice->getPreemptionMode(), diff --git a/shared/source/command_container/command_encoder.h b/shared/source/command_container/command_encoder.h index 456584b417..970525020d 100644 --- a/shared/source/command_container/command_encoder.h +++ b/shared/source/command_container/command_encoder.h @@ -133,8 +133,6 @@ struct EncodeDispatchKernel { static void adjustWalkOrder(WALKER_TYPE &walkerCmd, uint32_t requiredWorkGroupOrder, const RootDeviceEnvironment &rootDeviceEnvironment); - static void adjustNumberOfThreadsInThreadGroup(INTERFACE_DESCRIPTOR_DATA &interfaceDescriptor, const uint32_t simd, uint32_t &threadsPerThreadGroup); - static constexpr bool shouldUpdateGlobalAtomics(bool ¤tVal, bool refVal, bool updateCurrent); static size_t getSizeRequiredDsh(const KernelDescriptor &kernelDescriptor); diff --git a/shared/source/command_container/command_encoder_bdw_and_later.inl b/shared/source/command_container/command_encoder_bdw_and_later.inl index b21f722f17..6ce4ebcb95 100644 --- a/shared/source/command_container/command_encoder_bdw_and_later.inl +++ b/shared/source/command_container/command_encoder_bdw_and_later.inl @@ -564,7 +564,4 @@ uint32_t EncodeDispatchKernel::additionalSizeRequiredDsh() { return sizeof(typename Family::INTERFACE_DESCRIPTOR_DATA); } -template -void EncodeDispatchKernel::adjustNumberOfThreadsInThreadGroup(INTERFACE_DESCRIPTOR_DATA &interfaceDescriptor, const uint32_t simd, uint32_t &threadsPerThreadGroup) {} - } // namespace NEO diff --git a/shared/source/command_container/command_encoder_xehp_and_later.inl b/shared/source/command_container/command_encoder_xehp_and_later.inl index 42776ac2c4..5bab5d2925 100644 --- a/shared/source/command_container/command_encoder_xehp_and_later.inl +++ b/shared/source/command_container/command_encoder_xehp_and_later.inl @@ -791,7 +791,4 @@ uint32_t EncodeDispatchKernel::additionalSizeRequiredDsh() { return 0u; } -template -void EncodeDispatchKernel::adjustNumberOfThreadsInThreadGroup(INTERFACE_DESCRIPTOR_DATA &interfaceDescriptor, const uint32_t simd, uint32_t &threadsPerThreadGroup) {} - } // namespace NEO diff --git a/shared/test/unit_test/command_container/command_encoder_tests.cpp b/shared/test/unit_test/command_container/command_encoder_tests.cpp index 08426763f9..f268f9796f 100644 --- a/shared/test/unit_test/command_container/command_encoder_tests.cpp +++ b/shared/test/unit_test/command_container/command_encoder_tests.cpp @@ -248,18 +248,3 @@ HWTEST_F(CommandEncoderTests, givenDcFlushNotRequiredWhenGettingDcFlushValueThen bool helperValue = MemorySynchronizationCommands::getDcFlushEnable(requiredFlag, rootDeviceEnvironment); EXPECT_FALSE(helperValue); } - -HWTEST_F(CommandEncoderTests, givenSimdSizeWhenCallingAdjustNumberOfThreadsInThreadGroupThenIddIsNotChanged) { - using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA; - - uint32_t simd = 1u; - uint32_t threadsPerThreadGroup = 1u; - uint32_t expectedThreadsPerThreadGroup = 1u; - INTERFACE_DESCRIPTOR_DATA interfaceDescriptor = FamilyType::cmdInitInterfaceDescriptorData; - interfaceDescriptor.setNumberOfThreadsInGpgpuThreadGroup(threadsPerThreadGroup); - - EncodeDispatchKernel::adjustNumberOfThreadsInThreadGroup(interfaceDescriptor, simd, threadsPerThreadGroup); - - EXPECT_EQ(expectedThreadsPerThreadGroup, interfaceDescriptor.getNumberOfThreadsInGpgpuThreadGroup()); - EXPECT_EQ(expectedThreadsPerThreadGroup, threadsPerThreadGroup); -}