mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-17 05:10:13 +08:00
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:
committed by
Compute-Runtime-Automation
parent
67660b44b0
commit
cb0bb57f49
@@ -1007,7 +1007,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenSshSize
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenPhysicalAddressAllocatorIsCreatedThenItIsNotNull) {
|
||||
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
std::unique_ptr<PhysicalAddressAllocator> allocator(aubCsr.createPhysicalAddressAllocator(&hardwareInfo));
|
||||
std::unique_ptr<PhysicalAddressAllocator> allocator(aubCsr.createPhysicalAddressAllocator(pDevice->getExecutionEnvironment()->isExposingSubDevicesAsDevices(), &hardwareInfo));
|
||||
ASSERT_NE(nullptr, allocator);
|
||||
}
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterAubCommandStreamReceiverTests, whenPhys
|
||||
|
||||
std::unique_ptr<MockAubCsrXeHPAndLater<FamilyType>> aubCsr(new MockAubCsrXeHPAndLater<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
|
||||
auto physicalAddressAllocator = std::unique_ptr<PhysicalAddressAllocator>(aubCsr->createPhysicalAddressAllocator(&pDevice->getHardwareInfo()));
|
||||
auto physicalAddressAllocator = std::unique_ptr<PhysicalAddressAllocator>(aubCsr->createPhysicalAddressAllocator(pDevice->getExecutionEnvironment()->isExposingSubDevicesAsDevices(), &pDevice->getHardwareInfo()));
|
||||
auto allocator = reinterpret_cast<PhysicalAddressAllocatorHw<FamilyType> *>(physicalAddressAllocator.get());
|
||||
|
||||
EXPECT_EQ(32 * MemoryConstants::gigaByte, allocator->getBankSize());
|
||||
@@ -245,7 +245,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterAubCommandStreamReceiverTests, whenPhys
|
||||
|
||||
std::unique_ptr<MockAubCsrXeHPAndLater<FamilyType>> aubCsr(new MockAubCsrXeHPAndLater<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
|
||||
|
||||
auto physicalAddressAllocator = std::unique_ptr<PhysicalAddressAllocator>(aubCsr->createPhysicalAddressAllocator(&pDevice->getHardwareInfo()));
|
||||
auto physicalAddressAllocator = std::unique_ptr<PhysicalAddressAllocator>(aubCsr->createPhysicalAddressAllocator(pDevice->getExecutionEnvironment()->isExposingSubDevicesAsDevices(), &pDevice->getHardwareInfo()));
|
||||
auto allocator = reinterpret_cast<PhysicalAddressAllocatorHw<FamilyType> *>(physicalAddressAllocator.get());
|
||||
|
||||
EXPECT_EQ(8 * MemoryConstants::gigaByte, allocator->getBankSize());
|
||||
|
||||
@@ -953,17 +953,17 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenCreateFullFilePath
|
||||
DebugManagerStateRestore stateRestore;
|
||||
|
||||
DebugManager.flags.CreateMultipleSubDevices.set(1);
|
||||
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", mockRootDeviceIndex);
|
||||
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", mockRootDeviceIndex, false);
|
||||
EXPECT_EQ(std::string::npos, fullName.find("tx"));
|
||||
|
||||
DebugManager.flags.CreateMultipleSubDevices.set(2);
|
||||
fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", mockRootDeviceIndex);
|
||||
fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", mockRootDeviceIndex, false);
|
||||
EXPECT_NE(std::string::npos, fullName.find("2tx"));
|
||||
}
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenCreateFullFilePathIsCalledThenFileNameIsExtendedWithRootDeviceIndex) {
|
||||
uint32_t rootDeviceIndex = 123u;
|
||||
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", rootDeviceIndex);
|
||||
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", rootDeviceIndex, false);
|
||||
EXPECT_NE(std::string::npos, fullName.find("_123_aubfile.aub"));
|
||||
}
|
||||
|
||||
@@ -971,7 +971,7 @@ HWTEST_F(AubFileStreamTests, givenGenerateAubFilePerProcessIdDebugFlagAndAubComm
|
||||
DebugManagerStateRestore stateRestore;
|
||||
|
||||
DebugManager.flags.GenerateAubFilePerProcessId.set(1);
|
||||
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", 1u);
|
||||
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", 1u, false);
|
||||
std::stringstream strExtendedFileName;
|
||||
strExtendedFileName << "_1_aubfile_PID_" << SysCalls::getProcessId() << ".aub";
|
||||
EXPECT_NE(std::string::npos, fullName.find(strExtendedFileName.str()));
|
||||
|
||||
@@ -446,7 +446,7 @@ HWTEST_F(TbxCommandSteamSimpleTest, whenTbxCommandStreamReceiverIsCreatedThenPPG
|
||||
|
||||
HWTEST_F(TbxCommandSteamSimpleTest, givenTbxCommandStreamReceiverWhenPhysicalAddressAllocatorIsCreatedThenItIsNotNull) {
|
||||
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment, pDevice->getDeviceBitfield());
|
||||
std::unique_ptr<PhysicalAddressAllocator> allocator(tbxCsr.createPhysicalAddressAllocator(&hardwareInfo));
|
||||
std::unique_ptr<PhysicalAddressAllocator> allocator(tbxCsr.createPhysicalAddressAllocator(pDevice->getExecutionEnvironment()->isExposingSubDevicesAsDevices(), &hardwareInfo));
|
||||
ASSERT_NE(nullptr, allocator);
|
||||
}
|
||||
|
||||
@@ -615,7 +615,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenCreatedWithAubDumpThenFileNameIsE
|
||||
auto rootDeviceEnvironment = static_cast<MockRootDeviceEnvironment *>(executionEnvironment.rootDeviceEnvironments[0].get());
|
||||
setMockAubCenter(*rootDeviceEnvironment, CommandStreamReceiverType::CSR_TBX);
|
||||
|
||||
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", mockRootDeviceIndex);
|
||||
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", mockRootDeviceIndex, executionEnvironment.isExposingSubDevicesAsDevices());
|
||||
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsr(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(TbxCommandStreamReceiver::create("aubfile", true, executionEnvironment, 0, 1)));
|
||||
EXPECT_STREQ(fullName.c_str(), rootDeviceEnvironment->aubFileNameReceived.c_str());
|
||||
|
||||
Reference in New Issue
Block a user