diff --git a/shared/source/gen12lp/os_agnostic_product_helper_gen12lp.inl b/shared/source/gen12lp/os_agnostic_product_helper_gen12lp.inl index 326f20ed7b..7d16e38d86 100644 --- a/shared/source/gen12lp/os_agnostic_product_helper_gen12lp.inl +++ b/shared/source/gen12lp/os_agnostic_product_helper_gen12lp.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -31,4 +31,8 @@ template <> uint32_t ProductHelperHw::getMaxLocalRegionSize(const HardwareInfo &hwInfo) const { return 0; } +template <> +uint32_t ProductHelperHw::getMaxLocalSubRegionSize(const HardwareInfo &hwInfo) const { + return 0; +} } // namespace NEO diff --git a/shared/source/os_interface/product_helper.h b/shared/source/os_interface/product_helper.h index 8ed28882cd..05ef29188e 100644 --- a/shared/source/os_interface/product_helper.h +++ b/shared/source/os_interface/product_helper.h @@ -243,6 +243,7 @@ class ProductHelper { virtual bool deferMOCSToPatIndex() const = 0; virtual const std::vector getSupportedLocalDispatchSizes(const HardwareInfo &hwInfo) const = 0; virtual uint32_t getMaxLocalRegionSize(const HardwareInfo &hwInfo) const = 0; + virtual uint32_t getMaxLocalSubRegionSize(const HardwareInfo &hwInfo) const = 0; virtual bool localDispatchSizeQuerySupported() const = 0; virtual bool supportReadOnlyAllocations() const = 0; virtual bool isDeviceToHostCopySignalingFenceRequired() const = 0; diff --git a/shared/source/os_interface/product_helper_hw.h b/shared/source/os_interface/product_helper_hw.h index 54552b4890..19710af6f9 100644 --- a/shared/source/os_interface/product_helper_hw.h +++ b/shared/source/os_interface/product_helper_hw.h @@ -185,6 +185,7 @@ class ProductHelperHw : public ProductHelper { bool supportReadOnlyAllocations() const override; const std::vector getSupportedLocalDispatchSizes(const HardwareInfo &hwInfo) const override; uint32_t getMaxLocalRegionSize(const HardwareInfo &hwInfo) const override; + uint32_t getMaxLocalSubRegionSize(const HardwareInfo &hwInfo) const override; bool localDispatchSizeQuerySupported() const override; bool isDeviceToHostCopySignalingFenceRequired() const override; size_t getMaxFillPaternSizeForCopyEngine() const override; diff --git a/shared/source/os_interface/product_helper_xe2_and_later.inl b/shared/source/os_interface/product_helper_xe2_and_later.inl index 3035d6164d..76c9a4d5c5 100644 --- a/shared/source/os_interface/product_helper_xe2_and_later.inl +++ b/shared/source/os_interface/product_helper_xe2_and_later.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -25,6 +25,11 @@ uint32_t ProductHelperHw::getMaxLocalRegionSize(const HardwareInfo & return 0; } +template +uint32_t ProductHelperHw::getMaxLocalSubRegionSize(const HardwareInfo &hwInfo) const { + return 0; +} + template uint64_t ProductHelperHw::getHostMemCapabilitiesValue() const { return (UnifiedSharedMemoryFlags::access | UnifiedSharedMemoryFlags::atomicAccess); diff --git a/shared/source/os_interface/product_helper_xe_hpg_and_xe_hpc.inl b/shared/source/os_interface/product_helper_xe_hpg_and_xe_hpc.inl index 56b3a564d9..22f6d0acbf 100644 --- a/shared/source/os_interface/product_helper_xe_hpg_and_xe_hpc.inl +++ b/shared/source/os_interface/product_helper_xe_hpg_and_xe_hpc.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Intel Corporation + * Copyright (C) 2021-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -18,6 +18,10 @@ template uint32_t ProductHelperHw::getMaxLocalRegionSize(const HardwareInfo &hwInfo) const { return 0; } +template +uint32_t ProductHelperHw::getMaxLocalSubRegionSize(const HardwareInfo &hwInfo) const { + return 0; +} template uint64_t ProductHelperHw::getHostMemCapabilitiesValue() const { diff --git a/shared/test/common/mocks/mock_product_helper.cpp b/shared/test/common/mocks/mock_product_helper.cpp index f97dcd8085..58a940ab17 100644 --- a/shared/test/common/mocks/mock_product_helper.cpp +++ b/shared/test/common/mocks/mock_product_helper.cpp @@ -30,6 +30,11 @@ uint32_t ProductHelperHw::getMaxLocalRegionSize(const HardwareInfo return 0; } +template <> +uint32_t ProductHelperHw::getMaxLocalSubRegionSize(const HardwareInfo &hwInfo) const { + return 0; +} + template <> uint32_t ProductHelperHw::getMaxThreadsForWorkgroupInDSSOrSS(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice, uint32_t maxNumEUsPerDualSubSlice) const { return 0; diff --git a/shared/test/common/test_macros/header/common_matchers.h b/shared/test/common/test_macros/header/common_matchers.h index bfb05ca79c..bd4e7fa4cc 100644 --- a/shared/test/common/test_macros/header/common_matchers.h +++ b/shared/test/common/test_macros/header/common_matchers.h @@ -49,6 +49,7 @@ using IsXe2HpgCoreOrXe3Core = IsAnyGfxCores; using IsXe3Core = IsGfxCore; using IsAtLeastXe3Core = IsAtLeastGfxCore; +using IsAtMostXe3Core = IsAtMostGfxCore; using IsTGLLP = IsProduct; using IsDG1 = IsProduct; 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 c38bf2c4f0..043eccbade 100644 --- a/shared/test/unit_test/os_interface/product_helper_tests.cpp +++ b/shared/test/unit_test/os_interface/product_helper_tests.cpp @@ -1122,3 +1122,8 @@ HWTEST_F(ProductHelperTest, whenAdjustScratchSizeThenSizeIsNotChanged) { HWTEST_F(ProductHelperTest, givenProductHelperWhenCheckingIs2MBLocalMemAlignmentEnabledThenCorrectValueIsReturned) { EXPECT_FALSE(productHelper->is2MBLocalMemAlignmentEnabled()); } + +HWTEST2_F(ProductHelperTest, WhenCheckAssignEngineRoundRobinSupportedThenReturnFalse, IsAtMostXe3Core) { + auto hwInfo = *defaultHwInfo; + EXPECT_EQ(0u, productHelper->getMaxLocalSubRegionSize(hwInfo)); +}