Skip to content

Commit 1197737

Browse files
committed
Fix lint issues
1 parent 382fdcc commit 1197737

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

onnxruntime/core/providers/openvino/backends/basic_backend.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Licensed under the MIT License
33

44
#include <map>
5+
#include <unordered_set>
6+
57
#include <string>
68
#include <memory>
79
#include <sstream>
@@ -223,7 +225,7 @@ void BasicBackend::PopulateConfigValue(ov::AnyMap& device_config) {
223225
}
224226
}
225227
auto find_device_type_mode = [&](const std::string& device_type) -> std::string {
226-
std::string device_mode="";
228+
std::string device_mode = "";
227229
auto delimiter_pos = device_type.find(':');
228230
if (delimiter_pos != std::string::npos) {
229231
std::stringstream str_stream(device_type.substr(0, delimiter_pos));
@@ -283,7 +285,7 @@ void BasicBackend::PopulateConfigValue(ov::AnyMap& device_config) {
283285
auto device_mode = find_device_type_mode(session_context_.device_type);
284286
// Parse individual devices (e.g., "AUTO:CPU,GPU" -> ["CPU", "GPU"])
285287
auto individual_devices = parse_individual_devices(session_context_.device_type);
286-
if(!device_mode.empty()) individual_devices.emplace_back(device_mode);
288+
if (!device_mode.empty()) individual_devices.emplace_back(device_mode);
287289

288290
// Set properties only for individual devices (e.g., "CPU", "GPU")
289291
for (const std::string& device : individual_devices) {

onnxruntime/core/providers/openvino/openvino_provider_factory.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Licensed under the MIT License
33

44
#include <map>
5+
#include <set>
6+
57
#include <utility>
68
#include "core/providers/shared_library/provider_api.h"
79
#include "core/providers/openvino/openvino_provider_factory.h"
@@ -199,7 +201,7 @@ struct OpenVINO_Provider : Provider {
199201

200202
for (auto& [key, value] : json_config.items()) {
201203
ov::AnyMap inner_map;
202-
std::unordered_set<std::string> valid_ov_devices = {"CPU", "GPU", "NPU", "AUTO", "HETERO", "MULTI"};
204+
std::set<std::string> valid_ov_devices = {"CPU", "GPU", "NPU", "AUTO", "HETERO", "MULTI"};
203205
// Ensure the key is one of "CPU", "GPU", or "NPU"
204206
if (valid_ov_devices.find(key) == valid_ov_devices.end()) {
205207
LOGS_DEFAULT(WARNING) << "Unsupported device key: " << key << ". Skipping entry.\n";

0 commit comments

Comments
 (0)