refactor: remove not needed condition in xe lpg product helper

release helper should be always set there
remove invalid setting rev id in xe lpg platform tests
simplify test that rely on release helper

Related-To: NEO-8187
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski 2023-08-24 13:07:24 +00:00 committed by Compute-Runtime-Automation
parent 7e34047352
commit d16debf5dc
2 changed files with 8 additions and 58 deletions

View File

@ -40,10 +40,8 @@ bool ProductHelperHw<gfxProduct>::isDirectSubmissionConstantCacheInvalidationNee
template <> template <>
std::pair<bool, bool> ProductHelperHw<gfxProduct>::isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo, bool isRcs, const ReleaseHelper *releaseHelper) const { std::pair<bool, bool> ProductHelperHw<gfxProduct>::isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo, bool isRcs, const ReleaseHelper *releaseHelper) const {
auto isBasicWARequired = true; UNRECOVERABLE_IF(!releaseHelper);
if (releaseHelper) { auto isBasicWARequired = releaseHelper->isPipeControlPriorToNonPipelinedStateCommandsWARequired();
isBasicWARequired = releaseHelper->isPipeControlPriorToNonPipelinedStateCommandsWARequired();
}
auto isExtendedWARequired = false; auto isExtendedWARequired = false;
return {isBasicWARequired, isExtendedWARequired}; return {isBasicWARequired, isExtendedWARequired};

View File

@ -123,12 +123,6 @@ MTLTEST_F(MtlProductHelper, givenProductHelperWhenAdditionalKernelExecInfoSuppor
FrontEndPropertiesSupport fePropertiesSupport{}; FrontEndPropertiesSupport fePropertiesSupport{};
productHelper->fillFrontEndPropertiesSupportStructure(fePropertiesSupport, hwInfo); productHelper->fillFrontEndPropertiesSupportStructure(fePropertiesSupport, hwInfo);
EXPECT_TRUE(fePropertiesSupport.disableOverdispatch); EXPECT_TRUE(fePropertiesSupport.disableOverdispatch);
hwInfo.platform.usRevId = productHelper->getHwRevIdFromStepping(REVISION_B, hwInfo);
EXPECT_TRUE(productHelper->isDisableOverdispatchAvailable(hwInfo));
productHelper->fillFrontEndPropertiesSupportStructure(fePropertiesSupport, hwInfo);
EXPECT_TRUE(fePropertiesSupport.disableOverdispatch);
} }
MTLTEST_F(MtlProductHelper, givenCompressionFtrEnabledWhenAskingForPageTableManagerThenReturnCorrectValue) { MTLTEST_F(MtlProductHelper, givenCompressionFtrEnabledWhenAskingForPageTableManagerThenReturnCorrectValue) {
@ -151,62 +145,20 @@ MTLTEST_F(MtlProductHelper, givenCompressionFtrEnabledWhenAskingForPageTableMana
EXPECT_TRUE(productHelper->isPageTableManagerSupported(hwInfo)); EXPECT_TRUE(productHelper->isPageTableManagerSupported(hwInfo));
} }
MTLTEST_F(MtlProductHelper, givenHwIpVersionWhenIsPipeControlPriorToNonPipelinedStateCommandsWARequiredIsCalledOnCcsThenAllowOnlyOn12700And12710) { MTLTEST_F(MtlProductHelper, givenHwIpVersionWhenIsPipeControlPriorToNonPipelinedStateCommandsWARequiredIsCalledOnCcsThenAllowBasedOnReleaseHelper) {
HardwareInfo hwInfo = *defaultHwInfo; HardwareInfo hwInfo = *defaultHwInfo;
auto isRcs = false; auto isRcs = false;
hwInfo.ipVersion.architecture = 12; AOT::PRODUCT_CONFIG ipReleases[] = {AOT::MTL_M_A0, AOT::MTL_M_B0, AOT::MTL_P_A0, AOT::MTL_P_B0};
hwInfo.ipVersion.release = 70; for (auto &ipRelease : ipReleases) {
hwInfo.ipVersion.revision = 0; hwInfo.ipVersion.value = ipRelease;
refreshReleaseHelper(&hwInfo); refreshReleaseHelper(&hwInfo);
{
const auto &[isBasicWARequired, isExtendedWARequired] = productHelper->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, isRcs, releaseHelper); const auto &[isBasicWARequired, isExtendedWARequired] = productHelper->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, isRcs, releaseHelper);
EXPECT_FALSE(isExtendedWARequired); EXPECT_FALSE(isExtendedWARequired);
EXPECT_TRUE(isBasicWARequired); EXPECT_EQ(releaseHelper->isPipeControlPriorToNonPipelinedStateCommandsWARequired(), isBasicWARequired);
} }
hwInfo.ipVersion.revision = 4;
refreshReleaseHelper(&hwInfo);
{
const auto &[isBasicWARequired, isExtendedWARequired] = productHelper->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, isRcs, releaseHelper);
EXPECT_FALSE(isExtendedWARequired);
EXPECT_FALSE(isBasicWARequired);
}
hwInfo.ipVersion.release = 71;
hwInfo.ipVersion.revision = 0;
refreshReleaseHelper(&hwInfo);
{
const auto &[isBasicWARequired, isExtendedWARequired] = productHelper->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, isRcs, releaseHelper);
EXPECT_FALSE(isExtendedWARequired);
EXPECT_TRUE(isBasicWARequired);
}
hwInfo.ipVersion.revision = 4;
refreshReleaseHelper(&hwInfo);
{
const auto &[isBasicWARequired, isExtendedWARequired] = productHelper->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, isRcs, releaseHelper);
EXPECT_FALSE(isExtendedWARequired);
EXPECT_FALSE(isBasicWARequired);
}
}
MTLTEST_F(MtlProductHelper, givenNoReleaseHelperWhenisPipeControlPriorToNonPipelinedStateCommandsWARequiredThenCorrectValuesAreReturned) {
auto &rootDeviceEnvironment = *this->executionEnvironment->rootDeviceEnvironments[0].get();
auto &hwInfo = *rootDeviceEnvironment.getMutableHardwareInfo();
ReleaseHelper *releaseHelper = nullptr;
const auto &[isBasicWARequired, isExtendedWARequired] = productHelper->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, false, releaseHelper);
EXPECT_FALSE(isExtendedWARequired);
EXPECT_TRUE(isBasicWARequired);
} }
MTLTEST_F(MtlProductHelper, givenMtlAndReleaseHelperNullptrWhenCallingGetMediaFrequencyTileIndexThenReturnFalse) { MTLTEST_F(MtlProductHelper, givenMtlAndReleaseHelperNullptrWhenCallingGetMediaFrequencyTileIndexThenReturnFalse) {