fix: adjust root device indices when filtering root device environments

Related-To: NEO-8166
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-07-11 10:55:25 +00:00
committed by Compute-Runtime-Automation
parent 37fdb5998e
commit 4e464e9d6f
12 changed files with 65 additions and 114 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
* Copyright (C) 2021-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -26,6 +26,11 @@ std::vector<std::string> Directory::getFiles(const std::string &path) {
return files;
}
auto it = directoryFilesMap.find(path);
if (it != directoryFilesMap.end()) {
return directoryFilesMap[path];
}
if (path == byPathPattern) {
files.push_back(byPathPattern + "/pci-0000:00:02.0-card");
files.push_back(byPathPattern + "/pci-0000:00:02.0-render");
@@ -58,11 +63,6 @@ std::vector<std::string> Directory::getFiles(const std::string &path) {
};
}
auto it = directoryFilesMap.find(path);
if (it != directoryFilesMap.end()) {
return directoryFilesMap[path];
}
return files;
}
}; // namespace NEO