Skip to content

Commit

Permalink
code style
Browse files Browse the repository at this point in the history
  • Loading branch information
CuriousPanCake committed Nov 15, 2024
1 parent d64f911 commit a735a27
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ ov::pass::ConvertNMS9ToNMSIEInternal::ConvertNMS9ToNMSIEInternal() {
output_0 = std::make_shared<ov::op::v0::Convert>(output_0, nms_9->output(0).get_element_type());
output_0.get_node_shared_ptr()->set_friendly_name(
nms_9->output(0).get_node_shared_ptr()->get_friendly_name() +
std::string(nms_9->output(0).get_node_shared_ptr()->get_output_size() != 1 ? "." + std::to_string(output_0.get_index()) : ""));
std::string(nms_9->output(0).get_node_shared_ptr()->get_output_size() != 1
? "." + std::to_string(output_0.get_index())
: ""));
new_ops.emplace_back(output_0.get_node_shared_ptr());
}

Expand All @@ -120,7 +122,9 @@ ov::pass::ConvertNMS9ToNMSIEInternal::ConvertNMS9ToNMSIEInternal() {
output_2 = std::make_shared<ov::op::v0::Convert>(output_2, nms_9->output(2).get_element_type());
output_2.get_node_shared_ptr()->set_friendly_name(
nms_9->output(2).get_node_shared_ptr()->get_friendly_name() +
std::string(nms_9->output(2).get_node_shared_ptr()->get_output_size() != 1 ? "." + std::to_string(output_2.get_index()) : ""));
std::string(nms_9->output(2).get_node_shared_ptr()->get_output_size() != 1
? "." + std::to_string(output_2.get_index())
: ""));
new_ops.emplace_back(output_2.get_node_shared_ptr());
}

Expand Down
4 changes: 3 additions & 1 deletion src/inference/src/dev/icompiled_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ ov::ICompiledModel::ICompiledModel(const std::shared_ptr<const ov::Model>& model
result->get_output_partial_shape(0));
auto prev_layer = result->input_value(0).get_node_shared_ptr();
const std::string res_name = prev_layer->get_friendly_name() +
std::string(prev_layer->get_output_size() != 1 ? "." + std::to_string(result->input_value(0).get_index()) : "");
std::string(prev_layer->get_output_size() != 1
? "." + std::to_string(result->input_value(0).get_index())
: "");

fake_param->set_friendly_name(res_name);
fake_param->set_element_type(result->get_element_type());
Expand Down
4 changes: 3 additions & 1 deletion src/inference/src/model_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ void update_v10_model(std::shared_ptr<ov::Model>& model, bool frontendMode = fal
for (const auto& result : model->get_results()) {
auto prev_layer = result->input_value(0).get_node_shared_ptr();
const std::string res_name = prev_layer->get_friendly_name() +
std::string(prev_layer->get_output_size() != 1 ? "." + std::to_string(result->input_value(0).get_index()) : "");
std::string(prev_layer->get_output_size() != 1
? "." + std::to_string(result->input_value(0).get_index())
: "");
OPENVINO_ASSERT(leaf_names.find(res_name) == leaf_names.end() ||
result->output(0).get_names().find(res_name) != result->output(0).get_names().end(),
"Model operation names have collisions with tensor names.",
Expand Down

0 comments on commit a735a27

Please sign in to comment.