fix: if device hierarchy is flat then getSubDevicesCount return 1u

Related-To: NEO-9167

Signed-off-by: Baj, Tomasz <tomasz.baj@intel.com>
This commit is contained in:
Baj, Tomasz
2023-10-19 09:50:13 +00:00
committed by Compute-Runtime-Automation
parent 67660b44b0
commit cb0bb57f49
43 changed files with 88 additions and 80 deletions

View File

@@ -81,7 +81,7 @@ void MulticontextAubFixture::setUp(uint32_t numberOfTiles, EnabledCommandStreame
strfilename << renderEngineName << "_CCS0_3"; // xehp_config_name_RCS_CCS0_3.aub
}
auto filename = AUBCommandStreamReceiver::createFullFilePath(localHwInfo, strfilename.str(), rootDeviceIndex);
auto filename = AUBCommandStreamReceiver::createFullFilePath(localHwInfo, strfilename.str(), rootDeviceIndex, platform()->peekExecutionEnvironment()->isExposingSubDevicesAsDevices());
DebugManager.flags.AUBDumpCaptureFileName.set(filename);

View File

@@ -735,7 +735,7 @@ TEST(ClDeviceHelperTest, givenNonZeroNumberOfTilesWhenPrepareDeviceEnvironmentsC
HardwareInfo hwInfo{&platform, &skuTable, &waTable, &sysInfo, capTable};
DebugManager.flags.CreateMultipleSubDevices.set(0);
uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(&hwInfo);
uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(false, &hwInfo);
EXPECT_EQ(devicesCount, 3u);
}
@@ -751,7 +751,7 @@ TEST(ClDeviceHelperTest, givenZeroNumberOfTilesWhenPrepareDeviceEnvironmentsCoun
HardwareInfo hwInfo{&platform, &skuTable, &waTable, &sysInfo, capTable};
DebugManager.flags.CreateMultipleSubDevices.set(0);
uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(&hwInfo);
uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(false, &hwInfo);
EXPECT_EQ(devicesCount, 1u);
}

View File

@@ -715,7 +715,7 @@ TEST_F(DrmTests, whenDrmIsCreatedWithMultipleSubDevicesThenCreateMultipleVirtual
GTEST_SKIP();
}
auto numSubDevices = GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment->getHardwareInfo());
auto numSubDevices = GfxCoreHelper::getSubDevicesCount(false, rootDeviceEnvironment->getHardwareInfo());
for (auto id = 0u; id < numSubDevices; id++) {
EXPECT_EQ(id + 1, drm->getVirtualMemoryAddressSpace(id));
}
@@ -733,7 +733,7 @@ TEST_F(DrmTests, givenDebuggingEnabledWhenDrmIsCreatedThenPerContextVMIsTrueGetV
if (drm->isVmBindAvailable()) {
EXPECT_TRUE(drm->isPerContextVMRequired());
auto numSubDevices = GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment->getHardwareInfo());
auto numSubDevices = GfxCoreHelper::getSubDevicesCount(false, rootDeviceEnvironment->getHardwareInfo());
for (auto id = 0u; id < numSubDevices; id++) {
EXPECT_EQ(0u, drm->getVirtualMemoryAddressSpace(id));
}
@@ -762,7 +762,7 @@ TEST_F(DrmTests, givenEnabledDebuggingAndVmBindNotAvailableWhenDrmIsCreatedThenP
GTEST_SKIP();
}
auto numSubDevices = GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment->getHardwareInfo());
auto numSubDevices = GfxCoreHelper::getSubDevicesCount(false, rootDeviceEnvironment->getHardwareInfo());
for (auto id = 0u; id < numSubDevices; id++) {
EXPECT_NE(0u, drm->getVirtualMemoryAddressSpace(id));
}