Remove not needed isL3Configurable helper function

Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>

Remove isL3Configurable function from
- HwHelper
- PreambleHelper
This commit is contained in:
Kamil Kopryk
2022-11-08 11:49:29 +00:00
committed by Compute-Runtime-Automation
parent a12251d464
commit c027d2c494
12 changed files with 2 additions and 78 deletions

View File

@@ -742,19 +742,6 @@ HWTEST_F(HwHelperTest, DISABLED_profilingCreationOfRenderSurfaceStateVsMemcpyOfC
} }
} }
HWTEST_F(HwHelperTest, WhenTestingIfL3ConfigProgrammableThenCorrectValueIsReturned) {
bool preambleHelperL3Config;
bool isL3Programmable;
const HardwareInfo &hwInfo = *defaultHwInfo;
preambleHelperL3Config =
PreambleHelper<FamilyType>::isL3Configurable(*defaultHwInfo);
isL3Programmable =
HwHelperHw<FamilyType>::get().isL3Configurable(hwInfo);
EXPECT_EQ(preambleHelperL3Config, isL3Programmable);
}
TEST(HwHelperCacheFlushTest, givenEnableCacheFlushFlagIsEnableWhenPlatformDoesNotSupportThenOverrideAndReturnSupportTrue) { TEST(HwHelperCacheFlushTest, givenEnableCacheFlushFlagIsEnableWhenPlatformDoesNotSupportThenOverrideAndReturnSupportTrue) {
DebugManagerStateRestore restore; DebugManagerStateRestore restore;
DebugManager.flags.EnableCacheFlushAfterWalker.set(1); DebugManager.flags.EnableCacheFlushAfterWalker.set(1);

View File

@@ -34,11 +34,6 @@ uint32_t PreambleHelper<Family>::getL3Config(const HardwareInfo &hwInfo, bool us
return l3Config; return l3Config;
} }
template <>
bool PreambleHelper<Family>::isL3Configurable(const HardwareInfo &hwInfo) {
return getL3Config(hwInfo, true) != getL3Config(hwInfo, false);
}
template <> template <>
void PreambleHelper<Family>::programPipelineSelect(LinearStream *pCommandStream, void PreambleHelper<Family>::programPipelineSelect(LinearStream *pCommandStream,
const PipelineSelectArgs &pipelineSelectArgs, const PipelineSelectArgs &pipelineSelectArgs,

View File

@@ -31,11 +31,6 @@ uint32_t PreambleHelper<Family>::getL3Config(const HardwareInfo &hwInfo, bool us
return l3Config; return l3Config;
} }
template <>
bool PreambleHelper<Family>::isL3Configurable(const HardwareInfo &hwInfo) {
return getL3Config(hwInfo, true) != getL3Config(hwInfo, false);
}
template <> template <>
void PreambleHelper<Family>::programPipelineSelect(LinearStream *pCommandStream, void PreambleHelper<Family>::programPipelineSelect(LinearStream *pCommandStream,
const PipelineSelectArgs &pipelineSelectArgs, const PipelineSelectArgs &pipelineSelectArgs,

View File

@@ -46,7 +46,6 @@ class HwHelper {
virtual uint32_t getPitchAlignmentForImage(const HardwareInfo *hwInfo) const = 0; virtual uint32_t getPitchAlignmentForImage(const HardwareInfo *hwInfo) const = 0;
virtual uint32_t getMaxNumSamplers() const = 0; virtual uint32_t getMaxNumSamplers() const = 0;
virtual void adjustDefaultEngineType(HardwareInfo *pHwInfo) = 0; virtual void adjustDefaultEngineType(HardwareInfo *pHwInfo) = 0;
virtual bool isL3Configurable(const HardwareInfo &hwInfo) = 0;
virtual SipKernelType getSipKernelType(bool debuggingActive) const = 0; virtual SipKernelType getSipKernelType(bool debuggingActive) const = 0;
virtual bool isLocalMemoryEnabled(const HardwareInfo &hwInfo) const = 0; virtual bool isLocalMemoryEnabled(const HardwareInfo &hwInfo) const = 0;
virtual bool is1MbAlignmentSupported(const HardwareInfo &hwInfo, bool isCompressionEnabled) const = 0; virtual bool is1MbAlignmentSupported(const HardwareInfo &hwInfo, bool isCompressionEnabled) const = 0;
@@ -216,8 +215,6 @@ class HwHelperHw : public HwHelper {
void adjustDefaultEngineType(HardwareInfo *pHwInfo) override; void adjustDefaultEngineType(HardwareInfo *pHwInfo) override;
bool isL3Configurable(const HardwareInfo &hwInfo) override;
SipKernelType getSipKernelType(bool debuggingActive) const override; SipKernelType getSipKernelType(bool debuggingActive) const override;
bool isLocalMemoryEnabled(const HardwareInfo &hwInfo) const override; bool isLocalMemoryEnabled(const HardwareInfo &hwInfo) const override;

View File

@@ -54,11 +54,6 @@ bool HwHelperHw<Family>::isStatelessToStatefulWithOffsetSupported() const {
return true; return true;
} }
template <typename Family>
bool HwHelperHw<Family>::isL3Configurable(const HardwareInfo &hwInfo) {
return PreambleHelper<Family>::isL3Configurable(hwInfo);
}
template <typename Family> template <typename Family>
SipKernelType HwHelperHw<Family>::getSipKernelType(bool debuggingActive) const { SipKernelType HwHelperHw<Family>::getSipKernelType(bool debuggingActive) const {
if (!debuggingActive) { if (!debuggingActive) {

View File

@@ -54,7 +54,6 @@ struct PreambleHelper {
static void programKernelDebugging(LinearStream *pCommandStream); static void programKernelDebugging(LinearStream *pCommandStream);
static void programSemaphoreDelay(LinearStream *pCommandStream); static void programSemaphoreDelay(LinearStream *pCommandStream);
static uint32_t getL3Config(const HardwareInfo &hwInfo, bool useSLM); static uint32_t getL3Config(const HardwareInfo &hwInfo, bool useSLM);
static bool isL3Configurable(const HardwareInfo &hwInfo);
static bool isSystolicModeConfigurable(const HardwareInfo &hwInfo); static bool isSystolicModeConfigurable(const HardwareInfo &hwInfo);
static size_t getAdditionalCommandsSize(const Device &device); static size_t getAdditionalCommandsSize(const Device &device);
static std::vector<int32_t> getSupportedThreadArbitrationPolicies(); static std::vector<int32_t> getSupportedThreadArbitrationPolicies();

View File

@@ -101,11 +101,6 @@ size_t PreambleHelper<GfxFamily>::getKernelDebuggingCommandsSize(bool debuggingA
return 0; return 0;
} }
template <typename GfxFamily>
bool PreambleHelper<GfxFamily>::isL3Configurable(const HardwareInfo &hwInfo) {
return false;
}
template <typename GfxFamily> template <typename GfxFamily>
void PreambleHelper<GfxFamily>::appendProgramVFEState(const HardwareInfo &hwInfo, const StreamProperties &streamProperties, void *cmd) {} void PreambleHelper<GfxFamily>::appendProgramVFEState(const HardwareInfo &hwInfo, const StreamProperties &streamProperties, void *cmd) {}

View File

@@ -42,13 +42,6 @@ GEN11TEST_F(IclSlm, givenGen11WhenProgramingL3ThenErrorDetectionBehaviorControlB
EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0); EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0);
} }
GEN11TEST_F(IclSlm, WhenCheckingL3IsConfigurableThenExpectItToBeFalse) {
bool isL3Programmable =
PreambleHelper<FamilyType>::isL3Configurable(*defaultHwInfo);
EXPECT_FALSE(isL3Programmable);
}
typedef PreambleFixture Gen11UrbEntryAllocationSize; typedef PreambleFixture Gen11UrbEntryAllocationSize;
GEN11TEST_F(Gen11UrbEntryAllocationSize, WhenPreambleRetrievesUrbEntryAllocationSizeThenValueIsCorrect) { GEN11TEST_F(Gen11UrbEntryAllocationSize, WhenPreambleRetrievesUrbEntryAllocationSizeThenValueIsCorrect) {
uint32_t actualVal = PreambleHelper<FamilyType>::getUrbEntryAllocationSize(); uint32_t actualVal = PreambleHelper<FamilyType>::getUrbEntryAllocationSize();

View File

@@ -32,13 +32,6 @@ HWTEST2_F(TglLpSlm, givenTglLpWhenPreambleIsBeingProgrammedThenThreadArbitration
EXPECT_EQ(0U, countMmio<FamilyType>(cmdList.begin(), cmdList.end(), 0xE404)); EXPECT_EQ(0U, countMmio<FamilyType>(cmdList.begin(), cmdList.end(), 0xE404));
} }
HWTEST2_F(TglLpSlm, WhenCheckingL3IsConfigurableThenExpectItToBeFalse, IsTGLLP) {
bool isL3Programmable =
PreambleHelper<Gen12LpFamily>::isL3Configurable(*defaultHwInfo);
EXPECT_FALSE(isL3Programmable);
}
HWTEST2_F(TglLpSlm, WhenPreambleIsCreatedThenSlmIsDisabled, IsTGLLP) { HWTEST2_F(TglLpSlm, WhenPreambleIsCreatedThenSlmIsDisabled, IsTGLLP) {
typedef Gen12LpFamily::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; typedef Gen12LpFamily::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM;
LinearStream &cs = linearStream; LinearStream &cs = linearStream;

View File

@@ -57,19 +57,6 @@ BDWTEST_F(Gen8L3Config, GivenlmWhenProgrammingL3ThenProgrammingIsCorrect) {
EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0); EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0);
} }
BDWTEST_F(Gen8L3Config, WhenPreambleIsCreatedThenL3ProgrammingIsCorrect) {
bool l3ConfigDifference;
bool isL3Programmable;
l3ConfigDifference =
PreambleHelper<Gen8Family>::getL3Config(*defaultHwInfo, true) !=
PreambleHelper<Gen8Family>::getL3Config(*defaultHwInfo, false);
isL3Programmable =
PreambleHelper<Gen8Family>::isL3Configurable(*defaultHwInfo);
EXPECT_EQ(l3ConfigDifference, isL3Programmable);
}
typedef PreambleFixture ThreadArbitrationGen8; typedef PreambleFixture ThreadArbitrationGen8;
BDWTEST_F(ThreadArbitrationGen8, givenPolicyWhenThreadArbitrationProgrammedThenDoNothing) { BDWTEST_F(ThreadArbitrationGen8, givenPolicyWhenThreadArbitrationProgrammedThenDoNothing) {
typedef Gen8Family::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM; typedef Gen8Family::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM;

View File

@@ -51,19 +51,6 @@ GEN9TEST_F(PreambleTestGen9, givenKernelDebuggingActiveAndDisabledPreemptionWhen
SourceLevelDebuggerPreambleTest<FamilyType>::givenKernelDebuggingActiveAndDisabledPreemptionWhenGetAdditionalCommandsSizeIsCalledThen2MiLoadRegisterImmCmdsAreInlcudedTest(); SourceLevelDebuggerPreambleTest<FamilyType>::givenKernelDebuggingActiveAndDisabledPreemptionWhenGetAdditionalCommandsSizeIsCalledThen2MiLoadRegisterImmCmdsAreInlcudedTest();
} }
GEN9TEST_F(PreambleTestGen9, givenGen9ThenL3IsProgrammed) {
bool l3ConfigDifference;
bool isL3Programmable;
l3ConfigDifference =
PreambleHelper<FamilyType>::getL3Config(*defaultHwInfo, true) !=
PreambleHelper<FamilyType>::getL3Config(*defaultHwInfo, false);
isL3Programmable =
PreambleHelper<FamilyType>::isL3Configurable(*defaultHwInfo);
EXPECT_EQ(l3ConfigDifference, isL3Programmable);
}
using ThreadArbitrationGen9 = PreambleFixture; using ThreadArbitrationGen9 = PreambleFixture;
GEN9TEST_F(ThreadArbitrationGen9, givenPreambleWhenItIsProgrammedThenThreadArbitrationIsNotSet) { GEN9TEST_F(ThreadArbitrationGen9, givenPreambleWhenItIsProgrammedThenThreadArbitrationIsNotSet) {
DebugManagerStateRestore dbgRestore; DebugManagerStateRestore dbgRestore;

View File

@@ -44,7 +44,8 @@ GEN9TEST_F(CommandEncoderTest, givenNoSlmThenCorrectMmioIsSet) {
auto itorLRI = find<MI_LOAD_REGISTER_IMM *>(commands.begin(), commands.end()); auto itorLRI = find<MI_LOAD_REGISTER_IMM *>(commands.begin(), commands.end());
ASSERT_NE(itorLRI, commands.end()); ASSERT_NE(itorLRI, commands.end());
auto cmd = genCmdCast<MI_LOAD_REGISTER_IMM *>(*itorLRI); auto cmd = genCmdCast<MI_LOAD_REGISTER_IMM *>(*itorLRI);
auto expectedData = PreambleHelper<FamilyType>::isL3Configurable(cmdContainer.getDevice()->getHardwareInfo()) ? 0x80000340u : 0x60000321u; auto isL3Configurable = (PreambleHelper<FamilyType>::getL3Config(pDevice->getHardwareInfo(), true) != PreambleHelper<FamilyType>::getL3Config(pDevice->getHardwareInfo(), false));
auto expectedData = isL3Configurable ? 0x80000340u : 0x60000321u;
EXPECT_EQ(cmd->getRegisterOffset(), 0x7034u); EXPECT_EQ(cmd->getRegisterOffset(), 0x7034u);
EXPECT_EQ(cmd->getDataDword(), expectedData); EXPECT_EQ(cmd->getDataDword(), expectedData);
} }