From 6eeb9322b954e0e29026d93a0dbb14c98d26fdbc Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Fri, 6 Oct 2023 11:12:15 +0000 Subject: [PATCH] refactor: remove not needed method Signed-off-by: Mateusz Jablonski --- shared/source/os_interface/product_helper.h | 1 - shared/source/os_interface/product_helper.inl | 5 ----- shared/source/os_interface/product_helper_hw.h | 1 - .../source/xe_hpc_core/command_encoder_xe_hpc_core.cpp | 6 +----- .../xe_hpc_core/pvc/os_agnostic_product_helper_pvc.inl | 5 ----- shared/test/common/mocks/mock_product_helper.cpp | 5 ----- .../unit_test/os_interface/product_helper_tests.cpp | 10 ---------- .../xe_hpc_core/dispatch_walker_tests_xe_hpc_core.cpp | 10 ---------- .../unit_test/xe_hpc_core/excludes_xe_hpc_core.cpp | 4 +--- 9 files changed, 2 insertions(+), 45 deletions(-) diff --git a/shared/source/os_interface/product_helper.h b/shared/source/os_interface/product_helper.h index de455b605b..e401971307 100644 --- a/shared/source/os_interface/product_helper.h +++ b/shared/source/os_interface/product_helper.h @@ -126,7 +126,6 @@ class ProductHelper { virtual bool isInitBuiltinAsyncSupported(const HardwareInfo &hwInfo) const = 0; virtual bool isGlobalFenceInCommandStreamRequired(const HardwareInfo &hwInfo) const = 0; virtual bool isGlobalFenceInDirectSubmissionRequired(const HardwareInfo &hwInfo) const = 0; - virtual bool isComputeDispatchAllWalkerEnableInComputeWalkerRequired(const HardwareInfo &hwInfo) const = 0; virtual bool isCopyEngineSelectorEnabled(const HardwareInfo &hwInfo) const = 0; virtual bool isAdjustProgrammableIdPreferredSlmSizeRequired(const HardwareInfo &hwInfo) const = 0; virtual uint32_t getThreadEuRatioForScratch(const HardwareInfo &hwInfo) const = 0; diff --git a/shared/source/os_interface/product_helper.inl b/shared/source/os_interface/product_helper.inl index b8875c9a58..54777f5384 100644 --- a/shared/source/os_interface/product_helper.inl +++ b/shared/source/os_interface/product_helper.inl @@ -392,11 +392,6 @@ bool ProductHelperHw::isSystolicModeConfigurable(const HardwareInfo return getPipelineSelectPropertySystolicModeSupport(); } -template -bool ProductHelperHw::isComputeDispatchAllWalkerEnableInComputeWalkerRequired(const HardwareInfo &hwInfo) const { - return false; -} - template bool ProductHelperHw::isCopyEngineSelectorEnabled(const HardwareInfo &hwInfo) const { return true; diff --git a/shared/source/os_interface/product_helper_hw.h b/shared/source/os_interface/product_helper_hw.h index d649ad0f6b..ea5db682f9 100644 --- a/shared/source/os_interface/product_helper_hw.h +++ b/shared/source/os_interface/product_helper_hw.h @@ -78,7 +78,6 @@ class ProductHelperHw : public ProductHelper { bool isFlushTaskAllowed() const override; bool isSystolicModeConfigurable(const HardwareInfo &hwInfo) const override; bool isInitBuiltinAsyncSupported(const HardwareInfo &hwInfo) const override; - bool isComputeDispatchAllWalkerEnableInComputeWalkerRequired(const HardwareInfo &hwInfo) const override; bool isCopyEngineSelectorEnabled(const HardwareInfo &hwInfo) const override; bool isGlobalFenceInCommandStreamRequired(const HardwareInfo &hwInfo) const override; bool isGlobalFenceInDirectSubmissionRequired(const HardwareInfo &hwInfo) const override; diff --git a/shared/source/xe_hpc_core/command_encoder_xe_hpc_core.cpp b/shared/source/xe_hpc_core/command_encoder_xe_hpc_core.cpp index ba43d7f1dc..cc83220462 100644 --- a/shared/source/xe_hpc_core/command_encoder_xe_hpc_core.cpp +++ b/shared/source/xe_hpc_core/command_encoder_xe_hpc_core.cpp @@ -242,14 +242,10 @@ void EncodeDispatchKernel::encodeAdditionalWalkerFields(const RootDevice walkerCmd.setL3PrefetchDisable(!forceL3PrefetchForComputeWalker); } - auto programComputeDispatchAllWalkerEnableInComputeWalker = productHelper.isComputeDispatchAllWalkerEnableInComputeWalkerRequired(hwInfo) && - walkerArgs.kernelExecutionType == KernelExecutionType::Concurrent; int32_t overrideDispatchAllWalkerEnableInComputeWalker = DebugManager.flags.ComputeDispatchAllWalkerEnableInComputeWalker.get(); if (overrideDispatchAllWalkerEnableInComputeWalker != -1) { - programComputeDispatchAllWalkerEnableInComputeWalker = !!overrideDispatchAllWalkerEnableInComputeWalker; + walkerCmd.setComputeDispatchAllWalkerEnable(overrideDispatchAllWalkerEnableInComputeWalker); } - - walkerCmd.setComputeDispatchAllWalkerEnable(programComputeDispatchAllWalkerEnableInComputeWalker); } template <> diff --git a/shared/source/xe_hpc_core/pvc/os_agnostic_product_helper_pvc.inl b/shared/source/xe_hpc_core/pvc/os_agnostic_product_helper_pvc.inl index 800a2ce88f..50eb80dfb0 100644 --- a/shared/source/xe_hpc_core/pvc/os_agnostic_product_helper_pvc.inl +++ b/shared/source/xe_hpc_core/pvc/os_agnostic_product_helper_pvc.inl @@ -161,11 +161,6 @@ bool ProductHelperHw::isImplicitScalingSupported(const HardwareInfo return getSteppingFromHwRevId(hwInfo) >= REVISION_B; } -template <> -bool ProductHelperHw::isComputeDispatchAllWalkerEnableInComputeWalkerRequired(const HardwareInfo &hwInfo) const { - return false; -} - template <> bool ProductHelperHw::isCopyEngineSelectorEnabled(const HardwareInfo &hwInfo) const { return false; diff --git a/shared/test/common/mocks/mock_product_helper.cpp b/shared/test/common/mocks/mock_product_helper.cpp index 0ee44df6bb..957d9632ca 100644 --- a/shared/test/common/mocks/mock_product_helper.cpp +++ b/shared/test/common/mocks/mock_product_helper.cpp @@ -285,11 +285,6 @@ bool ProductHelperHw::isFlushTaskAllowed() const { return false; } -template <> -bool ProductHelperHw::isComputeDispatchAllWalkerEnableInComputeWalkerRequired(const HardwareInfo &hwInfo) const { - return false; -} - template <> bool ProductHelperHw::isCopyEngineSelectorEnabled(const HardwareInfo &hwInfo) const { return true; diff --git a/shared/test/unit_test/os_interface/product_helper_tests.cpp b/shared/test/unit_test/os_interface/product_helper_tests.cpp index df8cb000e6..1292fb7eb5 100644 --- a/shared/test/unit_test/os_interface/product_helper_tests.cpp +++ b/shared/test/unit_test/os_interface/product_helper_tests.cpp @@ -601,16 +601,6 @@ HWTEST_F(ProductHelperTest, givenProductHelperWhenIsAdjustProgrammableIdPreferre EXPECT_FALSE(productHelper->isAdjustProgrammableIdPreferredSlmSizeRequired(*defaultHwInfo)); } -HWTEST_F(ProductHelperTest, givenProductHelperWhenIsComputeDispatchAllWalkerEnableInCfeStateRequiredThenFalseIsReturned) { - - EXPECT_FALSE(productHelper->isComputeDispatchAllWalkerEnableInCfeStateRequired(*defaultHwInfo)); -} - -HWTEST_F(ProductHelperTest, givenProductHelperWhenIsComputeDispatchAllWalkerEnableInComputeWalkerRequiredThenFalseIsReturned) { - - EXPECT_FALSE(productHelper->isComputeDispatchAllWalkerEnableInComputeWalkerRequired(*defaultHwInfo)); -} - HWTEST_F(ProductHelperTest, givenProductHelperWhenIsGlobalFenceInCommandStreamRequiredThenFalseIsReturned) { EXPECT_FALSE(productHelper->isGlobalFenceInCommandStreamRequired(*defaultHwInfo)); diff --git a/shared/test/unit_test/xe_hpc_core/dispatch_walker_tests_xe_hpc_core.cpp b/shared/test/unit_test/xe_hpc_core/dispatch_walker_tests_xe_hpc_core.cpp index 43a340024a..16e0c2201f 100644 --- a/shared/test/unit_test/xe_hpc_core/dispatch_walker_tests_xe_hpc_core.cpp +++ b/shared/test/unit_test/xe_hpc_core/dispatch_walker_tests_xe_hpc_core.cpp @@ -7,7 +7,6 @@ #include "shared/source/command_container/command_encoder.h" #include "shared/source/kernel/kernel_descriptor.h" -#include "shared/source/os_interface/product_helper.h" #include "shared/source/xe_hpc_core/hw_cmds_xe_hpc_core_base.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/default_hw_info.h" @@ -25,8 +24,6 @@ XE_HPC_CORETEST_F(WalkerDispatchTestsXeHpcCore, givenXeHpcWhenEncodeAdditionalWa auto walkerCmd = FamilyType::cmdInitGpgpuWalker; MockExecutionEnvironment mockExecutionEnvironment{}; auto &rootDeviceEnvironment = *mockExecutionEnvironment.rootDeviceEnvironments[0]; - const auto &productHelper = rootDeviceEnvironment.getHelper(); - auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo(); KernelDescriptor kernelDescriptor; EncodeWalkerArgs walkerArgs{KernelExecutionType::Default, true, kernelDescriptor}; @@ -35,13 +32,6 @@ XE_HPC_CORETEST_F(WalkerDispatchTestsXeHpcCore, givenXeHpcWhenEncodeAdditionalWa EXPECT_FALSE(walkerCmd.getComputeDispatchAllWalkerEnable()); } - { - uint32_t expectedValue = productHelper.isComputeDispatchAllWalkerEnableInComputeWalkerRequired(hwInfo); - walkerArgs.kernelExecutionType = KernelExecutionType::Concurrent; - EncodeDispatchKernel::encodeAdditionalWalkerFields(rootDeviceEnvironment, walkerCmd, walkerArgs); - EXPECT_EQ(expectedValue, walkerCmd.getComputeDispatchAllWalkerEnable()); - } - { DebugManager.flags.ComputeDispatchAllWalkerEnableInComputeWalker.set(1); EncodeDispatchKernel::encodeAdditionalWalkerFields(rootDeviceEnvironment, walkerCmd, walkerArgs); diff --git a/shared/test/unit_test/xe_hpc_core/excludes_xe_hpc_core.cpp b/shared/test/unit_test/xe_hpc_core/excludes_xe_hpc_core.cpp index 5dd7c496b6..e92e6b9723 100644 --- a/shared/test/unit_test/xe_hpc_core/excludes_xe_hpc_core.cpp +++ b/shared/test/unit_test/xe_hpc_core/excludes_xe_hpc_core.cpp @@ -30,8 +30,6 @@ HWTEST_EXCLUDE_PRODUCT(ComputeModeRequirements, givenComputeModeProgrammingWhenR HWTEST_EXCLUDE_PRODUCT(ComputeModeRequirements, givenComputeModeProgrammingWhenRequiredGRFNumberIsGreaterThan128ThenLargeGRFModeIsProgrammed_ForceNonCoherentSupportedMatcher, IGFX_XE_HPC_CORE); HWTEST_EXCLUDE_PRODUCT(BlitTests, givenXyCopyBltCommandWhenAppendBlitCommandsMemCopyIsCalledThenNothingChanged, IGFX_XE_HPC_CORE); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenIsAdjustProgrammableIdPreferredSlmSizeRequiredThenFalseIsReturned, IGFX_XE_HPC_CORE); -HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenIsComputeDispatchAllWalkerEnableInCfeStateRequiredThenFalseIsReturned, IGFX_XE_HPC_CORE); -HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenIsComputeDispatchAllWalkerEnableInComputeWalkerRequiredThenFalseIsReturned, IGFX_XE_HPC_CORE); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenIsGlobalFenceInCommandStreamRequiredThenFalseIsReturned, IGFX_XE_HPC_CORE); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenIsSystolicModeConfigurabledThenFalseIsReturned, IGFX_XE_HPC_CORE); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenGetThreadEuRatioForScratchThen8IsReturned, IGFX_XE_HPC_CORE); @@ -47,4 +45,4 @@ HWTEST_EXCLUDE_PRODUCT(GetAllocationDataTestHw, givenRingBufferAllocationWhenGet HWTEST_EXCLUDE_PRODUCT(GetAllocationDataTestHw, givenSemaphoreBufferAllocationWhenGetAllocationDataIsCalledThenItHasProperFieldsSet, IGFX_XE_HPC_CORE); HWTEST_EXCLUDE_PRODUCT(MemoryManagerGetAlloctionDataTests, givenCommandBufferAllocationTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested, IGFX_XE_HPC_CORE); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfPatIndexProgrammingSupportedThenReturnFalse, IGFX_XE_HPC_CORE); -HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfPageFaultIsSupportedThenReturnFalse, IGFX_XE_HPC_CORE); \ No newline at end of file +HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfPageFaultIsSupportedThenReturnFalse, IGFX_XE_HPC_CORE);