mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-12 00:59:38 +08:00
ProductHelper ults cleanup - gen12lp
Related-To: NEO-6853 Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com> Don't use DeviceFixture if not needed Use HwInfoConfigTest fixture
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a969636b6a
commit
a46a1f4cbd
@@ -12,7 +12,7 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
struct HwInfoConfigTestLinuxAdln : HwInfoConfigTestLinux {
|
||||
struct AdlnProductHelperLinux : HwInfoConfigTestLinux {
|
||||
void SetUp() override {
|
||||
HwInfoConfigTestLinux::SetUp();
|
||||
|
||||
@@ -21,9 +21,9 @@ struct HwInfoConfigTestLinuxAdln : HwInfoConfigTestLinux {
|
||||
}
|
||||
};
|
||||
|
||||
ADLNTEST_F(HwInfoConfigTestLinuxAdln, WhenConfiguringHwInfoThenConfigIsCorrect) {
|
||||
auto &productHelper = getHelper<ProductHelper>();
|
||||
auto ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
ADLNTEST_F(AdlnProductHelperLinux, WhenConfiguringHwInfoThenConfigIsCorrect) {
|
||||
|
||||
auto ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
EXPECT_EQ(0, ret);
|
||||
EXPECT_EQ(static_cast<uint32_t>(drm->storedEUVal), outHwInfo.gtSystemInfo.EUCount);
|
||||
EXPECT_EQ(static_cast<uint32_t>(drm->storedSSVal), outHwInfo.gtSystemInfo.SubSliceCount);
|
||||
@@ -32,22 +32,23 @@ ADLNTEST_F(HwInfoConfigTestLinuxAdln, WhenConfiguringHwInfoThenConfigIsCorrect)
|
||||
EXPECT_FALSE(outHwInfo.featureTable.flags.ftrTileY);
|
||||
}
|
||||
|
||||
ADLNTEST_F(HwInfoConfigTestLinuxAdln, GivenIncorrectDataWhenConfiguringHwInfoThenErrorIsReturned) {
|
||||
auto &productHelper = getHelper<ProductHelper>();
|
||||
ADLNTEST_F(AdlnProductHelperLinux, GivenIncorrectDataWhenConfiguringHwInfoThenErrorIsReturned) {
|
||||
|
||||
drm->failRetTopology = true;
|
||||
drm->storedRetValForEUVal = -1;
|
||||
auto ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
auto ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
EXPECT_EQ(-1, ret);
|
||||
|
||||
drm->storedRetValForEUVal = 0;
|
||||
drm->storedRetValForSSVal = -1;
|
||||
ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
|
||||
EXPECT_EQ(-1, ret);
|
||||
}
|
||||
|
||||
TEST(AdlnHwInfoTests, WhenSettingUpHwInfoThenConfigIsCorrect) {
|
||||
using AdlnHwInfoLinux = ::testing::Test;
|
||||
|
||||
ADLNTEST_F(AdlnHwInfoLinux, WhenSettingUpHwInfoThenConfigIsCorrect) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
|
||||
@@ -18,11 +18,7 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using AdlnHwInfo = HwInfoConfigTest;
|
||||
|
||||
ADLNTEST_F(AdlnHwInfo, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned) {
|
||||
EXPECT_EQ(aub_stream::ProductFamily::Adln, productHelper->getAubStreamProductFamily());
|
||||
}
|
||||
using AdlnHwInfo = ::testing::Test;
|
||||
|
||||
ADLNTEST_F(AdlnHwInfo, givenBoolWhenCallAdlnHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) {
|
||||
static bool boolValue[]{
|
||||
@@ -71,46 +67,46 @@ ADLNTEST_F(AdlnHwInfo, givenAdlnWhenCheckL0ThenReturnTrue) {
|
||||
EXPECT_TRUE(hardwareInfo.capabilityTable.levelZeroSupported);
|
||||
}
|
||||
|
||||
ADLNTEST_F(AdlnHwInfo, givenHwInfoConfigWhenGetProductConfigThenCorrectMatchIsFound) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
EXPECT_EQ(hwInfoConfig.getProductConfigFromHwInfo(hwInfo), AOT::ADL_N);
|
||||
using AdlnProductHelper = HwInfoConfigTest;
|
||||
|
||||
ADLNTEST_F(AdlnProductHelper, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned) {
|
||||
EXPECT_EQ(aub_stream::ProductFamily::Adln, productHelper->getAubStreamProductFamily());
|
||||
}
|
||||
|
||||
ADLNTEST_F(AdlnHwInfo, givenHwInfoConfigWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
EXPECT_TRUE(hwInfoConfig.isEvictionIfNecessaryFlagSupported());
|
||||
ADLNTEST_F(AdlnProductHelper, givenProductHelperWhenGetProductConfigThenCorrectMatchIsFound) {
|
||||
EXPECT_EQ(productHelper->getProductConfigFromHwInfo(pInHwInfo), AOT::ADL_N);
|
||||
}
|
||||
|
||||
ADLNTEST_F(AdlnHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyThreadArbitrationPolicySupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getScmPropertyCoherencyRequiredSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfModeSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport());
|
||||
|
||||
EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport());
|
||||
|
||||
EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport());
|
||||
|
||||
EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport());
|
||||
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport());
|
||||
|
||||
EXPECT_TRUE(hwInfoConfig.getPipelineSelectPropertyModeSelectedSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getPipelineSelectPropertyMediaSamplerDopClockGateSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getPipelineSelectPropertySystolicModeSupport());
|
||||
ADLNTEST_F(AdlnProductHelper, givenProductHelperWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) {
|
||||
EXPECT_TRUE(productHelper->isEvictionIfNecessaryFlagSupported());
|
||||
}
|
||||
|
||||
ADLNTEST_F(AdlnProductHelper, givenProductHelperWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) {
|
||||
|
||||
EXPECT_FALSE(productHelper->getScmPropertyThreadArbitrationPolicySupport());
|
||||
EXPECT_TRUE(productHelper->getScmPropertyCoherencyRequiredSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyZPassAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyPixelAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyLargeGrfModeSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyDevicePreemptionModeSupport());
|
||||
|
||||
EXPECT_FALSE(productHelper->getStateBaseAddressPropertyGlobalAtomicsSupport());
|
||||
EXPECT_TRUE(productHelper->getStateBaseAddressPropertyStatelessMocsSupport());
|
||||
EXPECT_FALSE(productHelper->getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport());
|
||||
|
||||
EXPECT_TRUE(productHelper->getFrontEndPropertyScratchSizeSupport());
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertyPrivateScratchSizeSupport());
|
||||
|
||||
EXPECT_TRUE(productHelper->getPreemptionDbgPropertyPreemptionModeSupport());
|
||||
EXPECT_TRUE(productHelper->getPreemptionDbgPropertyStateSipSupport());
|
||||
EXPECT_TRUE(productHelper->getPreemptionDbgPropertyCsrSurfaceSupport());
|
||||
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertyComputeDispatchAllWalkerSupport());
|
||||
EXPECT_TRUE(productHelper->getFrontEndPropertyDisableEuFusionSupport());
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertyDisableOverDispatchSupport());
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertySingleSliceDispatchCcsModeSupport());
|
||||
|
||||
EXPECT_TRUE(productHelper->getPipelineSelectPropertyModeSelectedSupport());
|
||||
EXPECT_TRUE(productHelper->getPipelineSelectPropertyMediaSamplerDopClockGateSupport());
|
||||
EXPECT_FALSE(productHelper->getPipelineSelectPropertySystolicModeSupport());
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
struct HwInfoConfigTestLinuxAdlp : HwInfoConfigTestLinux {
|
||||
struct AdlpProductHelperLinux : HwInfoConfigTestLinux {
|
||||
void SetUp() override {
|
||||
HwInfoConfigTestLinux::SetUp();
|
||||
|
||||
@@ -22,9 +22,9 @@ struct HwInfoConfigTestLinuxAdlp : HwInfoConfigTestLinux {
|
||||
}
|
||||
};
|
||||
|
||||
ADLPTEST_F(HwInfoConfigTestLinuxAdlp, WhenConfiguringHwInfoThenInfoIsSetCorrectly) {
|
||||
auto &productHelper = getHelper<ProductHelper>();
|
||||
auto ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
ADLPTEST_F(AdlpProductHelperLinux, WhenConfiguringHwInfoThenInfoIsSetCorrectly) {
|
||||
|
||||
auto ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
|
||||
EXPECT_EQ(0, ret);
|
||||
EXPECT_EQ(static_cast<uint32_t>(drm->storedEUVal), outHwInfo.gtSystemInfo.EUCount);
|
||||
@@ -34,22 +34,21 @@ ADLPTEST_F(HwInfoConfigTestLinuxAdlp, WhenConfiguringHwInfoThenInfoIsSetCorrectl
|
||||
EXPECT_FALSE(outHwInfo.featureTable.flags.ftrTileY);
|
||||
}
|
||||
|
||||
ADLPTEST_F(HwInfoConfigTestLinuxAdlp, GivenInvalidDeviceIdWhenConfiguringHwInfoThenErrorIsReturned) {
|
||||
auto &productHelper = getHelper<ProductHelper>();
|
||||
ADLPTEST_F(AdlpProductHelperLinux, GivenInvalidDeviceIdWhenConfiguringHwInfoThenErrorIsReturned) {
|
||||
|
||||
drm->failRetTopology = true;
|
||||
drm->storedRetValForEUVal = -1;
|
||||
auto ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
auto ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
|
||||
EXPECT_EQ(-1, ret);
|
||||
|
||||
drm->storedRetValForEUVal = 0;
|
||||
drm->storedRetValForSSVal = -1;
|
||||
ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
EXPECT_EQ(-1, ret);
|
||||
}
|
||||
|
||||
ADLPTEST_F(HwInfoConfigTestLinuxAdlp, givenAdlpConfigWhenSetupHardwareInfoBaseThenGtSystemInfoIsCorrect) {
|
||||
ADLPTEST_F(AdlpProductHelperLinux, givenAdlpConfigWhenSetupHardwareInfoBaseThenGtSystemInfoIsCorrect) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo;
|
||||
ADLP::setupHardwareInfoBase(&hwInfo, false);
|
||||
@@ -61,10 +60,10 @@ ADLPTEST_F(HwInfoConfigTestLinuxAdlp, givenAdlpConfigWhenSetupHardwareInfoBaseTh
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
using AdlpConfigHwInfoTests = ::testing::Test;
|
||||
using AdlpHwInfoLinux = ::testing::Test;
|
||||
using adlpConfigTestTypes = ::testing::Types<AdlpHwConfig>;
|
||||
TYPED_TEST_CASE(AdlpConfigHwInfoTests, adlpConfigTestTypes);
|
||||
TYPED_TEST(AdlpConfigHwInfoTests, givenAdlpConfigWhenSetupHardwareInfoThenGtSystemInfoAndWaAndFtrTablesAreSetCorrect) {
|
||||
TYPED_TEST_CASE(AdlpHwInfoLinux, adlpConfigTestTypes);
|
||||
TYPED_TEST(AdlpHwInfoLinux, givenAdlpConfigWhenSetupHardwareInfoThenGtSystemInfoAndWaAndFtrTablesAreSetCorrect) {
|
||||
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
@@ -135,7 +134,7 @@ TYPED_TEST(AdlpConfigHwInfoTests, givenAdlpConfigWhenSetupHardwareInfoThenGtSyst
|
||||
}
|
||||
}
|
||||
|
||||
TYPED_TEST(AdlpConfigHwInfoTests, givenSliceCountZeroWhenSetupHardwareInfoThenNotZeroValuesSetInGtSystemInfo) {
|
||||
TYPED_TEST(AdlpHwInfoLinux, givenSliceCountZeroWhenSetupHardwareInfoThenNotZeroValuesSetInGtSystemInfo) {
|
||||
HardwareInfo hwInfo = {};
|
||||
hwInfo.gtSystemInfo = {0};
|
||||
|
||||
|
||||
@@ -18,11 +18,7 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using AdlpHwInfo = HwInfoConfigTest;
|
||||
|
||||
ADLPTEST_F(AdlpHwInfo, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned) {
|
||||
EXPECT_EQ(aub_stream::ProductFamily::Adlp, productHelper->getAubStreamProductFamily());
|
||||
}
|
||||
using AdlpHwInfo = ::testing::Test;
|
||||
|
||||
ADLPTEST_F(AdlpHwInfo, givenBoolWhenCallAdlpHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) {
|
||||
static bool boolValue[]{
|
||||
@@ -70,52 +66,53 @@ ADLPTEST_F(AdlpHwInfo, givenAdlpWhenCheckL0ThenReturnTrue) {
|
||||
EXPECT_TRUE(hardwareInfo.capabilityTable.levelZeroSupported);
|
||||
}
|
||||
|
||||
ADLPTEST_F(AdlpHwInfo, givenHwInfoConfigWhenGetProductConfigThenCorrectMatchIsFound) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
EXPECT_EQ(hwInfoConfig.getProductConfigFromHwInfo(hwInfo), AOT::ADL_P);
|
||||
using AdlpProductHelper = HwInfoConfigTest;
|
||||
|
||||
ADLPTEST_F(AdlpProductHelper, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned) {
|
||||
EXPECT_EQ(aub_stream::ProductFamily::Adlp, productHelper->getAubStreamProductFamily());
|
||||
}
|
||||
|
||||
ADLPTEST_F(AdlpHwInfo, givenHwInfoConfigWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
EXPECT_TRUE(hwInfoConfig.isEvictionIfNecessaryFlagSupported());
|
||||
ADLPTEST_F(AdlpProductHelper, givenProductHelperWhenGetProductConfigThenCorrectMatchIsFound) {
|
||||
|
||||
EXPECT_EQ(productHelper->getProductConfigFromHwInfo(pInHwInfo), AOT::ADL_P);
|
||||
}
|
||||
|
||||
ADLPTEST_F(AdlpHwInfo, givenHwInfoConfigWhenIsSystolicModeConfigurabledThenTrueIsReturned) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
EXPECT_TRUE(hwInfoConfig.isSystolicModeConfigurable(hwInfo));
|
||||
ADLPTEST_F(AdlpProductHelper, givenProductHelperWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) {
|
||||
|
||||
EXPECT_TRUE(productHelper->isEvictionIfNecessaryFlagSupported());
|
||||
}
|
||||
|
||||
ADLPTEST_F(AdlpHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
ADLPTEST_F(AdlpProductHelper, givenProductHelperWhenIsSystolicModeConfigurabledThenTrueIsReturned) {
|
||||
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyThreadArbitrationPolicySupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getScmPropertyCoherencyRequiredSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfModeSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport());
|
||||
|
||||
EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport());
|
||||
|
||||
EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport());
|
||||
|
||||
EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport());
|
||||
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport());
|
||||
|
||||
EXPECT_TRUE(hwInfoConfig.getPipelineSelectPropertyModeSelectedSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getPipelineSelectPropertyMediaSamplerDopClockGateSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getPipelineSelectPropertySystolicModeSupport());
|
||||
EXPECT_TRUE(productHelper->isSystolicModeConfigurable(pInHwInfo));
|
||||
}
|
||||
|
||||
ADLPTEST_F(AdlpProductHelper, givenProductHelperWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) {
|
||||
|
||||
EXPECT_FALSE(productHelper->getScmPropertyThreadArbitrationPolicySupport());
|
||||
EXPECT_TRUE(productHelper->getScmPropertyCoherencyRequiredSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyZPassAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyPixelAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyLargeGrfModeSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyDevicePreemptionModeSupport());
|
||||
|
||||
EXPECT_FALSE(productHelper->getStateBaseAddressPropertyGlobalAtomicsSupport());
|
||||
EXPECT_TRUE(productHelper->getStateBaseAddressPropertyStatelessMocsSupport());
|
||||
EXPECT_FALSE(productHelper->getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport());
|
||||
|
||||
EXPECT_TRUE(productHelper->getFrontEndPropertyScratchSizeSupport());
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertyPrivateScratchSizeSupport());
|
||||
|
||||
EXPECT_TRUE(productHelper->getPreemptionDbgPropertyPreemptionModeSupport());
|
||||
EXPECT_TRUE(productHelper->getPreemptionDbgPropertyStateSipSupport());
|
||||
EXPECT_TRUE(productHelper->getPreemptionDbgPropertyCsrSurfaceSupport());
|
||||
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertyComputeDispatchAllWalkerSupport());
|
||||
EXPECT_TRUE(productHelper->getFrontEndPropertyDisableEuFusionSupport());
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertyDisableOverDispatchSupport());
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertySingleSliceDispatchCcsModeSupport());
|
||||
|
||||
EXPECT_TRUE(productHelper->getPipelineSelectPropertyModeSelectedSupport());
|
||||
EXPECT_TRUE(productHelper->getPipelineSelectPropertyMediaSamplerDopClockGateSupport());
|
||||
EXPECT_TRUE(productHelper->getPipelineSelectPropertySystolicModeSupport());
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
struct HwInfoConfigTestLinuxAdls : HwInfoConfigTestLinux {
|
||||
struct AdlsProductHelperLinux : HwInfoConfigTestLinux {
|
||||
void SetUp() override {
|
||||
HwInfoConfigTestLinux::SetUp();
|
||||
|
||||
@@ -21,9 +21,9 @@ struct HwInfoConfigTestLinuxAdls : HwInfoConfigTestLinux {
|
||||
}
|
||||
};
|
||||
|
||||
ADLSTEST_F(HwInfoConfigTestLinuxAdls, WhenConfiguringHwInfoThenConfigIsCorrect) {
|
||||
auto &productHelper = getHelper<ProductHelper>();
|
||||
auto ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
ADLSTEST_F(AdlsProductHelperLinux, WhenConfiguringHwInfoThenConfigIsCorrect) {
|
||||
|
||||
auto ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
|
||||
EXPECT_EQ(0, ret);
|
||||
EXPECT_EQ(static_cast<uint32_t>(drm->storedEUVal), outHwInfo.gtSystemInfo.EUCount);
|
||||
@@ -33,21 +33,22 @@ ADLSTEST_F(HwInfoConfigTestLinuxAdls, WhenConfiguringHwInfoThenConfigIsCorrect)
|
||||
EXPECT_FALSE(outHwInfo.featureTable.flags.ftrTileY);
|
||||
}
|
||||
|
||||
ADLSTEST_F(HwInfoConfigTestLinuxAdls, GivenIncorrectDataWhenConfiguringHwInfoThenErrorIsReturned) {
|
||||
auto &productHelper = getHelper<ProductHelper>();
|
||||
ADLSTEST_F(AdlsProductHelperLinux, GivenIncorrectDataWhenConfiguringHwInfoThenErrorIsReturned) {
|
||||
|
||||
drm->failRetTopology = true;
|
||||
drm->storedRetValForEUVal = -1;
|
||||
auto ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
auto ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
EXPECT_EQ(-1, ret);
|
||||
|
||||
drm->storedRetValForEUVal = 0;
|
||||
drm->storedRetValForSSVal = -1;
|
||||
ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
EXPECT_EQ(-1, ret);
|
||||
}
|
||||
|
||||
TEST(AdlsHwInfoTests, WhenSettingUpHwInfoThenConfigIsCorrect) {
|
||||
using AdlsHwInfoLinux = ::testing::Test;
|
||||
|
||||
ADLSTEST_F(AdlsHwInfoLinux, WhenSettingUpHwInfoThenConfigIsCorrect) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
|
||||
@@ -18,11 +18,7 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using AdlsHwInfo = HwInfoConfigTest;
|
||||
|
||||
ADLSTEST_F(AdlsHwInfo, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned) {
|
||||
EXPECT_EQ(aub_stream::ProductFamily::Adls, productHelper->getAubStreamProductFamily());
|
||||
}
|
||||
using AdlsHwInfo = ::testing::Test;
|
||||
|
||||
ADLSTEST_F(AdlsHwInfo, givenBoolWhenCallAdlsHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) {
|
||||
static bool boolValue[]{
|
||||
@@ -70,46 +66,48 @@ ADLSTEST_F(AdlsHwInfo, givenAdlsWhenCheckL0ThenReturnTrue) {
|
||||
EXPECT_TRUE(hardwareInfo.capabilityTable.levelZeroSupported);
|
||||
}
|
||||
|
||||
ADLSTEST_F(AdlsHwInfo, givenHwInfoConfigWhenGetProductConfigThenCorrectMatchIsFound) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
EXPECT_EQ(hwInfoConfig.getProductConfigFromHwInfo(hwInfo), AOT::ADL_S);
|
||||
using AdlsProductHelper = HwInfoConfigTest;
|
||||
|
||||
ADLSTEST_F(AdlsProductHelper, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned) {
|
||||
EXPECT_EQ(aub_stream::ProductFamily::Adls, productHelper->getAubStreamProductFamily());
|
||||
}
|
||||
|
||||
ADLSTEST_F(AdlsHwInfo, givenHwInfoConfigWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
EXPECT_TRUE(hwInfoConfig.isEvictionIfNecessaryFlagSupported());
|
||||
ADLSTEST_F(AdlsProductHelper, givenProductHelperWhenGetProductConfigThenCorrectMatchIsFound) {
|
||||
|
||||
EXPECT_EQ(productHelper->getProductConfigFromHwInfo(pInHwInfo), AOT::ADL_S);
|
||||
}
|
||||
|
||||
ADLSTEST_F(AdlsHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
ADLSTEST_F(AdlsProductHelper, givenProductHelperWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) {
|
||||
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyThreadArbitrationPolicySupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getScmPropertyCoherencyRequiredSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfModeSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport());
|
||||
|
||||
EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport());
|
||||
|
||||
EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport());
|
||||
|
||||
EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport());
|
||||
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport());
|
||||
|
||||
EXPECT_TRUE(hwInfoConfig.getPipelineSelectPropertyModeSelectedSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getPipelineSelectPropertyMediaSamplerDopClockGateSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getPipelineSelectPropertySystolicModeSupport());
|
||||
EXPECT_TRUE(productHelper->isEvictionIfNecessaryFlagSupported());
|
||||
}
|
||||
|
||||
ADLSTEST_F(AdlsProductHelper, givenProductHelperWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) {
|
||||
|
||||
EXPECT_FALSE(productHelper->getScmPropertyThreadArbitrationPolicySupport());
|
||||
EXPECT_TRUE(productHelper->getScmPropertyCoherencyRequiredSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyZPassAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyPixelAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyLargeGrfModeSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyDevicePreemptionModeSupport());
|
||||
|
||||
EXPECT_FALSE(productHelper->getStateBaseAddressPropertyGlobalAtomicsSupport());
|
||||
EXPECT_TRUE(productHelper->getStateBaseAddressPropertyStatelessMocsSupport());
|
||||
EXPECT_FALSE(productHelper->getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport());
|
||||
|
||||
EXPECT_TRUE(productHelper->getFrontEndPropertyScratchSizeSupport());
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertyPrivateScratchSizeSupport());
|
||||
|
||||
EXPECT_TRUE(productHelper->getPreemptionDbgPropertyPreemptionModeSupport());
|
||||
EXPECT_TRUE(productHelper->getPreemptionDbgPropertyStateSipSupport());
|
||||
EXPECT_TRUE(productHelper->getPreemptionDbgPropertyCsrSurfaceSupport());
|
||||
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertyComputeDispatchAllWalkerSupport());
|
||||
EXPECT_TRUE(productHelper->getFrontEndPropertyDisableEuFusionSupport());
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertyDisableOverDispatchSupport());
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertySingleSliceDispatchCcsModeSupport());
|
||||
|
||||
EXPECT_TRUE(productHelper->getPipelineSelectPropertyModeSelectedSupport());
|
||||
EXPECT_TRUE(productHelper->getPipelineSelectPropertyMediaSamplerDopClockGateSupport());
|
||||
EXPECT_FALSE(productHelper->getPipelineSelectPropertySystolicModeSupport());
|
||||
}
|
||||
|
||||
@@ -9,39 +9,15 @@
|
||||
#include "shared/source/gen12lp/hw_cmds_dg1.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/helpers/gtest_helpers.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/unit_test/os_interface/linux/hw_info_config_linux_tests.h"
|
||||
|
||||
using HwInfoConfigTestLinuxDg1 = Test<DeviceFixture>;
|
||||
using namespace NEO;
|
||||
|
||||
DG1TEST_F(HwInfoConfigTestLinuxDg1, GivenDG1WhenConfigureHardwareCustomThenMTPIsNotSet) {
|
||||
HardwareInfo hardwareInfo = *defaultHwInfo;
|
||||
auto &productHelper = getHelper<ProductHelper>();
|
||||
|
||||
OSInterface osIface;
|
||||
hardwareInfo.capabilityTable.defaultPreemptionMode = PreemptionMode::ThreadGroup;
|
||||
PreemptionHelper::adjustDefaultPreemptionMode(hardwareInfo.capabilityTable, true, true, true);
|
||||
|
||||
productHelper.configureHardwareCustom(&hardwareInfo, &osIface);
|
||||
EXPECT_FALSE(hardwareInfo.featureTable.flags.ftrGpGpuMidThreadLevelPreempt);
|
||||
}
|
||||
|
||||
DG1TEST_F(HwInfoConfigTestLinuxDg1, GivenDG1WhenConfigureHardwareCustomThenKmdNotifyIsEnabled) {
|
||||
HardwareInfo hardwareInfo = *defaultHwInfo;
|
||||
HwInfoConfig *hwInfoConfig = HwInfoConfig::get(hardwareInfo.platform.eProductFamily);
|
||||
|
||||
OSInterface osIface;
|
||||
hwInfoConfig->configureHardwareCustom(&hardwareInfo, &osIface);
|
||||
EXPECT_TRUE(hardwareInfo.capabilityTable.kmdNotifyProperties.enableKmdNotify);
|
||||
EXPECT_EQ(300ll, hardwareInfo.capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds);
|
||||
}
|
||||
|
||||
struct HwInfoConfigTestsLinuxDg1 : HwInfoConfigTestLinux {
|
||||
struct Dg1ProductHelperLinux : HwInfoConfigTestLinux {
|
||||
void SetUp() override {
|
||||
HwInfoConfigTestLinux::SetUp();
|
||||
|
||||
@@ -50,9 +26,28 @@ struct HwInfoConfigTestsLinuxDg1 : HwInfoConfigTestLinux {
|
||||
}
|
||||
};
|
||||
|
||||
DG1TEST_F(HwInfoConfigTestsLinuxDg1, WhenConfiguringHwInfoThenInfoIsSetCorrectly) {
|
||||
auto &productHelper = getHelper<ProductHelper>();
|
||||
auto ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
DG1TEST_F(Dg1ProductHelperLinux, GivenDG1WhenConfigureHardwareCustomThenMTPIsNotSet) {
|
||||
HardwareInfo hardwareInfo = *defaultHwInfo;
|
||||
|
||||
OSInterface osIface;
|
||||
hardwareInfo.capabilityTable.defaultPreemptionMode = PreemptionMode::ThreadGroup;
|
||||
PreemptionHelper::adjustDefaultPreemptionMode(hardwareInfo.capabilityTable, true, true, true);
|
||||
|
||||
productHelper->configureHardwareCustom(&hardwareInfo, &osIface);
|
||||
EXPECT_FALSE(hardwareInfo.featureTable.flags.ftrGpGpuMidThreadLevelPreempt);
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1ProductHelperLinux, GivenDG1WhenConfigureHardwareCustomThenKmdNotifyIsEnabled) {
|
||||
HardwareInfo hardwareInfo = *defaultHwInfo;
|
||||
|
||||
OSInterface osIface;
|
||||
productHelper->configureHardwareCustom(&hardwareInfo, &osIface);
|
||||
EXPECT_TRUE(hardwareInfo.capabilityTable.kmdNotifyProperties.enableKmdNotify);
|
||||
EXPECT_EQ(300ll, hardwareInfo.capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds);
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1ProductHelperLinux, WhenConfiguringHwInfoThenInfoIsSetCorrectly) {
|
||||
auto ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
EXPECT_EQ(0, ret);
|
||||
EXPECT_EQ(static_cast<uint32_t>(drm->storedEUVal), outHwInfo.gtSystemInfo.EUCount);
|
||||
EXPECT_EQ(static_cast<uint32_t>(drm->storedSSVal), outHwInfo.gtSystemInfo.SubSliceCount);
|
||||
@@ -61,25 +56,24 @@ DG1TEST_F(HwInfoConfigTestsLinuxDg1, WhenConfiguringHwInfoThenInfoIsSetCorrectly
|
||||
EXPECT_FALSE(outHwInfo.featureTable.flags.ftrTileY);
|
||||
}
|
||||
|
||||
DG1TEST_F(HwInfoConfigTestsLinuxDg1, GivenInvalidDeviceIdWhenConfiguringHwInfoThenErrorIsReturned) {
|
||||
DG1TEST_F(Dg1ProductHelperLinux, GivenInvalidDeviceIdWhenConfiguringHwInfoThenErrorIsReturned) {
|
||||
|
||||
drm->failRetTopology = true;
|
||||
drm->storedRetValForEUVal = -1;
|
||||
auto &productHelper = getHelper<ProductHelper>();
|
||||
auto ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
auto ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
EXPECT_EQ(-1, ret);
|
||||
|
||||
drm->storedRetValForEUVal = 0;
|
||||
drm->storedRetValForSSVal = -1;
|
||||
ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
EXPECT_EQ(-1, ret);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
class Dg1HwInfoTests : public ::testing::Test {};
|
||||
class Dg1HwInfoLinux : public ::testing::Test {};
|
||||
using dg1TestTypes = ::testing::Types<Dg1HwConfig>;
|
||||
TYPED_TEST_CASE(Dg1HwInfoTests, dg1TestTypes);
|
||||
TYPED_TEST(Dg1HwInfoTests, WhenGtIsSetupThenGtSystemInfoIsCorrect) {
|
||||
TYPED_TEST_CASE(Dg1HwInfoLinux, dg1TestTypes);
|
||||
TYPED_TEST(Dg1HwInfoLinux, WhenGtIsSetupThenGtSystemInfoIsCorrect) {
|
||||
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "shared/source/gen12lp/hw_cmds_dg1.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
@@ -19,15 +18,9 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using Dg1HwInfo = HwInfoConfigTest;
|
||||
using Dg1HwInfo = ::testing::Test;
|
||||
|
||||
DG1TEST_F(Dg1HwInfo, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned) {
|
||||
EXPECT_EQ(aub_stream::ProductFamily::Dg1, productHelper->getAubStreamProductFamily());
|
||||
}
|
||||
|
||||
using Dg1HwInfoConfig = Test<DeviceFixture>;
|
||||
|
||||
DG1TEST_F(Dg1HwInfoConfig, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) {
|
||||
DG1TEST_F(Dg1HwInfo, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo;
|
||||
|
||||
@@ -40,34 +33,6 @@ DG1TEST_F(Dg1HwInfoConfig, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpe
|
||||
EXPECT_EQ(0u, gtSystemInfo.EUCount);
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1HwInfoConfig, givenA0SteppingAndDg1PlatformWhenAskingIfWAIsRequiredThenReturnTrue) {
|
||||
auto &productHelper = getHelper<ProductHelper>();
|
||||
std::array<std::pair<uint32_t, bool>, 2> revisions = {
|
||||
{{REVISION_A0, true},
|
||||
{REVISION_B, false}}};
|
||||
|
||||
for (const auto &[revision, paramBool] : revisions) {
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
hwInfo.platform.usRevId = productHelper.getHwRevIdFromStepping(revision, hwInfo);
|
||||
|
||||
productHelper.configureHardwareCustom(&hwInfo, nullptr);
|
||||
|
||||
EXPECT_EQ(paramBool, productHelper.pipeControlWARequired(hwInfo));
|
||||
EXPECT_EQ(paramBool, productHelper.imagePitchAlignmentWARequired(hwInfo));
|
||||
EXPECT_EQ(paramBool, productHelper.isForceEmuInt32DivRemSPWARequired(hwInfo));
|
||||
}
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1HwInfoConfig, givenHwInfoConfigWhenAskedIfStorageInfoAdjustmentIsRequiredThenTrueIsReturned) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
EXPECT_TRUE(hwInfoConfig.isStorageInfoAdjustmentRequired());
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1HwInfoConfig, givenHwInfoConfigWhenAskedIf3DPipelineSelectWAIsRequiredThenTrueIsReturned) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
EXPECT_TRUE(hwInfoConfig.is3DPipelineSelectWARequired());
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1HwInfo, givenBoolWhenCallDg1HardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) {
|
||||
bool boolValue[]{
|
||||
true, false};
|
||||
@@ -104,79 +69,99 @@ DG1TEST_F(Dg1HwInfo, givenBoolWhenCallDg1HardwareInfoSetupThenFeatureTableAndWor
|
||||
}
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1HwInfo, givenDg1WhenObtainingBlitterPreferenceThenReturnTrue) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
const auto &hardwareInfo = DG1::hwInfo;
|
||||
|
||||
EXPECT_TRUE(hwInfoConfig.obtainBlitterPreference(hardwareInfo));
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1HwInfo, whenPlatformIsDg1ThenExpectSvmIsSet) {
|
||||
const HardwareInfo &hardwareInfo = DG1::hwInfo;
|
||||
EXPECT_TRUE(hardwareInfo.capabilityTable.ftrSvm);
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1HwInfoConfig, whenConfigureHwInfoThenBlitterSupportIsEnabled) {
|
||||
auto &productHelper = getHelper<ProductHelper>();
|
||||
auto hardwareInfo = *defaultHwInfo;
|
||||
using Dg1ProductHelper = HwInfoConfigTest;
|
||||
|
||||
DG1TEST_F(Dg1ProductHelper, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned) {
|
||||
EXPECT_EQ(aub_stream::ProductFamily::Dg1, productHelper->getAubStreamProductFamily());
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1ProductHelper, givenA0SteppingAndDg1PlatformWhenAskingIfWAIsRequiredThenReturnTrue) {
|
||||
|
||||
std::array<std::pair<uint32_t, bool>, 2> revisions = {
|
||||
{{REVISION_A0, true},
|
||||
{REVISION_B, false}}};
|
||||
|
||||
for (const auto &[revision, paramBool] : revisions) {
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
hwInfo.platform.usRevId = productHelper->getHwRevIdFromStepping(revision, hwInfo);
|
||||
|
||||
productHelper->configureHardwareCustom(&hwInfo, nullptr);
|
||||
|
||||
EXPECT_EQ(paramBool, productHelper->pipeControlWARequired(hwInfo));
|
||||
EXPECT_EQ(paramBool, productHelper->imagePitchAlignmentWARequired(hwInfo));
|
||||
EXPECT_EQ(paramBool, productHelper->isForceEmuInt32DivRemSPWARequired(hwInfo));
|
||||
}
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1ProductHelper, givenProductHelperWhenAskedIfStorageInfoAdjustmentIsRequiredThenTrueIsReturned) {
|
||||
EXPECT_TRUE(productHelper->isStorageInfoAdjustmentRequired());
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1ProductHelper, givenProductHelperWhenAskedIf3DPipelineSelectWAIsRequiredThenTrueIsReturned) {
|
||||
EXPECT_TRUE(productHelper->is3DPipelineSelectWARequired());
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1ProductHelper, givenDg1WhenObtainingBlitterPreferenceThenReturnTrue) {
|
||||
const auto &hardwareInfo = DG1::hwInfo;
|
||||
EXPECT_TRUE(productHelper->obtainBlitterPreference(hardwareInfo));
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1ProductHelper, whenConfigureHwInfoThenBlitterSupportIsEnabled) {
|
||||
auto hardwareInfo = *defaultHwInfo;
|
||||
hardwareInfo.capabilityTable.blitterOperationsSupported = false;
|
||||
productHelper.configureHardwareCustom(&hardwareInfo, nullptr);
|
||||
productHelper->configureHardwareCustom(&hardwareInfo, nullptr);
|
||||
|
||||
EXPECT_TRUE(hardwareInfo.capabilityTable.blitterOperationsSupported);
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1HwInfo, givenDg1WhenObtainingFullBlitterSupportThenReturnFalse) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
DG1TEST_F(Dg1ProductHelper, givenDg1WhenObtainingFullBlitterSupportThenReturnFalse) {
|
||||
const auto &hardwareInfo = DG1::hwInfo;
|
||||
|
||||
EXPECT_FALSE(hwInfoConfig.isBlitterFullySupported(hardwareInfo));
|
||||
EXPECT_FALSE(productHelper->isBlitterFullySupported(hardwareInfo));
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1HwInfo, whenOverrideGfxPartitionLayoutForWslThenReturnTrue) {
|
||||
auto hwInfoConfig = HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
EXPECT_TRUE(hwInfoConfig->overrideGfxPartitionLayoutForWsl());
|
||||
DG1TEST_F(Dg1ProductHelper, whenOverrideGfxPartitionLayoutForWslThenReturnTrue) {
|
||||
EXPECT_TRUE(productHelper->overrideGfxPartitionLayoutForWsl());
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1HwInfo, givenHwInfoConfigWhenGetProductConfigThenCorrectMatchIsFound) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
EXPECT_EQ(hwInfoConfig.getProductConfigFromHwInfo(*defaultHwInfo), AOT::DG1);
|
||||
DG1TEST_F(Dg1ProductHelper, givenProductHelperWhenGetProductConfigThenCorrectMatchIsFound) {
|
||||
EXPECT_EQ(productHelper->getProductConfigFromHwInfo(*defaultHwInfo), AOT::DG1);
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1HwInfo, givenHwInfoConfigWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
EXPECT_TRUE(hwInfoConfig.isEvictionIfNecessaryFlagSupported());
|
||||
DG1TEST_F(Dg1ProductHelper, givenProductHelperWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) {
|
||||
EXPECT_TRUE(productHelper->isEvictionIfNecessaryFlagSupported());
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1HwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
DG1TEST_F(Dg1ProductHelper, givenProductHelperWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) {
|
||||
EXPECT_FALSE(productHelper->getScmPropertyThreadArbitrationPolicySupport());
|
||||
EXPECT_TRUE(productHelper->getScmPropertyCoherencyRequiredSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyZPassAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyPixelAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyLargeGrfModeSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyDevicePreemptionModeSupport());
|
||||
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyThreadArbitrationPolicySupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getScmPropertyCoherencyRequiredSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfModeSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport());
|
||||
EXPECT_FALSE(productHelper->getStateBaseAddressPropertyGlobalAtomicsSupport());
|
||||
EXPECT_TRUE(productHelper->getStateBaseAddressPropertyStatelessMocsSupport());
|
||||
EXPECT_FALSE(productHelper->getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport());
|
||||
|
||||
EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport());
|
||||
EXPECT_TRUE(productHelper->getFrontEndPropertyScratchSizeSupport());
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertyPrivateScratchSizeSupport());
|
||||
|
||||
EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport());
|
||||
EXPECT_TRUE(productHelper->getPreemptionDbgPropertyPreemptionModeSupport());
|
||||
EXPECT_TRUE(productHelper->getPreemptionDbgPropertyStateSipSupport());
|
||||
EXPECT_TRUE(productHelper->getPreemptionDbgPropertyCsrSurfaceSupport());
|
||||
|
||||
EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport());
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertyComputeDispatchAllWalkerSupport());
|
||||
EXPECT_TRUE(productHelper->getFrontEndPropertyDisableEuFusionSupport());
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertyDisableOverDispatchSupport());
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertySingleSliceDispatchCcsModeSupport());
|
||||
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport());
|
||||
|
||||
EXPECT_TRUE(hwInfoConfig.getPipelineSelectPropertyModeSelectedSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getPipelineSelectPropertyMediaSamplerDopClockGateSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getPipelineSelectPropertySystolicModeSupport());
|
||||
EXPECT_TRUE(productHelper->getPipelineSelectPropertyModeSelectedSupport());
|
||||
EXPECT_TRUE(productHelper->getPipelineSelectPropertyMediaSamplerDopClockGateSupport());
|
||||
EXPECT_FALSE(productHelper->getPipelineSelectPropertySystolicModeSupport());
|
||||
}
|
||||
|
||||
@@ -13,36 +13,34 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using HwInfoConfigTestLinuxGen12lp = HwInfoConfigTestLinux;
|
||||
using Gen12lpProductHelperLinux = HwInfoConfigTestLinux;
|
||||
|
||||
GEN12LPTEST_F(HwInfoConfigTestLinuxGen12lp, givenGen12LpProductWhenAdjustPlatformForProductFamilyCalledThenOverrideWithCorrectFamily) {
|
||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
||||
GEN12LPTEST_F(Gen12lpProductHelperLinux, givenGen12LpProductWhenAdjustPlatformForProductFamilyCalledThenOverrideWithCorrectFamily) {
|
||||
|
||||
PLATFORM *testPlatform = &outHwInfo.platform;
|
||||
testPlatform->eDisplayCoreFamily = IGFX_GEN11_CORE;
|
||||
testPlatform->eRenderCoreFamily = IGFX_GEN11_CORE;
|
||||
hwInfoConfig->adjustPlatformForProductFamily(&outHwInfo);
|
||||
productHelper->adjustPlatformForProductFamily(&outHwInfo);
|
||||
|
||||
EXPECT_EQ(IGFX_GEN12LP_CORE, testPlatform->eRenderCoreFamily);
|
||||
EXPECT_EQ(IGFX_GEN12LP_CORE, testPlatform->eDisplayCoreFamily);
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(HwInfoConfigTestLinuxGen12lp, givenCompressionFtrEnabledWhenAskingForPageTableManagerThenReturnCorrectValue) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
|
||||
GEN12LPTEST_F(Gen12lpProductHelperLinux, givenCompressionFtrEnabledWhenAskingForPageTableManagerThenReturnCorrectValue) {
|
||||
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedBuffers = false;
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedImages = false;
|
||||
EXPECT_FALSE(hwInfoConfig.isPageTableManagerSupported(outHwInfo));
|
||||
EXPECT_FALSE(productHelper->isPageTableManagerSupported(outHwInfo));
|
||||
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedBuffers = true;
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedImages = false;
|
||||
EXPECT_TRUE(hwInfoConfig.isPageTableManagerSupported(outHwInfo));
|
||||
EXPECT_TRUE(productHelper->isPageTableManagerSupported(outHwInfo));
|
||||
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedBuffers = false;
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedImages = true;
|
||||
EXPECT_TRUE(hwInfoConfig.isPageTableManagerSupported(outHwInfo));
|
||||
EXPECT_TRUE(productHelper->isPageTableManagerSupported(outHwInfo));
|
||||
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedBuffers = true;
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedImages = true;
|
||||
EXPECT_TRUE(hwInfoConfig.isPageTableManagerSupported(outHwInfo));
|
||||
EXPECT_TRUE(productHelper->isPageTableManagerSupported(outHwInfo));
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
struct HwInfoConfigTestLinuxRkl : HwInfoConfigTestLinux {
|
||||
struct RklProductHelperLinux : HwInfoConfigTestLinux {
|
||||
void SetUp() override {
|
||||
HwInfoConfigTestLinux::SetUp();
|
||||
|
||||
@@ -21,9 +21,9 @@ struct HwInfoConfigTestLinuxRkl : HwInfoConfigTestLinux {
|
||||
}
|
||||
};
|
||||
|
||||
RKLTEST_F(HwInfoConfigTestLinuxRkl, WhenConfiguringHwInfoThenConfigIsCorrect) {
|
||||
auto &productHelper = getHelper<ProductHelper>();
|
||||
auto ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
RKLTEST_F(RklProductHelperLinux, WhenConfiguringHwInfoThenConfigIsCorrect) {
|
||||
|
||||
auto ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
EXPECT_EQ(0, ret);
|
||||
EXPECT_EQ((uint32_t)drm->storedEUVal, outHwInfo.gtSystemInfo.EUCount);
|
||||
EXPECT_EQ((uint32_t)drm->storedSSVal, outHwInfo.gtSystemInfo.SubSliceCount);
|
||||
@@ -32,21 +32,23 @@ RKLTEST_F(HwInfoConfigTestLinuxRkl, WhenConfiguringHwInfoThenConfigIsCorrect) {
|
||||
EXPECT_FALSE(outHwInfo.featureTable.flags.ftrTileY);
|
||||
}
|
||||
|
||||
RKLTEST_F(HwInfoConfigTestLinuxRkl, GivenIncorrectDataWhenConfiguringHwInfoThenErrorIsReturned) {
|
||||
RKLTEST_F(RklProductHelperLinux, GivenIncorrectDataWhenConfiguringHwInfoThenErrorIsReturned) {
|
||||
|
||||
drm->failRetTopology = true;
|
||||
drm->storedRetValForEUVal = -1;
|
||||
auto &productHelper = getHelper<ProductHelper>();
|
||||
auto ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
|
||||
auto ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
EXPECT_EQ(-1, ret);
|
||||
|
||||
drm->storedRetValForEUVal = 0;
|
||||
drm->storedRetValForSSVal = -1;
|
||||
ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
EXPECT_EQ(-1, ret);
|
||||
}
|
||||
|
||||
TEST(RklHwInfoTests, WhenSettingUpHwInfoThenConfigIsCorrect) {
|
||||
using RklHwInfoLinux = ::testing::Test;
|
||||
|
||||
RKLTEST_F(RklHwInfoLinux, WhenSettingUpHwInfoThenConfigIsCorrect) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
#include "shared/source/helpers/compiler_hw_info_config.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/unit_test/os_interface/hw_info_config_tests.h"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
@@ -76,54 +76,47 @@ RKLTEST_F(RklHwInfo, givenRklWhenCheckL0ThenReturnTrue) {
|
||||
EXPECT_TRUE(hardwareInfo.capabilityTable.levelZeroSupported);
|
||||
}
|
||||
|
||||
RKLTEST_F(RklHwInfo, givenHwInfoConfigWhenGetProductConfigThenCorrectMatchIsFound) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
EXPECT_EQ(hwInfoConfig.getProductConfigFromHwInfo(hwInfo), AOT::RKL);
|
||||
using RklProductHelper = HwInfoConfigTest;
|
||||
|
||||
RKLTEST_F(RklProductHelper, givenProductHelperWhenGetProductConfigThenCorrectMatchIsFound) {
|
||||
EXPECT_EQ(productHelper->getProductConfigFromHwInfo(pInHwInfo), AOT::RKL);
|
||||
}
|
||||
|
||||
RKLTEST_F(RklHwInfo, givenHwInfoConfigWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
EXPECT_TRUE(hwInfoConfig.isEvictionIfNecessaryFlagSupported());
|
||||
RKLTEST_F(RklProductHelper, givenProductHelperWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) {
|
||||
EXPECT_TRUE(productHelper->isEvictionIfNecessaryFlagSupported());
|
||||
}
|
||||
|
||||
RKLTEST_F(RklHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
RKLTEST_F(RklProductHelper, givenProductHelperWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) {
|
||||
EXPECT_FALSE(productHelper->getScmPropertyThreadArbitrationPolicySupport());
|
||||
EXPECT_TRUE(productHelper->getScmPropertyCoherencyRequiredSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyZPassAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyPixelAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyLargeGrfModeSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyDevicePreemptionModeSupport());
|
||||
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyThreadArbitrationPolicySupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getScmPropertyCoherencyRequiredSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfModeSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport());
|
||||
EXPECT_FALSE(productHelper->getStateBaseAddressPropertyGlobalAtomicsSupport());
|
||||
EXPECT_TRUE(productHelper->getStateBaseAddressPropertyStatelessMocsSupport());
|
||||
EXPECT_FALSE(productHelper->getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport());
|
||||
|
||||
EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport());
|
||||
EXPECT_TRUE(productHelper->getFrontEndPropertyScratchSizeSupport());
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertyPrivateScratchSizeSupport());
|
||||
|
||||
EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport());
|
||||
EXPECT_TRUE(productHelper->getPreemptionDbgPropertyPreemptionModeSupport());
|
||||
EXPECT_TRUE(productHelper->getPreemptionDbgPropertyStateSipSupport());
|
||||
EXPECT_TRUE(productHelper->getPreemptionDbgPropertyCsrSurfaceSupport());
|
||||
|
||||
EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport());
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertyComputeDispatchAllWalkerSupport());
|
||||
EXPECT_TRUE(productHelper->getFrontEndPropertyDisableEuFusionSupport());
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertyDisableOverDispatchSupport());
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertySingleSliceDispatchCcsModeSupport());
|
||||
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport());
|
||||
|
||||
EXPECT_TRUE(hwInfoConfig.getPipelineSelectPropertyModeSelectedSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getPipelineSelectPropertyMediaSamplerDopClockGateSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getPipelineSelectPropertySystolicModeSupport());
|
||||
EXPECT_TRUE(productHelper->getPipelineSelectPropertyModeSelectedSupport());
|
||||
EXPECT_TRUE(productHelper->getPipelineSelectPropertyMediaSamplerDopClockGateSupport());
|
||||
EXPECT_FALSE(productHelper->getPipelineSelectPropertySystolicModeSupport());
|
||||
}
|
||||
|
||||
using RklHwInfoConfig = Test<DeviceFixture>;
|
||||
RKLTEST_F(RklProductHelper, givenA0OrBSteppingAndRklPlatformWhenAskingIfWAIsRequiredThenReturnTrue) {
|
||||
|
||||
RKLTEST_F(RklHwInfoConfig, givenA0OrBSteppingAndRklPlatformWhenAskingIfWAIsRequiredThenReturnTrue) {
|
||||
auto &productHelper = getHelper<ProductHelper>();
|
||||
std::array<std::pair<uint32_t, bool>, 3> revisions = {
|
||||
{{REVISION_A0, true},
|
||||
{REVISION_B, true},
|
||||
@@ -131,17 +124,16 @@ RKLTEST_F(RklHwInfoConfig, givenA0OrBSteppingAndRklPlatformWhenAskingIfWAIsRequi
|
||||
|
||||
for (const auto &[revision, paramBool] : revisions) {
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
hwInfo.platform.usRevId = productHelper.getHwRevIdFromStepping(revision, hwInfo);
|
||||
hwInfo.platform.usRevId = productHelper->getHwRevIdFromStepping(revision, hwInfo);
|
||||
|
||||
productHelper.configureHardwareCustom(&hwInfo, nullptr);
|
||||
productHelper->configureHardwareCustom(&hwInfo, nullptr);
|
||||
|
||||
EXPECT_EQ(paramBool, productHelper.isForceEmuInt32DivRemSPWARequired(hwInfo));
|
||||
EXPECT_EQ(paramBool, productHelper->isForceEmuInt32DivRemSPWARequired(hwInfo));
|
||||
}
|
||||
}
|
||||
|
||||
RKLTEST_F(RklHwInfoConfig, givenHwInfoConfigWhenAskedIf3DPipelineSelectWAIsRequiredThenTrueIsReturned) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
EXPECT_TRUE(hwInfoConfig.is3DPipelineSelectWARequired());
|
||||
RKLTEST_F(RklProductHelper, givenProductHelperWhenAskedIf3DPipelineSelectWAIsRequiredThenTrueIsReturned) {
|
||||
EXPECT_TRUE(productHelper->is3DPipelineSelectWARequired());
|
||||
}
|
||||
|
||||
using CompilerHwInfoConfigHelperTestsRkl = ::testing::Test;
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "shared/source/gen12lp/hw_cmds_tgllp.h"
|
||||
#include "shared/source/os_interface/device_factory.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/mocks/mock_aub_center.h"
|
||||
@@ -23,53 +22,9 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using TgllpHwInfo = HwInfoConfigTest;
|
||||
using TgllpHwInfo = ::testing::Test;
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfo, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned) {
|
||||
EXPECT_EQ(aub_stream::ProductFamily::Tgllp, productHelper->getAubStreamProductFamily());
|
||||
}
|
||||
|
||||
using HwInfoConfigTestTgllp = Test<DeviceFixture>;
|
||||
|
||||
TGLLPTEST_F(HwInfoConfigTestTgllp, givenHwInfoConfigWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
EXPECT_TRUE(hwInfoConfig.isEvictionIfNecessaryFlagSupported());
|
||||
}
|
||||
|
||||
TGLLPTEST_F(HwInfoConfigTestTgllp, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyThreadArbitrationPolicySupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getScmPropertyCoherencyRequiredSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfModeSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport());
|
||||
|
||||
EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport());
|
||||
|
||||
EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport());
|
||||
|
||||
EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport());
|
||||
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport());
|
||||
|
||||
EXPECT_TRUE(hwInfoConfig.getPipelineSelectPropertyModeSelectedSupport());
|
||||
EXPECT_TRUE(hwInfoConfig.getPipelineSelectPropertyMediaSamplerDopClockGateSupport());
|
||||
EXPECT_FALSE(hwInfoConfig.getPipelineSelectPropertySystolicModeSupport());
|
||||
}
|
||||
|
||||
TGLLPTEST_F(HwInfoConfigTestTgllp, givenHwInfoErrorneousConfigStringThenThrow) {
|
||||
TGLLPTEST_F(TgllpHwInfo, givenHwInfoErrorneousConfigStringThenThrow) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo;
|
||||
|
||||
@@ -82,7 +37,7 @@ TGLLPTEST_F(HwInfoConfigTestTgllp, givenHwInfoErrorneousConfigStringThenThrow) {
|
||||
EXPECT_EQ(0u, gtSystemInfo.EUCount);
|
||||
}
|
||||
|
||||
TGLLPTEST_F(HwInfoConfigTestTgllp, whenUsingCorrectConfigValueThenCorrectHwInfoIsReturned) {
|
||||
TGLLPTEST_F(TgllpHwInfo, whenUsingCorrectConfigValueThenCorrectHwInfoIsReturned) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo;
|
||||
|
||||
@@ -101,29 +56,6 @@ TGLLPTEST_F(HwInfoConfigTestTgllp, whenUsingCorrectConfigValueThenCorrectHwInfoI
|
||||
EXPECT_EQ(2u, gtSystemInfo.DualSubSliceCount);
|
||||
}
|
||||
|
||||
TGLLPTEST_F(HwInfoConfigTestTgllp, givenA0SteppingAndTgllpPlatformWhenAskingIfWAIsRequiredThenReturnTrue) {
|
||||
auto &productHelper = getHelper<ProductHelper>();
|
||||
std::array<std::pair<uint32_t, bool>, 3> revisions = {
|
||||
{{REVISION_A0, true},
|
||||
{REVISION_B, false},
|
||||
{REVISION_C, false}}};
|
||||
|
||||
for (const auto &[revision, paramBool] : revisions) {
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
hwInfo.platform.usRevId = productHelper.getHwRevIdFromStepping(revision, hwInfo);
|
||||
productHelper.configureHardwareCustom(&hwInfo, nullptr);
|
||||
|
||||
EXPECT_EQ(paramBool, productHelper.pipeControlWARequired(hwInfo));
|
||||
EXPECT_EQ(paramBool, productHelper.imagePitchAlignmentWARequired(hwInfo));
|
||||
EXPECT_EQ(paramBool, productHelper.isForceEmuInt32DivRemSPWARequired(hwInfo));
|
||||
}
|
||||
}
|
||||
|
||||
TGLLPTEST_F(HwInfoConfigTestTgllp, givenHwInfoConfigWhenAskedIf3DPipelineSelectWAIsRequiredThenTrueIsReturned) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
EXPECT_TRUE(hwInfoConfig.is3DPipelineSelectWARequired());
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfo, givenBoolWhenCallTgllpHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) {
|
||||
static bool boolValue[]{
|
||||
true, false};
|
||||
@@ -165,16 +97,6 @@ TGLLPTEST_F(TgllpHwInfo, givenBoolWhenCallTgllpHardwareInfoSetupThenFeatureTable
|
||||
}
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfo, givenHwInfoConfigStringThenAfterSetupResultingVmeIsDisabled) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
|
||||
uint64_t config = 0x100060010;
|
||||
hardwareInfoSetup[productFamily](&hwInfo, false, config);
|
||||
EXPECT_FALSE(hwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler);
|
||||
EXPECT_FALSE(hwInfo.capabilityTable.ftrSupportsVmeAvcPreemption);
|
||||
EXPECT_FALSE(hwInfo.capabilityTable.supportsVme);
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfo, givenSetCommandStreamReceiverInAubModeForTgllpProductFamilyWhenPrepareDeviceEnvironmentsForProductFamilyOverrideIsCalledThenAubCenterIsInitializedCorrectly) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.SetCommandStreamReceiver.set(1);
|
||||
@@ -191,6 +113,16 @@ TGLLPTEST_F(TgllpHwInfo, givenSetCommandStreamReceiverInAubModeForTgllpProductFa
|
||||
EXPECT_FALSE(rootDeviceEnvironment->localMemoryEnabledReceived);
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfo, givenProductHelperStringThenAfterSetupResultingVmeIsDisabled) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
|
||||
uint64_t config = 0x100060010;
|
||||
hardwareInfoSetup[productFamily](&hwInfo, false, config);
|
||||
EXPECT_FALSE(hwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler);
|
||||
EXPECT_FALSE(hwInfo.capabilityTable.ftrSupportsVmeAvcPreemption);
|
||||
EXPECT_FALSE(hwInfo.capabilityTable.supportsVme);
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfo, givenSetCommandStreamReceiverInAubModeWithOverrideGpuAddressSpaceWhenPrepareDeviceEnvironmentsForProductFamilyOverrideIsCalledThenAubManagerIsInitializedWithCorrectGpuAddressSpace) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.UseAubStream.set(1);
|
||||
@@ -234,15 +166,72 @@ TGLLPTEST_F(TgllpHwInfo, givenSetCommandStreamReceiverInAubModeWhenPrepareDevice
|
||||
}
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfo, givenTgllpWhenObtainingBlitterPreferenceThenReturnFalse) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
const auto &hardwareInfo = *defaultHwInfo;
|
||||
using TgllpProductHelper = HwInfoConfigTest;
|
||||
|
||||
EXPECT_FALSE(hwInfoConfig.obtainBlitterPreference(hardwareInfo));
|
||||
TGLLPTEST_F(TgllpProductHelper, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned) {
|
||||
EXPECT_EQ(aub_stream::ProductFamily::Tgllp, productHelper->getAubStreamProductFamily());
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpHwInfo, givenHwInfoConfigWhenGetProductConfigThenCorrectMatchIsFound) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
EXPECT_EQ(hwInfoConfig.getProductConfigFromHwInfo(hwInfo), AOT::TGL);
|
||||
TGLLPTEST_F(TgllpProductHelper, givenProductHelperWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) {
|
||||
|
||||
EXPECT_TRUE(productHelper->isEvictionIfNecessaryFlagSupported());
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpProductHelper, givenProductHelperWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) {
|
||||
|
||||
EXPECT_FALSE(productHelper->getScmPropertyThreadArbitrationPolicySupport());
|
||||
EXPECT_TRUE(productHelper->getScmPropertyCoherencyRequiredSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyZPassAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyPixelAsyncComputeThreadLimitSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyLargeGrfModeSupport());
|
||||
EXPECT_FALSE(productHelper->getScmPropertyDevicePreemptionModeSupport());
|
||||
|
||||
EXPECT_FALSE(productHelper->getStateBaseAddressPropertyGlobalAtomicsSupport());
|
||||
EXPECT_TRUE(productHelper->getStateBaseAddressPropertyStatelessMocsSupport());
|
||||
EXPECT_FALSE(productHelper->getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport());
|
||||
|
||||
EXPECT_TRUE(productHelper->getFrontEndPropertyScratchSizeSupport());
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertyPrivateScratchSizeSupport());
|
||||
|
||||
EXPECT_TRUE(productHelper->getPreemptionDbgPropertyPreemptionModeSupport());
|
||||
EXPECT_TRUE(productHelper->getPreemptionDbgPropertyStateSipSupport());
|
||||
EXPECT_TRUE(productHelper->getPreemptionDbgPropertyCsrSurfaceSupport());
|
||||
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertyComputeDispatchAllWalkerSupport());
|
||||
EXPECT_TRUE(productHelper->getFrontEndPropertyDisableEuFusionSupport());
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertyDisableOverDispatchSupport());
|
||||
EXPECT_FALSE(productHelper->getFrontEndPropertySingleSliceDispatchCcsModeSupport());
|
||||
|
||||
EXPECT_TRUE(productHelper->getPipelineSelectPropertyModeSelectedSupport());
|
||||
EXPECT_TRUE(productHelper->getPipelineSelectPropertyMediaSamplerDopClockGateSupport());
|
||||
EXPECT_FALSE(productHelper->getPipelineSelectPropertySystolicModeSupport());
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpProductHelper, givenA0SteppingAndTgllpPlatformWhenAskingIfWAIsRequiredThenReturnTrue) {
|
||||
std::array<std::pair<uint32_t, bool>, 3> revisions = {
|
||||
{{REVISION_A0, true},
|
||||
{REVISION_B, false},
|
||||
{REVISION_C, false}}};
|
||||
|
||||
for (const auto &[revision, paramBool] : revisions) {
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
hwInfo.platform.usRevId = productHelper->getHwRevIdFromStepping(revision, hwInfo);
|
||||
productHelper->configureHardwareCustom(&hwInfo, nullptr);
|
||||
|
||||
EXPECT_EQ(paramBool, productHelper->pipeControlWARequired(hwInfo));
|
||||
EXPECT_EQ(paramBool, productHelper->imagePitchAlignmentWARequired(hwInfo));
|
||||
EXPECT_EQ(paramBool, productHelper->isForceEmuInt32DivRemSPWARequired(hwInfo));
|
||||
}
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpProductHelper, givenProductHelperWhenAskedIf3DPipelineSelectWAIsRequiredThenTrueIsReturned) {
|
||||
EXPECT_TRUE(productHelper->is3DPipelineSelectWARequired());
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpProductHelper, givenTgllpWhenObtainingBlitterPreferenceThenReturnFalse) {
|
||||
EXPECT_FALSE(productHelper->obtainBlitterPreference(pInHwInfo));
|
||||
}
|
||||
|
||||
TGLLPTEST_F(TgllpProductHelper, givenProductHelperWhenGetProductConfigThenCorrectMatchIsFound) {
|
||||
EXPECT_EQ(productHelper->getProductConfigFromHwInfo(pInHwInfo), AOT::TGL);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
struct HwInfoConfigTestLinuxTgllp : HwInfoConfigTestLinux {
|
||||
struct TgllpProductHelperLinux : HwInfoConfigTestLinux {
|
||||
void SetUp() override {
|
||||
HwInfoConfigTestLinux::SetUp();
|
||||
|
||||
@@ -24,20 +24,19 @@ struct HwInfoConfigTestLinuxTgllp : HwInfoConfigTestLinux {
|
||||
}
|
||||
};
|
||||
|
||||
TGLLPTEST_F(HwInfoConfigTestLinuxTgllp, GivenTGLLPWhenConfigureHardwareCustomThenMTPIsNotSet) {
|
||||
auto &productHelper = getHelper<ProductHelper>();
|
||||
TGLLPTEST_F(TgllpProductHelperLinux, GivenTGLLPWhenConfigureHardwareCustomThenMTPIsNotSet) {
|
||||
|
||||
pInHwInfo.capabilityTable.defaultPreemptionMode = PreemptionMode::ThreadGroup;
|
||||
PreemptionHelper::adjustDefaultPreemptionMode(pInHwInfo.capabilityTable, true, true, true);
|
||||
|
||||
auto ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
auto ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
EXPECT_EQ(0, ret);
|
||||
EXPECT_FALSE(outHwInfo.featureTable.flags.ftrGpGpuMidThreadLevelPreempt);
|
||||
}
|
||||
|
||||
TGLLPTEST_F(HwInfoConfigTestLinuxTgllp, configureHwInfo) {
|
||||
auto &productHelper = getHelper<ProductHelper>();
|
||||
auto ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
TGLLPTEST_F(TgllpProductHelperLinux, WhenConfiguringHwInfoThenInfoIsSetCorrectly) {
|
||||
|
||||
auto ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
EXPECT_EQ(0, ret);
|
||||
EXPECT_EQ((uint32_t)drm->storedEUVal, outHwInfo.gtSystemInfo.EUCount);
|
||||
EXPECT_EQ((uint32_t)drm->storedSSVal, outHwInfo.gtSystemInfo.SubSliceCount);
|
||||
@@ -46,26 +45,26 @@ TGLLPTEST_F(HwInfoConfigTestLinuxTgllp, configureHwInfo) {
|
||||
EXPECT_FALSE(outHwInfo.featureTable.flags.ftrTileY);
|
||||
}
|
||||
|
||||
TGLLPTEST_F(HwInfoConfigTestLinuxTgllp, negative) {
|
||||
TGLLPTEST_F(TgllpProductHelperLinux, GivenInvalidDeviceIdWhenConfiguringHwInfoThenErrorIsReturned) {
|
||||
|
||||
drm->failRetTopology = true;
|
||||
drm->storedRetValForEUVal = -1;
|
||||
auto &productHelper = getHelper<ProductHelper>();
|
||||
auto ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
|
||||
auto ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
EXPECT_EQ(-1, ret);
|
||||
|
||||
drm->storedRetValForEUVal = 0;
|
||||
drm->storedRetValForSSVal = -1;
|
||||
|
||||
ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
ret = productHelper->configureHwInfoDrm(&pInHwInfo, &outHwInfo, getRootDeviceEnvironment());
|
||||
EXPECT_EQ(-1, ret);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
class TgllpHwInfoTests : public ::testing::Test {};
|
||||
class TgllpHwInfoLinux : public ::testing::Test {};
|
||||
typedef ::testing::Types<TgllpHw1x6x16> tgllpTestTypes;
|
||||
TYPED_TEST_CASE(TgllpHwInfoTests, tgllpTestTypes);
|
||||
TYPED_TEST(TgllpHwInfoTests, gtSetupIsCorrect) {
|
||||
TYPED_TEST_CASE(TgllpHwInfoLinux, tgllpTestTypes);
|
||||
TYPED_TEST(TgllpHwInfoLinux, gtSetupIsCorrect) {
|
||||
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
|
||||
|
||||
@@ -13,60 +13,55 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using ProductHelperTestWindowsGen12lp = HwInfoConfigTestWindows;
|
||||
using Gen12lpProductHelperWindows = HwInfoConfigTestWindows;
|
||||
|
||||
GEN12LPTEST_F(ProductHelperTestWindowsGen12lp, givenE2ECSetByKmdWhenConfiguringHwThenAdjustInternalImageFlag) {
|
||||
GEN12LPTEST_F(Gen12lpProductHelperWindows, givenE2ECSetByKmdWhenConfiguringHwThenAdjustInternalImageFlag) {
|
||||
FeatureTable &localFeatureTable = outHwInfo.featureTable;
|
||||
|
||||
auto &helper = getHelper<ProductHelper>();
|
||||
|
||||
localFeatureTable.flags.ftrE2ECompression = true;
|
||||
helper.configureHardwareCustom(&outHwInfo, nullptr);
|
||||
productHelper->configureHardwareCustom(&outHwInfo, nullptr);
|
||||
EXPECT_TRUE(outHwInfo.capabilityTable.ftrRenderCompressedBuffers);
|
||||
EXPECT_TRUE(outHwInfo.capabilityTable.ftrRenderCompressedImages);
|
||||
|
||||
localFeatureTable.flags.ftrE2ECompression = false;
|
||||
helper.configureHardwareCustom(&outHwInfo, nullptr);
|
||||
productHelper->configureHardwareCustom(&outHwInfo, nullptr);
|
||||
EXPECT_FALSE(outHwInfo.capabilityTable.ftrRenderCompressedBuffers);
|
||||
EXPECT_FALSE(outHwInfo.capabilityTable.ftrRenderCompressedImages);
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(ProductHelperTestWindowsGen12lp, givenGen12LpProductWhenAdjustPlatformForProductFamilyCalledThenOverrideWithCorrectFamily) {
|
||||
auto &helper = getHelper<ProductHelper>();
|
||||
GEN12LPTEST_F(Gen12lpProductHelperWindows, givenGen12LpProductWhenAdjustPlatformForProductFamilyCalledThenOverrideWithCorrectFamily) {
|
||||
|
||||
PLATFORM *testPlatform = &outHwInfo.platform;
|
||||
testPlatform->eDisplayCoreFamily = IGFX_GEN11_CORE;
|
||||
testPlatform->eRenderCoreFamily = IGFX_GEN11_CORE;
|
||||
helper.adjustPlatformForProductFamily(&outHwInfo);
|
||||
productHelper->adjustPlatformForProductFamily(&outHwInfo);
|
||||
|
||||
EXPECT_EQ(IGFX_GEN12LP_CORE, testPlatform->eRenderCoreFamily);
|
||||
EXPECT_EQ(IGFX_GEN12LP_CORE, testPlatform->eDisplayCoreFamily);
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(ProductHelperTestWindowsGen12lp, givenCompressionFtrEnabledWhenAskingForPageTableManagerThenReturnCorrectValue) {
|
||||
auto &helper = getHelper<ProductHelper>();
|
||||
GEN12LPTEST_F(Gen12lpProductHelperWindows, givenCompressionFtrEnabledWhenAskingForPageTableManagerThenReturnCorrectValue) {
|
||||
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedBuffers = false;
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedImages = false;
|
||||
EXPECT_FALSE(helper.isPageTableManagerSupported(outHwInfo));
|
||||
EXPECT_FALSE(productHelper->isPageTableManagerSupported(outHwInfo));
|
||||
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedBuffers = true;
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedImages = false;
|
||||
EXPECT_TRUE(helper.isPageTableManagerSupported(outHwInfo));
|
||||
EXPECT_TRUE(productHelper->isPageTableManagerSupported(outHwInfo));
|
||||
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedBuffers = false;
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedImages = true;
|
||||
EXPECT_TRUE(helper.isPageTableManagerSupported(outHwInfo));
|
||||
EXPECT_TRUE(productHelper->isPageTableManagerSupported(outHwInfo));
|
||||
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedBuffers = true;
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedImages = true;
|
||||
EXPECT_TRUE(helper.isPageTableManagerSupported(outHwInfo));
|
||||
EXPECT_TRUE(productHelper->isPageTableManagerSupported(outHwInfo));
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(ProductHelperTestWindowsGen12lp, givenGen12LpSkuWhenGettingCapabilityCoherencyFlagThenExpectValidValue) {
|
||||
auto &helper = getHelper<ProductHelper>();
|
||||
GEN12LPTEST_F(Gen12lpProductHelperWindows, givenGen12LpSkuWhenGettingCapabilityCoherencyFlagThenExpectValidValue) {
|
||||
bool coherency = false;
|
||||
helper.setCapabilityCoherencyFlag(outHwInfo, coherency);
|
||||
productHelper->setCapabilityCoherencyFlag(outHwInfo, coherency);
|
||||
const bool checkDone = SpecialUltHelperGen12lp::additionalCoherencyCheck(outHwInfo.platform.eProductFamily, coherency);
|
||||
if (checkDone) {
|
||||
EXPECT_FALSE(coherency);
|
||||
@@ -74,11 +69,11 @@ GEN12LPTEST_F(ProductHelperTestWindowsGen12lp, givenGen12LpSkuWhenGettingCapabil
|
||||
}
|
||||
|
||||
if (SpecialUltHelperGen12lp::isAdditionalCapabilityCoherencyFlagSettingRequired(outHwInfo.platform.eProductFamily)) {
|
||||
outHwInfo.platform.usRevId = helper.getHwRevIdFromStepping(REVISION_A1, outHwInfo);
|
||||
helper.setCapabilityCoherencyFlag(outHwInfo, coherency);
|
||||
outHwInfo.platform.usRevId = productHelper->getHwRevIdFromStepping(REVISION_A1, outHwInfo);
|
||||
productHelper->setCapabilityCoherencyFlag(outHwInfo, coherency);
|
||||
EXPECT_TRUE(coherency);
|
||||
outHwInfo.platform.usRevId = helper.getHwRevIdFromStepping(REVISION_A0, outHwInfo);
|
||||
helper.setCapabilityCoherencyFlag(outHwInfo, coherency);
|
||||
outHwInfo.platform.usRevId = productHelper->getHwRevIdFromStepping(REVISION_A0, outHwInfo);
|
||||
productHelper->setCapabilityCoherencyFlag(outHwInfo, coherency);
|
||||
EXPECT_FALSE(coherency);
|
||||
} else {
|
||||
EXPECT_TRUE(coherency);
|
||||
|
||||
Reference in New Issue
Block a user