Skip to content

Commit 51493cd

Browse files
authored
Run lintrunner and fix formatting issues (#849)
1 parent 0f8a754 commit 51493cd

File tree

5 files changed

+11
-14
lines changed

5 files changed

+11
-14
lines changed

onnxruntime/core/providers/openvino/openvino_provider_factory.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ static void ParseInnerMap(const nlohmann::json& json_map, ov::AnyMap& inner_map,
193193
const size_t max_levels = 8;
194194
if (level >= max_levels) {
195195
ORT_THROW("ParseInnerMap: load_config can have only up to " + std::to_string(max_levels) +
196-
" levels of nested maps. Current level = " + std::to_string(level));
196+
" levels of nested maps. Current level = " + std::to_string(level));
197197
}
198198

199199
if (!json_map.is_object()) {

onnxruntime/core/providers/openvino/ov_interface.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ typedef std::shared_ptr<OVTensor> OVTensorPtr;
4848

4949
std::optional<bool> queryOVProperty(const std::string& property, const std::string& device_type);
5050

51-
5251
struct OVCore : WeakSingleton<OVCore> {
5352
ov::Core core;
5453

onnxruntime/core/providers/openvino/ov_stateful_patch_utils.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ bool ModelHasInputOutputNames(std::shared_ptr<ov::Model> model, const std::strin
6060
}
6161

6262
std::string GetInputOutputName(std::shared_ptr<ov::Model> ov_model,
63-
const std::vector<std::string>& candidate_names) {
63+
const std::vector<std::string>& candidate_names) {
6464
for (const auto& name : candidate_names) {
6565
if (ModelHasInputOutputNames(ov_model, name)) {
6666
return name;
@@ -78,12 +78,12 @@ void FuseCacheReorder(std::shared_ptr<ov::Model> ov_model,
7878
throw std::runtime_error("Model already has fused cache");
7979
}
8080

81-
// Define input name candidates in priority order
81+
// Define input name candidates in priority order
8282
const std::vector<std::string> input_name_candidates = {
83-
"inputs_embeds", // Default fallback
84-
"input_ids", // Most common
85-
"input_hidden_states", // Alternative
86-
"/model/embed_tokens/Gather_output_0" // Specific model type
83+
"inputs_embeds", // Default fallback
84+
"input_ids", // Most common
85+
"input_hidden_states", // Alternative
86+
"/model/embed_tokens/Gather_output_0" // Specific model type
8787
};
8888

8989
std::string main_input_name = GetInputOutputName(ov_model, input_name_candidates);

onnxruntime/core/providers/openvino/qdq_transformations/qdq_scales_fix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ struct CustomGraph {
472472
ORT_ENFORCE(type_str != nullptr, "Type string is null in QDQ scales fix.");
473473
auto type_cast = type_str->find("tensor(float)") != std::string::npos ? onnx::TensorProto_DataType_FLOAT : onnx::TensorProto_DataType_FLOAT16;
474474
ORT_ENFORCE((type_cast == onnx::TensorProto_DataType_FLOAT) || (type_str->find("tensor(float16)") != std::string::npos),
475-
"QDQ type misalignment, expected float32 or float16 output");
475+
"QDQ type misalignment, expected float32 or float16 output");
476476
cast_node.AddAttribute("to", static_cast<int64_t>(type_cast));
477477
original_graph.AddEdge(prev.node_ptr->Index(),
478478
cast_node.Index(),

onnxruntime/python/onnxruntime_pybind_state.cc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2810,8 +2810,7 @@ including arg name, arg type (contains both type and shape).)pbdoc")
28102810
ORT_THROW("TunableOp and get_tuning_results are not supported in this build.");
28112811
#endif
28122812
})
2813-
.def(
2814-
"set_ep_dynamic_options", [](PyInferenceSession* sess, const py::dict& options) {
2813+
.def("set_ep_dynamic_options", [](PyInferenceSession* sess, const py::dict& options) {
28152814
std::vector<const char*> keys;
28162815
std::vector<const char*> values;
28172816
std::vector<std::string> key_strings;
@@ -2841,9 +2840,8 @@ including arg name, arg type (contains both type and shape).)pbdoc")
28412840

28422841
if (!status.IsOK()) {
28432842
ORT_THROW("Failed to set EP dynamic options: " + status.ErrorMessage());
2844-
}
2845-
},
2846-
R"pbdoc(Set dynamic options for execution providers.
2843+
} },
2844+
R"pbdoc(Set dynamic options for execution providers.
28472845
28482846
Args:
28492847
options (dict): Dictionary of key-value pairs where both keys and values are strings.

0 commit comments

Comments
 (0)