Dynamic query of EUCount and SubSliceCount.

Related-To: NEO-3841

Change-Id: I7b92314bb8465233909fd1dddeef4ae1469008c9
Signed-off-by: Pawel Cieslak <pawel.cieslak@intel.com>
This commit is contained in:
Pawel Cieslak
2019-10-18 10:15:09 +02:00
committed by sys_ocldev
parent bccfa1df38
commit 6584f58902
52 changed files with 275 additions and 546 deletions

View File

@@ -205,6 +205,18 @@ TEST_F(DeviceFactoryTest, givenSetCommandStreamReceiverInAubModeWhenGetDevicesFo
}
}
TEST_F(DeviceFactoryTest, givenInvalidHwConfigStringGetDevicesForProductFamilyOverrideReturnsFalse) {
DeviceFactoryCleaner cleaner;
DebugManagerStateRestore stateRestore;
DebugManager.flags.HardwareInfoOverride.set("1x3");
MockExecutionEnvironment executionEnvironment(*platformDevices);
size_t numDevices = 0;
bool success = DeviceFactory::getDevicesForProductFamilyOverride(numDevices, executionEnvironment);
EXPECT_FALSE(success);
}
TEST_F(DeviceFactoryTest, givenGetDevicesCallWhenItIsDoneThenOsInterfaceIsAllocated) {
DeviceFactoryCleaner cleaner;

View File

@@ -29,3 +29,19 @@ void HwInfoConfigTest::SetUp() {
void HwInfoConfigTest::TearDown() {
PlatformFixture::TearDown();
}
TEST_F(HwInfoConfigTest, givenHwInfoConfigSetHwInfoValuesFromConfigStringReturnsSetsProperValues) {
bool success = setHwInfoValuesFromConfigString("2x4x16", outHwInfo);
EXPECT_TRUE(success);
EXPECT_EQ(outHwInfo.gtSystemInfo.SliceCount, 2u);
EXPECT_EQ(outHwInfo.gtSystemInfo.SubSliceCount, 8u);
EXPECT_EQ(outHwInfo.gtSystemInfo.EUCount, 128u);
}
TEST_F(HwInfoConfigTest, givenInvalidHwInfoSetHwInfoValuesFromConfigString) {
bool success = setHwInfoValuesFromConfigString("1", outHwInfo);
EXPECT_FALSE(success);
success = setHwInfoValuesFromConfigString("1x3", outHwInfo);
EXPECT_FALSE(success);
}