Include domain when ordering with ZE_ENABLE_PCI_ID_DEVICE_ORDER

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
Jaime Arteaga
2021-10-06 01:57:55 +00:00
committed by Compute-Runtime-Automation
parent 279181a384
commit 9d49c56b75
7 changed files with 92 additions and 24 deletions

View File

@@ -19,9 +19,15 @@ bool comparePciIdBusNumber(std::unique_ptr<RootDeviceEnvironment> &rootDeviceEnv
// BDF sample format is : 00:02.0
rootDeviceEnvironment1.get()->osInterface->getDriverModel()->as<NEO::Drm>()->queryAdapterBDF();
auto bdfDevice1 = rootDeviceEnvironment1.get()->osInterface->getDriverModel()->as<NEO::Drm>()->getAdapterBDF();
auto domain1 = rootDeviceEnvironment1.get()->osInterface->getDriverModel()->as<NEO::Drm>()->getPciDomain();
rootDeviceEnvironment2.get()->osInterface->getDriverModel()->as<NEO::Drm>()->queryAdapterBDF();
auto bdfDevice2 = rootDeviceEnvironment2.get()->osInterface->getDriverModel()->as<NEO::Drm>()->getAdapterBDF();
auto domain2 = rootDeviceEnvironment2.get()->osInterface->getDriverModel()->as<NEO::Drm>()->getPciDomain();
if (domain1 != domain2) {
return (domain1 < domain2);
}
if (bdfDevice1.Bus != bdfDevice2.Bus) {
return (bdfDevice1.Bus < bdfDevice2.Bus);