Revert "fix: call isPrefetchDisablingRequired directly from release helper"

This reverts commit 546318d258.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2023-05-19 04:46:42 +02:00
committed by Compute-Runtime-Automation
parent e032e1bdb6
commit e03160a87c
7 changed files with 22 additions and 4 deletions

View File

@@ -103,6 +103,7 @@ class ProductHelper {
virtual LocalMemoryAccessMode getLocalMemoryAccessMode(const HardwareInfo &hwInfo) const = 0;
virtual bool isAllocationSizeAdjustmentRequired(const HardwareInfo &hwInfo) const = 0;
virtual int getProductMaxPreferredSlmSize(const HardwareInfo &hwInfo, int preferredEnumValue) const = 0;
virtual bool isPrefetchDisablingRequired(const ReleaseHelper *releaseHelper) const = 0;
virtual bool isNewResidencyModelSupported() const = 0;
virtual bool isDirectSubmissionSupported(const HardwareInfo &hwInfo) const = 0;
virtual std::pair<bool, bool> isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo, bool isRcs, const ReleaseHelper *releaseHelper) const = 0;

View File

@@ -280,6 +280,13 @@ template <PRODUCT_FAMILY gfxProduct>
int ProductHelperHw<gfxProduct>::getProductMaxPreferredSlmSize(const HardwareInfo &hwInfo, int preferredEnumValue) const {
return preferredEnumValue;
}
template <PRODUCT_FAMILY gfxProduct>
bool ProductHelperHw<gfxProduct>::isPrefetchDisablingRequired(const ReleaseHelper *releaseHelper) const {
if (releaseHelper) {
return releaseHelper->isPrefetchDisablingRequired();
}
return false;
}
template <PRODUCT_FAMILY gfxProduct>
bool ProductHelperHw<gfxProduct>::isAssignEngineRoundRobinSupported() const {

View File

@@ -56,6 +56,7 @@ class ProductHelperHw : public ProductHelper {
LocalMemoryAccessMode getLocalMemoryAccessMode(const HardwareInfo &hwInfo) const override;
bool isAllocationSizeAdjustmentRequired(const HardwareInfo &hwInfo) const override;
int getProductMaxPreferredSlmSize(const HardwareInfo &hwInfo, int preferredEnumValue) const override;
bool isPrefetchDisablingRequired(const ReleaseHelper *releaseHelper) const override;
bool isNewResidencyModelSupported() const override;
bool isDirectSubmissionSupported(const HardwareInfo &hwInfo) const override;
std::pair<bool, bool> isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo, bool isRcs, const ReleaseHelper *releaseHelper) const override;

View File

@@ -12,7 +12,6 @@
#include "shared/source/command_stream/stream_properties.h"
#include "shared/source/helpers/cache_flush_xehp_and_later.inl"
#include "shared/source/os_interface/product_helper.h"
#include "shared/source/release_helper/release_helper.h"
#include "shared/source/utilities/lookup_array.h"
#include "shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h"
@@ -115,8 +114,9 @@ void EncodeDispatchKernel<Family>::programBarrierEnable(INTERFACE_DESCRIPTOR_DAT
template <>
void EncodeDispatchKernel<Family>::encodeAdditionalWalkerFields(const RootDeviceEnvironment &rootDeviceEnvironment, WALKER_TYPE &walkerCmd, const EncodeWalkerArgs &walkerArgs) {
auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
auto *releaseHelper = rootDeviceEnvironment.getReleaseHelper();
bool l3PrefetchDisable = releaseHelper->isPrefetchDisablingRequired();
bool l3PrefetchDisable = productHelper.isPrefetchDisablingRequired(releaseHelper);
int32_t overrideL3PrefetchDisable = DebugManager.flags.ForceL3PrefetchForComputeWalker.get();
if (overrideL3PrefetchDisable != -1) {
l3PrefetchDisable = !overrideL3PrefetchDisable;

View File

@@ -192,6 +192,11 @@ bool ProductHelperHw<IGFX_UNKNOWN>::isAllocationSizeAdjustmentRequired(const Har
return false;
}
template <>
bool ProductHelperHw<IGFX_UNKNOWN>::isPrefetchDisablingRequired(const ReleaseHelper *releaseHelper) const {
return false;
}
template <>
bool ProductHelperHw<IGFX_UNKNOWN>::isNewResidencyModelSupported() const {
return false;

View File

@@ -327,6 +327,11 @@ HWTEST_F(ProductHelperTest, WhenCheckAssignEngineRoundRobinSupportedThenReturnFa
EXPECT_FALSE(productHelper->isAssignEngineRoundRobinSupported());
}
HWTEST_F(ProductHelperTest, givenProductHelperWhenAskedIfPrefetchDisablingIsRequiredThenFalseIsReturned) {
EXPECT_FALSE(productHelper->isPrefetchDisablingRequired(releaseHelper));
}
HWTEST_F(ProductHelperTest, givenProductHelperWhenAskedIfPipeControlPriorToNonPipelinedStateCommandsWARequiredThenFalseIsReturned) {
auto isRcs = false;

View File

@@ -13,7 +13,6 @@
#include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/helpers/product_config_helper.h"
#include "shared/source/os_interface/product_helper.h"
#include "shared/source/release_helper/release_helper.h"
#include "shared/source/xe_hpg_core/hw_cmds_dg2.h"
#include "shared/test/common/fixtures/device_fixture.h"
#include "shared/test/common/helpers/debug_manager_state_restore.h"
@@ -290,7 +289,7 @@ DG2TEST_F(ProductHelperTestDg2, givenDg2G10A0OrA1SteppingWhenAskingIfWAIsRequire
EXPECT_EQ(expectedValue, productHelper->isDefaultEngineTypeAdjustmentRequired(hwInfo));
EXPECT_EQ(expectedValue, productHelper->isAllocationSizeAdjustmentRequired(hwInfo));
EXPECT_EQ(expectedValue, releaseHelper->isPrefetchDisablingRequired());
EXPECT_EQ(expectedValue, productHelper->isPrefetchDisablingRequired(releaseHelper));
}
}
}