Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ static void ParseInnerMap(const nlohmann::json& json_map, ov::AnyMap& inner_map,
const size_t max_levels = 8;
if (level >= max_levels) {
ORT_THROW("ParseInnerMap: load_config can have only up to " + std::to_string(max_levels) +
" levels of nested maps. Current level = " + std::to_string(level));
" levels of nested maps. Current level = " + std::to_string(level));
}

if (!json_map.is_object()) {
Expand Down
1 change: 0 additions & 1 deletion onnxruntime/core/providers/openvino/ov_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ typedef std::shared_ptr<OVTensor> OVTensorPtr;

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


struct OVCore : WeakSingleton<OVCore> {
ov::Core core;

Expand Down
12 changes: 6 additions & 6 deletions onnxruntime/core/providers/openvino/ov_stateful_patch_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ bool ModelHasInputOutputNames(std::shared_ptr<ov::Model> model, const std::strin
}

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

// Define input name candidates in priority order
// Define input name candidates in priority order
const std::vector<std::string> input_name_candidates = {
"inputs_embeds", // Default fallback
"input_ids", // Most common
"input_hidden_states", // Alternative
"/model/embed_tokens/Gather_output_0" // Specific model type
"inputs_embeds", // Default fallback
"input_ids", // Most common
"input_hidden_states", // Alternative
"/model/embed_tokens/Gather_output_0" // Specific model type
};

std::string main_input_name = GetInputOutputName(ov_model, input_name_candidates);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ struct CustomGraph {
ORT_ENFORCE(type_str != nullptr, "Type string is null in QDQ scales fix.");
auto type_cast = type_str->find("tensor(float)") != std::string::npos ? onnx::TensorProto_DataType_FLOAT : onnx::TensorProto_DataType_FLOAT16;
ORT_ENFORCE((type_cast == onnx::TensorProto_DataType_FLOAT) || (type_str->find("tensor(float16)") != std::string::npos),
"QDQ type misalignment, expected float32 or float16 output");
"QDQ type misalignment, expected float32 or float16 output");
cast_node.AddAttribute("to", static_cast<int64_t>(type_cast));
original_graph.AddEdge(prev.node_ptr->Index(),
cast_node.Index(),
Expand Down
8 changes: 3 additions & 5 deletions onnxruntime/python/onnxruntime_pybind_state.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2810,8 +2810,7 @@ including arg name, arg type (contains both type and shape).)pbdoc")
ORT_THROW("TunableOp and get_tuning_results are not supported in this build.");
#endif
})
.def(
"set_ep_dynamic_options", [](PyInferenceSession* sess, const py::dict& options) {
.def("set_ep_dynamic_options", [](PyInferenceSession* sess, const py::dict& options) {
std::vector<const char*> keys;
std::vector<const char*> values;
std::vector<std::string> key_strings;
Expand Down Expand Up @@ -2841,9 +2840,8 @@ including arg name, arg type (contains both type and shape).)pbdoc")

if (!status.IsOK()) {
ORT_THROW("Failed to set EP dynamic options: " + status.ErrorMessage());
}
},
R"pbdoc(Set dynamic options for execution providers.
} },
R"pbdoc(Set dynamic options for execution providers.

Args:
options (dict): Dictionary of key-value pairs where both keys and values are strings.
Expand Down
Loading