Skip to content

Commit 546318d

Browse files
fix: call isPrefetchDisablingRequired directly from release helper
Related-To: NEO-7786 Signed-off-by: Kamil Kopryk <[email protected]>
1 parent ac9a96c commit 546318d

File tree

7 files changed

+4
-22
lines changed

7 files changed

+4
-22
lines changed

shared/source/os_interface/product_helper.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ class ProductHelper {
103103
virtual LocalMemoryAccessMode getLocalMemoryAccessMode(const HardwareInfo &hwInfo) const = 0;
104104
virtual bool isAllocationSizeAdjustmentRequired(const HardwareInfo &hwInfo) const = 0;
105105
virtual int getProductMaxPreferredSlmSize(const HardwareInfo &hwInfo, int preferredEnumValue) const = 0;
106-
virtual bool isPrefetchDisablingRequired(const ReleaseHelper *releaseHelper) const = 0;
107106
virtual bool isNewResidencyModelSupported() const = 0;
108107
virtual bool isDirectSubmissionSupported(const HardwareInfo &hwInfo) const = 0;
109108
virtual std::pair<bool, bool> isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo, bool isRcs, const ReleaseHelper *releaseHelper) const = 0;

shared/source/os_interface/product_helper.inl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -280,13 +280,6 @@ template <PRODUCT_FAMILY gfxProduct>
280280
int ProductHelperHw<gfxProduct>::getProductMaxPreferredSlmSize(const HardwareInfo &hwInfo, int preferredEnumValue) const {
281281
return preferredEnumValue;
282282
}
283-
template <PRODUCT_FAMILY gfxProduct>
284-
bool ProductHelperHw<gfxProduct>::isPrefetchDisablingRequired(const ReleaseHelper *releaseHelper) const {
285-
if (releaseHelper) {
286-
return releaseHelper->isPrefetchDisablingRequired();
287-
}
288-
return false;
289-
}
290283

291284
template <PRODUCT_FAMILY gfxProduct>
292285
bool ProductHelperHw<gfxProduct>::isAssignEngineRoundRobinSupported() const {

shared/source/os_interface/product_helper_hw.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ class ProductHelperHw : public ProductHelper {
5656
LocalMemoryAccessMode getLocalMemoryAccessMode(const HardwareInfo &hwInfo) const override;
5757
bool isAllocationSizeAdjustmentRequired(const HardwareInfo &hwInfo) const override;
5858
int getProductMaxPreferredSlmSize(const HardwareInfo &hwInfo, int preferredEnumValue) const override;
59-
bool isPrefetchDisablingRequired(const ReleaseHelper *releaseHelper) const override;
6059
bool isNewResidencyModelSupported() const override;
6160
bool isDirectSubmissionSupported(const HardwareInfo &hwInfo) const override;
6261
std::pair<bool, bool> isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo, bool isRcs, const ReleaseHelper *releaseHelper) const override;

shared/source/xe_hpg_core/command_encoder_xe_hpg_core.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "shared/source/command_stream/stream_properties.h"
1313
#include "shared/source/helpers/cache_flush_xehp_and_later.inl"
1414
#include "shared/source/os_interface/product_helper.h"
15+
#include "shared/source/release_helper/release_helper.h"
1516
#include "shared/source/utilities/lookup_array.h"
1617
#include "shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h"
1718

@@ -114,9 +115,8 @@ void EncodeDispatchKernel<Family>::programBarrierEnable(INTERFACE_DESCRIPTOR_DAT
114115

115116
template <>
116117
void EncodeDispatchKernel<Family>::encodeAdditionalWalkerFields(const RootDeviceEnvironment &rootDeviceEnvironment, WALKER_TYPE &walkerCmd, const EncodeWalkerArgs &walkerArgs) {
117-
auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
118118
auto *releaseHelper = rootDeviceEnvironment.getReleaseHelper();
119-
bool l3PrefetchDisable = productHelper.isPrefetchDisablingRequired(releaseHelper);
119+
bool l3PrefetchDisable = releaseHelper->isPrefetchDisablingRequired();
120120
int32_t overrideL3PrefetchDisable = DebugManager.flags.ForceL3PrefetchForComputeWalker.get();
121121
if (overrideL3PrefetchDisable != -1) {
122122
l3PrefetchDisable = !overrideL3PrefetchDisable;

shared/test/common/mocks/mock_product_helper.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,6 @@ bool ProductHelperHw<IGFX_UNKNOWN>::isAllocationSizeAdjustmentRequired(const Har
192192
return false;
193193
}
194194

195-
template <>
196-
bool ProductHelperHw<IGFX_UNKNOWN>::isPrefetchDisablingRequired(const ReleaseHelper *releaseHelper) const {
197-
return false;
198-
}
199-
200195
template <>
201196
bool ProductHelperHw<IGFX_UNKNOWN>::isNewResidencyModelSupported() const {
202197
return false;

shared/test/unit_test/os_interface/product_helper_tests.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,11 +327,6 @@ HWTEST_F(ProductHelperTest, WhenCheckAssignEngineRoundRobinSupportedThenReturnFa
327327
EXPECT_FALSE(productHelper->isAssignEngineRoundRobinSupported());
328328
}
329329

330-
HWTEST_F(ProductHelperTest, givenProductHelperWhenAskedIfPrefetchDisablingIsRequiredThenFalseIsReturned) {
331-
332-
EXPECT_FALSE(productHelper->isPrefetchDisablingRequired(releaseHelper));
333-
}
334-
335330
HWTEST_F(ProductHelperTest, givenProductHelperWhenAskedIfPipeControlPriorToNonPipelinedStateCommandsWARequiredThenFalseIsReturned) {
336331

337332
auto isRcs = false;

shared/test/unit_test/xe_hpg_core/dg2/product_config_helper_tests_dg2.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "shared/source/helpers/gfx_core_helper.h"
1414
#include "shared/source/helpers/product_config_helper.h"
1515
#include "shared/source/os_interface/product_helper.h"
16+
#include "shared/source/release_helper/release_helper.h"
1617
#include "shared/source/xe_hpg_core/hw_cmds_dg2.h"
1718
#include "shared/test/common/fixtures/device_fixture.h"
1819
#include "shared/test/common/helpers/debug_manager_state_restore.h"
@@ -289,7 +290,7 @@ DG2TEST_F(ProductHelperTestDg2, givenDg2G10A0OrA1SteppingWhenAskingIfWAIsRequire
289290

290291
EXPECT_EQ(expectedValue, productHelper->isDefaultEngineTypeAdjustmentRequired(hwInfo));
291292
EXPECT_EQ(expectedValue, productHelper->isAllocationSizeAdjustmentRequired(hwInfo));
292-
EXPECT_EQ(expectedValue, productHelper->isPrefetchDisablingRequired(releaseHelper));
293+
EXPECT_EQ(expectedValue, releaseHelper->isPrefetchDisablingRequired());
293294
}
294295
}
295296
}

0 commit comments

Comments
 (0)