Skip to content

Commit e03160a

Browse files
Revert "fix: call isPrefetchDisablingRequired directly from release helper"
This reverts commit 546318d. Signed-off-by: Compute-Runtime-Validation <[email protected]>
1 parent e032e1b commit e03160a

File tree

7 files changed

+22
-4
lines changed

7 files changed

+22
-4
lines changed

shared/source/os_interface/product_helper.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ 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;
106107
virtual bool isNewResidencyModelSupported() const = 0;
107108
virtual bool isDirectSubmissionSupported(const HardwareInfo &hwInfo) const = 0;
108109
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: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,13 @@ 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+
}
283290

284291
template <PRODUCT_FAMILY gfxProduct>
285292
bool ProductHelperHw<gfxProduct>::isAssignEngineRoundRobinSupported() const {

shared/source/os_interface/product_helper_hw.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ 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;
5960
bool isNewResidencyModelSupported() const override;
6061
bool isDirectSubmissionSupported(const HardwareInfo &hwInfo) const override;
6162
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,7 +12,6 @@
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"
1615
#include "shared/source/utilities/lookup_array.h"
1716
#include "shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h"
1817

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

116115
template <>
117116
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 = releaseHelper->isPrefetchDisablingRequired();
119+
bool l3PrefetchDisable = productHelper.isPrefetchDisablingRequired(releaseHelper);
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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,11 @@ 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+
195200
template <>
196201
bool ProductHelperHw<IGFX_UNKNOWN>::isNewResidencyModelSupported() const {
197202
return false;

shared/test/unit_test/os_interface/product_helper_tests.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,11 @@ 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+
330335
HWTEST_F(ProductHelperTest, givenProductHelperWhenAskedIfPipeControlPriorToNonPipelinedStateCommandsWARequiredThenFalseIsReturned) {
331336

332337
auto isRcs = false;

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
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"
1716
#include "shared/source/xe_hpg_core/hw_cmds_dg2.h"
1817
#include "shared/test/common/fixtures/device_fixture.h"
1918
#include "shared/test/common/helpers/debug_manager_state_restore.h"
@@ -290,7 +289,7 @@ DG2TEST_F(ProductHelperTestDg2, givenDg2G10A0OrA1SteppingWhenAskingIfWAIsRequire
290289

291290
EXPECT_EQ(expectedValue, productHelper->isDefaultEngineTypeAdjustmentRequired(hwInfo));
292291
EXPECT_EQ(expectedValue, productHelper->isAllocationSizeAdjustmentRequired(hwInfo));
293-
EXPECT_EQ(expectedValue, releaseHelper->isPrefetchDisablingRequired());
292+
EXPECT_EQ(expectedValue, productHelper->isPrefetchDisablingRequired(releaseHelper));
294293
}
295294
}
296295
}

0 commit comments

Comments
 (0)