mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
Moving rootDeviceIndex from DrmMemoryOperationsHandlerBind to base class
This fix will allow all DrmMemoryOperationsHandler objects to be sorted correctly Related-To: NEO-7505 Signed-off-by: Andrzej Koska andrzej.koska@intel.com
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
fa44d61fd8
commit
52c7c96635
@@ -46,14 +46,14 @@ void ExecutionEnvironment::sortNeoDevicesDRM() {
|
||||
if (pciOrderVar) {
|
||||
std::vector<uint32_t> presortIndex;
|
||||
for (uint32_t i = 0; i < rootDeviceEnvironments.size(); i++) {
|
||||
NEO::DrmMemoryOperationsHandlerBind *drm = static_cast<DrmMemoryOperationsHandlerBind *>(rootDeviceEnvironments[i]->memoryOperationsInterface.get());
|
||||
NEO::DrmMemoryOperationsHandler *drm = static_cast<DrmMemoryOperationsHandler *>(rootDeviceEnvironments[i]->memoryOperationsInterface.get());
|
||||
presortIndex.push_back(drm->getRootDeviceIndex());
|
||||
}
|
||||
|
||||
std::sort(rootDeviceEnvironments.begin(), rootDeviceEnvironments.end(), comparePciIdBusNumberDRM);
|
||||
|
||||
for (uint32_t i = 0; i < rootDeviceEnvironments.size(); i++) {
|
||||
NEO::DrmMemoryOperationsHandlerBind *drm = static_cast<DrmMemoryOperationsHandlerBind *>(rootDeviceEnvironments[i]->memoryOperationsInterface.get());
|
||||
NEO::DrmMemoryOperationsHandler *drm = static_cast<DrmMemoryOperationsHandler *>(rootDeviceEnvironments[i]->memoryOperationsInterface.get());
|
||||
if (drm->getRootDeviceIndex() != presortIndex[i]) {
|
||||
drm->setRootDeviceIndex(presortIndex[i]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user