Skip to content

Commit 05977f6

Browse files
feature: add getMaxLocalSubRegionSize() to product helper
Related-To: NEO-13954 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
1 parent d0871e0 commit 05977f6

8 files changed

+29
-3
lines changed

shared/source/gen12lp/os_agnostic_product_helper_gen12lp.inl

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021-2024 Intel Corporation
2+
* Copyright (C) 2021-2025 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -31,4 +31,8 @@ template <>
3131
uint32_t ProductHelperHw<gfxProduct>::getMaxLocalRegionSize(const HardwareInfo &hwInfo) const {
3232
return 0;
3333
}
34+
template <>
35+
uint32_t ProductHelperHw<gfxProduct>::getMaxLocalSubRegionSize(const HardwareInfo &hwInfo) const {
36+
return 0;
37+
}
3438
} // namespace NEO

shared/source/os_interface/product_helper.h

+1
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ class ProductHelper {
243243
virtual bool deferMOCSToPatIndex() const = 0;
244244
virtual const std::vector<uint32_t> getSupportedLocalDispatchSizes(const HardwareInfo &hwInfo) const = 0;
245245
virtual uint32_t getMaxLocalRegionSize(const HardwareInfo &hwInfo) const = 0;
246+
virtual uint32_t getMaxLocalSubRegionSize(const HardwareInfo &hwInfo) const = 0;
246247
virtual bool localDispatchSizeQuerySupported() const = 0;
247248
virtual bool supportReadOnlyAllocations() const = 0;
248249
virtual bool isDeviceToHostCopySignalingFenceRequired() const = 0;

shared/source/os_interface/product_helper_hw.h

+1
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ class ProductHelperHw : public ProductHelper {
185185
bool supportReadOnlyAllocations() const override;
186186
const std::vector<uint32_t> getSupportedLocalDispatchSizes(const HardwareInfo &hwInfo) const override;
187187
uint32_t getMaxLocalRegionSize(const HardwareInfo &hwInfo) const override;
188+
uint32_t getMaxLocalSubRegionSize(const HardwareInfo &hwInfo) const override;
188189
bool localDispatchSizeQuerySupported() const override;
189190
bool isDeviceToHostCopySignalingFenceRequired() const override;
190191
size_t getMaxFillPaternSizeForCopyEngine() const override;

shared/source/os_interface/product_helper_xe2_and_later.inl

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2024 Intel Corporation
2+
* Copyright (C) 2024-2025 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -25,6 +25,11 @@ uint32_t ProductHelperHw<gfxProduct>::getMaxLocalRegionSize(const HardwareInfo &
2525
return 0;
2626
}
2727

28+
template <PRODUCT_FAMILY gfxProduct>
29+
uint32_t ProductHelperHw<gfxProduct>::getMaxLocalSubRegionSize(const HardwareInfo &hwInfo) const {
30+
return 0;
31+
}
32+
2833
template <PRODUCT_FAMILY gfxProduct>
2934
uint64_t ProductHelperHw<gfxProduct>::getHostMemCapabilitiesValue() const {
3035
return (UnifiedSharedMemoryFlags::access | UnifiedSharedMemoryFlags::atomicAccess);

shared/source/os_interface/product_helper_xe_hpg_and_xe_hpc.inl

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021-2024 Intel Corporation
2+
* Copyright (C) 2021-2025 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -18,6 +18,10 @@ template <PRODUCT_FAMILY gfxProduct>
1818
uint32_t ProductHelperHw<gfxProduct>::getMaxLocalRegionSize(const HardwareInfo &hwInfo) const {
1919
return 0;
2020
}
21+
template <PRODUCT_FAMILY gfxProduct>
22+
uint32_t ProductHelperHw<gfxProduct>::getMaxLocalSubRegionSize(const HardwareInfo &hwInfo) const {
23+
return 0;
24+
}
2125

2226
template <PRODUCT_FAMILY gfxProduct>
2327
uint64_t ProductHelperHw<gfxProduct>::getHostMemCapabilitiesValue() const {

shared/test/common/mocks/mock_product_helper.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ uint32_t ProductHelperHw<IGFX_UNKNOWN>::getMaxLocalRegionSize(const HardwareInfo
3030
return 0;
3131
}
3232

33+
template <>
34+
uint32_t ProductHelperHw<IGFX_UNKNOWN>::getMaxLocalSubRegionSize(const HardwareInfo &hwInfo) const {
35+
return 0;
36+
}
37+
3338
template <>
3439
uint32_t ProductHelperHw<IGFX_UNKNOWN>::getMaxThreadsForWorkgroupInDSSOrSS(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice, uint32_t maxNumEUsPerDualSubSlice) const {
3540
return 0;

shared/test/common/test_macros/header/common_matchers.h

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ using IsXe2HpgCoreOrXe3Core = IsAnyGfxCores<IGFX_XE2_HPG_CORE, IGFX_XE3_CORE>;
4949

5050
using IsXe3Core = IsGfxCore<IGFX_XE3_CORE>;
5151
using IsAtLeastXe3Core = IsAtLeastGfxCore<IGFX_XE3_CORE>;
52+
using IsAtMostXe3Core = IsAtMostGfxCore<IGFX_XE3_CORE>;
5253

5354
using IsTGLLP = IsProduct<IGFX_TIGERLAKE_LP>;
5455
using IsDG1 = IsProduct<IGFX_DG1>;

shared/test/unit_test/os_interface/product_helper_tests.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -1122,3 +1122,8 @@ HWTEST_F(ProductHelperTest, whenAdjustScratchSizeThenSizeIsNotChanged) {
11221122
HWTEST_F(ProductHelperTest, givenProductHelperWhenCheckingIs2MBLocalMemAlignmentEnabledThenCorrectValueIsReturned) {
11231123
EXPECT_FALSE(productHelper->is2MBLocalMemAlignmentEnabled());
11241124
}
1125+
1126+
HWTEST2_F(ProductHelperTest, WhenCheckAssignEngineRoundRobinSupportedThenReturnFalse, IsAtMostXe3Core) {
1127+
auto hwInfo = *defaultHwInfo;
1128+
EXPECT_EQ(0u, productHelper->getMaxLocalSubRegionSize(hwInfo));
1129+
}

0 commit comments

Comments
 (0)