mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-12 17:33:00 +08:00
Generate multiple devices in AUB and TBX CSR modes
This commit adds a capability for a driver to generate multiple devices and hwinfo in AUB and TBX CSR modes. Change-Id: Icc0eac7c16760d3d4ae6ef08cd0be950b45d35e7
This commit is contained in:
committed by
sys_ocldev
parent
962b6ce883
commit
65dc5fb7de
@@ -181,6 +181,29 @@ TEST_F(DeviceFactoryTest, givenCreateMultipleDevicesDebugFlagWhenGetDevicesIsCal
|
||||
EXPECT_EQ(requiredDeviceCount, numDevices);
|
||||
}
|
||||
|
||||
TEST_F(DeviceFactoryTest, givenCreateMultipleDevicesDebugFlagWhenGetDevicesForProductFamilyOverrideIsCalledThenNumberOfReturnedDevicesIsEqualToDebugVariable) {
|
||||
DeviceFactoryCleaner cleaner;
|
||||
DebugManagerStateRestore stateRestore;
|
||||
auto requiredDeviceCount = 2u;
|
||||
DebugManager.flags.CreateMultipleDevices.set(requiredDeviceCount);
|
||||
HardwareInfo *hwInfo = nullptr;
|
||||
size_t numDevices = 0;
|
||||
bool success = DeviceFactory::getDevicesForProductFamilyOverride(&hwInfo, numDevices, executionEnvironment);
|
||||
ASSERT_NE(nullptr, hwInfo);
|
||||
|
||||
for (auto deviceIndex = 0u; deviceIndex < requiredDeviceCount; deviceIndex++) {
|
||||
EXPECT_NE(nullptr, hwInfo[deviceIndex].pPlatform);
|
||||
EXPECT_NE(nullptr, hwInfo[deviceIndex].pSkuTable);
|
||||
EXPECT_NE(nullptr, hwInfo[deviceIndex].pSysInfo);
|
||||
EXPECT_NE(nullptr, hwInfo[deviceIndex].pWaTable);
|
||||
}
|
||||
|
||||
EXPECT_EQ(hwInfo[0].pPlatform->eDisplayCoreFamily, hwInfo[1].pPlatform->eDisplayCoreFamily);
|
||||
|
||||
ASSERT_TRUE(success);
|
||||
EXPECT_EQ(requiredDeviceCount, numDevices);
|
||||
}
|
||||
|
||||
TEST_F(DeviceFactoryTest, givenGetDevicesCallWhenItIsDoneThenOsInterfaceIsAllocated) {
|
||||
DeviceFactoryCleaner cleaner;
|
||||
HardwareInfo *hwInfo = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user