From b1928937382ae8698f212e3729b5f9e230912eaa Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Wed, 8 Jan 2025 13:52:31 +0000 Subject: [PATCH] fix: correct thread/eu ratio for scratch to Xe2 Xe2 platforms don't need overallocation there Signed-off-by: Mateusz Jablonski --- .../bmg/os_agnostic_product_helper_bmg.inl | 7 +------ .../xe2_hpg_core/gfx_core_helper_xe2_hpg_core.cpp | 14 +------------- .../lnl/os_agnostic_product_helper_lnl.inl | 7 +------ .../xe2_hpg_core/bmg/product_helper_tests_bmg.cpp | 5 ----- .../xe2_hpg_core/excludes_xe2_hpg_core.cpp | 1 - .../xe2_hpg_core/lnl/product_helper_tests_lnl.cpp | 5 ----- 6 files changed, 3 insertions(+), 36 deletions(-) diff --git a/shared/source/xe2_hpg_core/bmg/os_agnostic_product_helper_bmg.inl b/shared/source/xe2_hpg_core/bmg/os_agnostic_product_helper_bmg.inl index 36f8eb279e..659c67afdd 100644 --- a/shared/source/xe2_hpg_core/bmg/os_agnostic_product_helper_bmg.inl +++ b/shared/source/xe2_hpg_core/bmg/os_agnostic_product_helper_bmg.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -40,11 +40,6 @@ void ProductHelperHw::adjustNumberOfCcs(HardwareInfo &hwInfo) const hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled = 1; } -template <> -uint32_t ProductHelperHw::getThreadEuRatioForScratch(const HardwareInfo &hwInfo) const { - return 16u; -} - template <> bool ProductHelperHw::isDirectSubmissionSupported(ReleaseHelper *releaseHelper) const { return true; diff --git a/shared/source/xe2_hpg_core/gfx_core_helper_xe2_hpg_core.cpp b/shared/source/xe2_hpg_core/gfx_core_helper_xe2_hpg_core.cpp index d30c6cc0d7..144ef2e876 100644 --- a/shared/source/xe2_hpg_core/gfx_core_helper_xe2_hpg_core.cpp +++ b/shared/source/xe2_hpg_core/gfx_core_helper_xe2_hpg_core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -78,18 +78,6 @@ uint32_t GfxCoreHelperHw::getMinimalSIMDSize() const { return 16u; } -template <> -uint32_t GfxCoreHelperHw::getComputeUnitsUsedForScratch(const RootDeviceEnvironment &rootDeviceEnvironment) const { - if (debugManager.flags.OverrideNumComputeUnitsForScratch.get() != -1) { - return static_cast(debugManager.flags.OverrideNumComputeUnitsForScratch.get()); - } - - auto &productHelper = rootDeviceEnvironment.getHelper(); - auto hwInfo = rootDeviceEnvironment.getHardwareInfo(); - auto maxSubSlice = productHelper.computeMaxNeededSubSliceSpace(*hwInfo); - return maxSubSlice * hwInfo->gtSystemInfo.MaxEuPerSubSlice * productHelper.getThreadEuRatioForScratch(*hwInfo); -} - template <> uint32_t GfxCoreHelperHw::getMocsIndex(const GmmHelper &gmmHelper, bool l3enabled, bool l1enabled) const { if (l3enabled) { diff --git a/shared/source/xe2_hpg_core/lnl/os_agnostic_product_helper_lnl.inl b/shared/source/xe2_hpg_core/lnl/os_agnostic_product_helper_lnl.inl index 6f56c53215..9d74ea1af8 100644 --- a/shared/source/xe2_hpg_core/lnl/os_agnostic_product_helper_lnl.inl +++ b/shared/source/xe2_hpg_core/lnl/os_agnostic_product_helper_lnl.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -98,9 +98,4 @@ bool ProductHelperHw::isDeviceUsmAllocationReuseSupported() const { return true; } -template <> -uint32_t ProductHelperHw::getThreadEuRatioForScratch(const HardwareInfo &hwInfo) const { - return 16u; -} - } // namespace NEO diff --git a/shared/test/unit_test/xe2_hpg_core/bmg/product_helper_tests_bmg.cpp b/shared/test/unit_test/xe2_hpg_core/bmg/product_helper_tests_bmg.cpp index e69ecb6ee8..d68b60d09c 100644 --- a/shared/test/unit_test/xe2_hpg_core/bmg/product_helper_tests_bmg.cpp +++ b/shared/test/unit_test/xe2_hpg_core/bmg/product_helper_tests_bmg.cpp @@ -119,11 +119,6 @@ BMGTEST_F(BmgProductHelper, givenProductHelperWhenAdjustNumberOfCcsThenOverrideT EXPECT_EQ(hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled, 1u); } -BMGTEST_F(BmgProductHelper, givenProductHelperWhenGettingThreadEuRatioForScratchThen16IsReturned) { - auto hwInfo = *defaultHwInfo; - EXPECT_EQ(16u, productHelper->getThreadEuRatioForScratch(hwInfo)); -} - BMGTEST_F(BmgProductHelper, givenProductHelperWhenCheckDirectSubmissionSupportedThenTrueIsReturned) { EXPECT_TRUE(productHelper->isDirectSubmissionSupported(releaseHelper)); } diff --git a/shared/test/unit_test/xe2_hpg_core/excludes_xe2_hpg_core.cpp b/shared/test/unit_test/xe2_hpg_core/excludes_xe2_hpg_core.cpp index a3f5edce36..3cacae0033 100644 --- a/shared/test/unit_test/xe2_hpg_core/excludes_xe2_hpg_core.cpp +++ b/shared/test/unit_test/xe2_hpg_core/excludes_xe2_hpg_core.cpp @@ -35,5 +35,4 @@ HWTEST_EXCLUDE_PRODUCT(GmmCompressionTests, givenEnabledAndPreferredE2ECWhenAppl HWTEST_EXCLUDE_PRODUCT(CommandEncodeSemaphore, givenIndirectModeSetWhenProgrammingSemaphoreThenSetIndirectBit_IsAtLeastXeHpCore, IGFX_XE2_HPG_CORE); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenBooleanUncachedWhenCallOverridePatIndexThenProperPatIndexIsReturned, IGFX_XE2_HPG_CORE); HWTEST_EXCLUDE_PRODUCT(GfxCoreHelperTest, whenEncodeAdditionalTimestampOffsetsThenNothingEncoded, IGFX_XE2_HPG_CORE); -HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenGetThreadEuRatioForScratchThen8IsReturned, IGFX_XE2_HPG_CORE); HWTEST_EXCLUDE_PRODUCT(GfxCoreHelperTest, givenGetDeviceTimestampWidthCalledThenReturnCorrectValue, IGFX_XE2_HPG_CORE); diff --git a/shared/test/unit_test/xe2_hpg_core/lnl/product_helper_tests_lnl.cpp b/shared/test/unit_test/xe2_hpg_core/lnl/product_helper_tests_lnl.cpp index 118a1e8c3e..9ff4a5d56c 100644 --- a/shared/test/unit_test/xe2_hpg_core/lnl/product_helper_tests_lnl.cpp +++ b/shared/test/unit_test/xe2_hpg_core/lnl/product_helper_tests_lnl.cpp @@ -157,8 +157,3 @@ LNLTEST_F(LnlProductHelper, givenProductHelperWhenCheckingIsDeviceUsmAllocationR LNLTEST_F(LnlProductHelper, givenProductHelperWhenCheckingIsBufferPoolAllocatorSupportedThenCorrectValueIsReturned) { EXPECT_TRUE(productHelper->isBufferPoolAllocatorSupported()); } - -LNLTEST_F(LnlProductHelper, givenProductHelperWhenGettingThreadEuRatioForScratchThen16IsReturned) { - auto hwInfo = *defaultHwInfo; - EXPECT_EQ(16u, productHelper->getThreadEuRatioForScratch(hwInfo)); -}