Revert "fix rootDeviceIndex issue for PCI reorder"

This reverts commit d797d79f97.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2022-04-28 16:39:45 +02:00
committed by Compute-Runtime-Automation
parent ff7400d295
commit 46e4a389c2
3 changed files with 0 additions and 121 deletions

View File

@@ -8,7 +8,6 @@
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/execution_environment/execution_environment.h"
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/os_interface/linux/drm_memory_operations_handler_bind.h"
#include "shared/source/os_interface/linux/drm_neo.h"
#include "shared/source/os_interface/os_interface.h"
@@ -44,21 +43,7 @@ bool comparePciIdBusNumber(std::unique_ptr<RootDeviceEnvironment> &rootDeviceEnv
void ExecutionEnvironment::sortNeoDevices() {
const auto pciOrderVar = DebugManager.flags.ZE_ENABLE_PCI_ID_DEVICE_ORDER.get();
if (pciOrderVar) {
std::vector<uint32_t> presort_index;
for (uint32_t i = 0; i < rootDeviceEnvironments.size(); i++) {
NEO::DrmMemoryOperationsHandlerBind *drm = static_cast<DrmMemoryOperationsHandlerBind *>(rootDeviceEnvironments[i]->memoryOperationsInterface.get());
presort_index.push_back(drm->getRootDeviceIndex());
}
std::sort(rootDeviceEnvironments.begin(), rootDeviceEnvironments.end(), comparePciIdBusNumber);
for (uint32_t i = 0; i < rootDeviceEnvironments.size(); i++) {
NEO::DrmMemoryOperationsHandlerBind *drm = static_cast<DrmMemoryOperationsHandlerBind *>(rootDeviceEnvironments[i]->memoryOperationsInterface.get());
if (drm->getRootDeviceIndex() != presort_index[i]) {
drm->setRootDeviceIndex(presort_index[i]);
}
}
}
}