diff --git a/src/core/include/openvino/pass/serialize.hpp b/src/core/include/openvino/pass/serialize.hpp index 691702a65f1..b1c2268d908 100644 --- a/src/core/include/openvino/pass/serialize.hpp +++ b/src/core/include/openvino/pass/serialize.hpp @@ -26,12 +26,9 @@ namespace pass { OPENVINO_SUPPRESS_DEPRECATED_START /** - * @brief Serialize transformation converts ngraph::Function into IR files + * @brief Serialize transformation converts ov::Model into IR files * @attention * - dynamic shapes are not supported - * - order of generated layers in xml file is ngraph specific (given by - * get_ordered_ops()); MO generates file with different order, but they are - * logically equivalent * \ingroup ov_pass_cpp_api */ class OPENVINO_API Serialize : public ov::pass::ModelPass { @@ -69,7 +66,7 @@ private: }; /** - * @brief StreamSerialize transformation converts ngraph::Function into single binary stream + * @brief StreamSerialize transformation converts ov::Model into single binary stream * @attention * - dynamic shapes are not supported * \ingroup ov_pass_cpp_api diff --git a/src/core/src/descriptor/tensor.cpp b/src/core/src/descriptor/tensor.cpp index 8c1f555bc8e..c0b2cb973f4 100644 --- a/src/core/src/descriptor/tensor.cpp +++ b/src/core/src/descriptor/tensor.cpp @@ -157,10 +157,10 @@ std::ostream& ov::descriptor::operator<<(std::ostream& out, const ov::descriptor names += ", "; names += name; } - NGRAPH_SUPPRESS_DEPRECATED_START + OPENVINO_SUPPRESS_DEPRECATED_START if (names.empty()) names = get_ov_tensor_legacy_name(tensor); - NGRAPH_SUPPRESS_DEPRECATED_END + OPENVINO_SUPPRESS_DEPRECATED_END out << "Tensor(" << names << ")"; return out; } diff --git a/src/core/src/node_output.cpp b/src/core/src/node_output.cpp index 312a7fad919..fbd7d3f1722 100644 --- a/src/core/src/node_output.cpp +++ b/src/core/src/node_output.cpp @@ -71,7 +71,7 @@ void Output::replace(const Output& replacement) { input.replace_source_output(replacement); } replacement.get_tensor_ptr()->add_names(get_tensor_ptr()->get_names()); - NGRAPH_SUPPRESS_DEPRECATED_START + OPENVINO_SUPPRESS_DEPRECATED_START // In legacy API we rely on output port tensor name and use it as an input or output name for the model // Due to m_name is just a string, and we can't store multiple aliases for single output port we have to // handle two situations during replacement: @@ -89,7 +89,7 @@ void Output::replace(const Output& replacement) { ov::descriptor::set_ov_tensor_legacy_name(replacement.get_tensor(), ov::descriptor::get_ov_tensor_legacy_name(get_tensor())); } - NGRAPH_SUPPRESS_DEPRECATED_END + OPENVINO_SUPPRESS_DEPRECATED_END ov::copy_output_runtime_info({*this, replacement}, {replacement}); } diff --git a/src/core/src/opsets/opset.cpp b/src/core/src/opsets/opset.cpp index 9b02d3edd66..041503a973c 100644 --- a/src/core/src/opsets/opset.cpp +++ b/src/core/src/opsets/opset.cpp @@ -11,7 +11,7 @@ #include "openvino/opsets/opset.hpp" #include "openvino/util/log.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START +OPENVINO_SUPPRESS_DEPRECATED_START ngraph::OpSet::OpSet(const ov::OpSet& opset) : ov::OpSet(opset) {} ngraph::OpSet::OpSet(const ngraph::OpSet& opset) : ov::OpSet(opset) {} diff --git a/src/core/src/pass/constant_folding.cpp b/src/core/src/pass/constant_folding.cpp index 5520098e39a..1d1edfe2aa2 100644 --- a/src/core/src/pass/constant_folding.cpp +++ b/src/core/src/pass/constant_folding.cpp @@ -4,8 +4,7 @@ #include "openvino/pass/constant_folding.hpp" -#include - +#include "openvino/cc/pass/itt.hpp" #include "openvino/core/rt_info.hpp" #include "openvino/core/validation_util.hpp" #include "openvino/op/constant.hpp" @@ -14,8 +13,6 @@ #include "openvino/op/util/shape_of_base.hpp" #include "openvino/op/util/sub_graph_base.hpp" -using namespace std; - /** * \brief Check if \ref ov::Output can be folded base on `can_be_folded` attribute. * @@ -143,8 +140,8 @@ bool ov::pass::ConstantFolding::pre_calculated_values_folding(const std::shared_ node->get_rt_info()["can_be_folded"] = can_be_folded; } - deque> nodes; - set> visited; + std::deque> nodes; + std::set> visited; for (auto& r : model->get_results()) nodes.push_back(r); for (auto& r : model->get_sinks()) diff --git a/src/core/src/pass/convert_fp32_to_fp16.cpp b/src/core/src/pass/convert_fp32_to_fp16.cpp index a9eecf1c038..5f7aecee04a 100644 --- a/src/core/src/pass/convert_fp32_to_fp16.cpp +++ b/src/core/src/pass/convert_fp32_to_fp16.cpp @@ -2,20 +2,16 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "ngraph/pass/convert_fp32_to_fp16.hpp" +#include "openvino/pass/convert_fp32_to_fp16.hpp" -#include - -#include "ngraph/graph_util.hpp" -#include "ngraph/pass/manager.hpp" +#include "openvino/cc/pass/itt.hpp" +#include "openvino/pass/manager.hpp" #include "transformations/convert_precision.hpp" -using namespace std; - bool ov::pass::ConvertFP32ToFP16::run_on_model(const std::shared_ptr& f) { RUN_ON_MODEL_SCOPE(ConvertFP32ToFP16); ov::pass::Manager m(get_pass_config()); - m.register_pass(precisions_map{{ngraph::element::f32, ngraph::element::f16}}); + m.register_pass(precisions_map{{ov::element::f32, ov::element::f16}}); m.run_passes(f); return false; } diff --git a/src/core/src/pass/graph_rewrite.cpp b/src/core/src/pass/graph_rewrite.cpp index df20ff8a7cd..66ff59ae07e 100644 --- a/src/core/src/pass/graph_rewrite.cpp +++ b/src/core/src/pass/graph_rewrite.cpp @@ -2,21 +2,19 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "ngraph/pass/graph_rewrite.hpp" +#include "openvino/pass/graph_rewrite.hpp" #include #include #include -#include -#include #include #include #include #include -#include "ngraph/env_util.hpp" -#include "ngraph/log.hpp" -#include "ngraph/op/util/sub_graph_base.hpp" +#include "openvino/cc/pass/itt.hpp" +#include "openvino/op/util/multi_subgraph_base.hpp" +#include "openvino/pass/pattern/op/wrap_type.hpp" #include "openvino/util/log.hpp" #include "perf_counters.hpp" @@ -120,7 +118,7 @@ bool ov::pass::GraphRewrite::apply_matcher_passes(std::shared_ptr f, // and use it in unordered_map as key for fast MatcherPass search. Otherwise type is unknown // and default algorithm is used. if (auto p = std::dynamic_pointer_cast(root)) { - if (auto any_type = std::dynamic_pointer_cast(p)) { + if (auto any_type = std::dynamic_pointer_cast(p)) { for (const auto& root_type_info : any_type->get_wrapped_types()) { type_to_matcher[root_type_info].push_back(matcher_index); } @@ -180,7 +178,7 @@ bool ov::pass::GraphRewrite::apply_matcher_passes(std::shared_ptr f, continue; // Recursive apply Matchers for sub-graph based nodes - if (auto sub_graph_node = std::dynamic_pointer_cast(node)) { + if (auto sub_graph_node = std::dynamic_pointer_cast(node)) { if (sub_graph_node->get_transformations_allowed()) { size_t sub_graphs_num = sub_graph_node->get_internal_subgraphs_size(); for (size_t sub_graph_ind = 0; sub_graph_ind < sub_graphs_num; ++sub_graph_ind) { diff --git a/src/core/src/pass/low_latency.cpp b/src/core/src/pass/low_latency.cpp index 7303bfa5827..f28bc19b0ad 100644 --- a/src/core/src/pass/low_latency.cpp +++ b/src/core/src/pass/low_latency.cpp @@ -2,43 +2,38 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "ngraph/pass/low_latency.hpp" +#include "openvino/pass/low_latency.hpp" #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -using namespace std; +#include "openvino/cc/pass/itt.hpp" +#include "openvino/core/rt_info.hpp" +#include "openvino/op/util/variable.hpp" +#include "openvino/opsets/opset1.hpp" +#include "openvino/opsets/opset9.hpp" +#include "openvino/pass/graph_rewrite.hpp" +#include "openvino/util/log.hpp" namespace { -string generate_variable_name(const string& op_name, const string& param_name, int64_t variable_idx) { - return op_name + "/" + param_name + "/" + "variable_" + to_string(variable_idx); +std::string generate_variable_name(const std::string& op_name, const std::string& param_name, int64_t variable_idx) { + return op_name + "/" + param_name + "/" + "variable_" + std::to_string(variable_idx); } } // namespace namespace { -const string msg_low_latency_2_already_applied = "LowLatency2 transformation cannot be applied because the " - "ReadValue node is already an input to the TensorIterator." - "LowLatency2 transformation may have already been applied, please" - "do not call it more then once."; -const string msg_low_latency_already_applied = "LowLatency2 transformation cannot be applied because the " - "ReadValue node is already inside the TensorIterator. " - "LowLatency transformation may have been applied, please do " - "not call LowLatency2 after LowLatency."; +const std::string msg_low_latency_2_already_applied = "LowLatency2 transformation cannot be applied because the " + "ReadValue node is already an input to the TensorIterator." + "LowLatency2 transformation may have already been applied, please" + "do not call it more then once."; +const std::string msg_low_latency_already_applied = "LowLatency2 transformation cannot be applied because the " + "ReadValue node is already inside the TensorIterator. " + "LowLatency transformation may have been applied, please do " + "not call LowLatency2 after LowLatency."; -void unroll_single_iteration(const shared_ptr& sub_graph_op, - const shared_ptr& outer_f) { +void unroll_single_iteration(const std::shared_ptr& sub_graph_op, + const std::shared_ptr& outer_f) { using namespace ov::opset9; const auto& params = sub_graph_op->get_function()->get_parameters(); @@ -59,9 +54,9 @@ void unroll_single_iteration(const shared_ptr& sub_gra const auto& connect_to = results.at(out->m_body_value_index)->get_input_source_output(0); for (auto& input_to : sub_graph_op->output(out->m_output_index).get_target_inputs()) { // create IE output name - string out_name = sub_graph_op->get_friendly_name(); + std::string out_name = sub_graph_op->get_friendly_name(); if (sub_graph_op->get_output_size() != 1) - out_name += "." + to_string(out->m_output_index); + out_name += "." + std::to_string(out->m_output_index); // IECompatibility: insert identity (Unsqueeze + Squeeze) to store the TensorIterator // output names @@ -90,16 +85,16 @@ ov::Output create_init_subgraph(const ov::Output& in_node, o return broadcast->output(0); } -shared_ptr replace_with_memory(const ov::Input& input, - const ov::Output& output, - const string& variable_name, - bool use_const_initializer, - ov::pass::NodeRegistry& to) { +std::shared_ptr replace_with_memory(const ov::Input& input, + const ov::Output& output, + const std::string& variable_name, + bool use_const_initializer, + ov::pass::NodeRegistry& to) { using namespace ov::opset9; using namespace ov::op::util; VariableInfo var_info{ov::PartialShape::dynamic(), ov::element::dynamic, variable_name}; - auto variable = make_shared(var_info); + auto variable = std::make_shared(var_info); ov::Output read_value_in = input.get_source_output(); if (use_const_initializer) { @@ -113,25 +108,25 @@ shared_ptr replace_with_memory(const ov::Input& in return assign; } -std::vector> replace_with_memory(const shared_ptr& node, - const vector& indexes, - bool use_const_initializer, - ov::pass::NodeRegistry& to) { - std::vector> new_assigns; +std::vector> replace_with_memory(const std::shared_ptr& node, + const std::vector& indexes, + bool use_const_initializer, + ov::pass::NodeRegistry& to) { + std::vector> new_assigns; size_t var_idx = 0; for (const auto& idx : indexes) { auto in = node->input(idx); auto out = node->output(idx); new_assigns.push_back(replace_with_memory(in, out, - node->get_friendly_name() + "/variable_" + to_string(var_idx++), + node->get_friendly_name() + "/variable_" + std::to_string(var_idx++), use_const_initializer, to)); } return new_assigns; } -bool need_unroll(const shared_ptr& op) { +bool need_unroll(const std::shared_ptr& op) { const auto p_shape = op->get_input_partial_shape(0); if (p_shape.rank().is_dynamic() || p_shape[1].is_dynamic() || p_shape[1].get_length() != 1) { return false; @@ -139,13 +134,13 @@ bool need_unroll(const shared_ptr& op) { return true; } -ov::OutputVector prepare_inputs(const shared_ptr& op, size_t seq_len_idx, ov::pass::NodeRegistry& to) { +ov::OutputVector prepare_inputs(const std::shared_ptr& op, size_t seq_len_idx, ov::pass::NodeRegistry& to) { using namespace ov::opset9; ov::OutputVector inputs; auto axis_0 = to.make(ov::element::i32, ov::Shape{1}, 0); auto axis_1 = to.make(ov::element::i32, ov::Shape{1}, 1); size_t num_lstm_inputs_without_peepholes = 7; - for (size_t i = 0; i < min(op->get_input_size(), num_lstm_inputs_without_peepholes); ++i) { + for (size_t i = 0; i < std::min(op->get_input_size(), num_lstm_inputs_without_peepholes); ++i) { if (i < seq_len_idx) { inputs.push_back(to.make(op->get_input_source_output(i), axis_1)); } else if (i > seq_len_idx) { @@ -155,14 +150,14 @@ ov::OutputVector prepare_inputs(const shared_ptr& op, size_t seq_len_i return inputs; } -std::vector> process_sequence(const shared_ptr& op, - bool m_use_const_initializer, - ov::pass::NodeRegistry& to) { +std::vector> process_sequence(const std::shared_ptr& op, + bool m_use_const_initializer, + ov::pass::NodeRegistry& to) { using namespace ov::opset9; - shared_ptr cell; - std::vector> new_assigns; + std::shared_ptr cell; + std::vector> new_assigns; bool unroll = false; - if (auto lstm_seq_v0 = dynamic_pointer_cast(op)) { + if (auto lstm_seq_v0 = std::dynamic_pointer_cast(op)) { unroll = need_unroll(op); new_assigns = replace_with_memory(op, {1, 2}, m_use_const_initializer, to); if (unroll) { @@ -179,7 +174,7 @@ std::vector> process_sequence(const shared_ptrget_activations_beta(), lstm_seq_v0->get_clip_threshold()); } - } else if (auto lstm_seq_v5 = dynamic_pointer_cast(op)) { + } else if (auto lstm_seq_v5 = std::dynamic_pointer_cast(op)) { unroll = need_unroll(op); new_assigns = replace_with_memory(op, {1, 2}, m_use_const_initializer, to); if (unroll) { @@ -196,7 +191,7 @@ std::vector> process_sequence(const shared_ptrget_activations_beta(), lstm_seq_v5->get_clip()); } - } else if (auto gru_seq = dynamic_pointer_cast(op)) { + } else if (auto gru_seq = std::dynamic_pointer_cast(op)) { unroll = need_unroll(op); new_assigns = replace_with_memory(op, {1}, m_use_const_initializer, to); if (unroll) { @@ -213,7 +208,7 @@ std::vector> process_sequence(const shared_ptrget_clip(), gru_seq->get_linear_before_reset()); } - } else if (auto rnn_seq = dynamic_pointer_cast(op)) { + } else if (auto rnn_seq = std::dynamic_pointer_cast(op)) { unroll = need_unroll(op); new_assigns = replace_with_memory(op, {1}, m_use_const_initializer, to); if (unroll) { @@ -235,7 +230,7 @@ std::vector> process_sequence(const shared_ptr(ov::element::i32, ov::Shape{2}, vector{1, 2}); + auto axis_1_2 = to.make(ov::element::i32, ov::Shape{2}, std::vector{1, 2}); auto axis_1 = to.make(ov::element::i32, ov::Shape{1}, 1); ov::OutputVector outputs; @@ -246,7 +241,7 @@ std::vector> process_sequence(const shared_ptroutputs()) { auto unsqueeze_state = to.make(out, axis_1); - unsqueeze_state->set_friendly_name(op->get_friendly_name() + ":" + to_string(idx++)); + unsqueeze_state->set_friendly_name(op->get_friendly_name() + ":" + std::to_string(idx++)); outputs.push_back(unsqueeze_state); } replace_node(op, outputs); @@ -256,7 +251,7 @@ std::vector> process_sequence(const shared_ptr& f) { +bool ov::pass::LowLatency2::run_on_model(const std::shared_ptr& f) { RUN_ON_MODEL_SCOPE(LowLatency2); using namespace ov::opset9; using namespace ov::op::util; @@ -264,20 +259,20 @@ bool ov::pass::LowLatency2::run_on_model(const shared_ptr& f) { ov::SinkVector assigns; for (const auto& op : f->get_ordered_ops()) { - if (const auto& sub_graph_op = dynamic_pointer_cast(op)) { + if (const auto& sub_graph_op = std::dynamic_pointer_cast(op)) { int64_t variable_id = 0; const auto& func = sub_graph_op->get_function(); const auto& params = func->get_parameters(); for (const auto& in : sub_graph_op->get_input_descriptions()) { // Process all back edges - if (const auto& merged_in = dynamic_pointer_cast(in)) { + if (const auto& merged_in = std::dynamic_pointer_cast(in)) { // create new Variable - const string& param_name = params.at(merged_in->m_body_parameter_index)->get_friendly_name(); - const string& var_name = + const std::string& param_name = params.at(merged_in->m_body_parameter_index)->get_friendly_name(); + const std::string& var_name = generate_variable_name(sub_graph_op->get_friendly_name(), param_name, variable_id); const auto& input = sub_graph_op->input(merged_in->m_input_index); - if (dynamic_pointer_cast(input.get_source_output().get_node_shared_ptr()) != + if (std::dynamic_pointer_cast(input.get_source_output().get_node_shared_ptr()) != nullptr) { OPENVINO_DEBUG << msg_low_latency_2_already_applied; return false; @@ -301,11 +296,12 @@ bool ov::pass::LowLatency2::run_on_model(const shared_ptr& f) { * ---> Layers -> ... */ const auto& out_desc = sub_graph_op->get_output_descriptions(); - bool is_output_exist = any_of(out_desc.begin(), - out_desc.end(), - [&merged_in](const shared_ptr& out) { - return out->m_body_value_index == merged_in->m_body_value_index; - }); + bool is_output_exist = + any_of(out_desc.begin(), + out_desc.end(), + [&merged_in](const std::shared_ptr& out) { + return out->m_body_value_index == merged_in->m_body_value_index; + }); // Create new output if it doesn't exist. if (!is_output_exist) { sub_graph_op->get_iter_value(func->get_results().at(merged_in->m_body_value_index)); diff --git a/src/core/src/pass/make_stateful.cpp b/src/core/src/pass/make_stateful.cpp index 6ac20ab68fd..2d7289efcdd 100644 --- a/src/core/src/pass/make_stateful.cpp +++ b/src/core/src/pass/make_stateful.cpp @@ -5,61 +5,57 @@ #include "openvino/pass/make_stateful.hpp" #include -#include -#include -#include -#include -using namespace std; -using namespace ngraph; -using namespace opset8; -using namespace op::util; +#include "openvino/cc/pass/itt.hpp" +#include "openvino/core/rt_info.hpp" +#include "openvino/op/util/variable.hpp" +#include "openvino/opsets/opset8.hpp" namespace { std::tuple> find_param_results_by_names( - const shared_ptr& func, + const std::shared_ptr& model, const std::map& param_res_names) { ov::pass::MakeStateful::ParamResPairs pairs_to_replace; std::vector variable_names; - const auto& params = func->get_parameters(); - const auto& results = func->get_results(); + const auto& params = model->get_parameters(); + const auto& results = model->get_results(); - std::set uniq_params; - std::set uniq_res; + std::set uniq_params; + std::set uniq_res; // find corresponding param and result by name and add to the list for (const auto& param_res : param_res_names) { const auto& param_name = param_res.first; const auto& res_name = param_res.second; - auto param = std::find_if(params.begin(), params.end(), [&](const std::shared_ptr& node) { + auto param = std::find_if(params.begin(), params.end(), [&](const std::shared_ptr& node) { const auto& possible_names = node->output(0).get_names(); return possible_names.find(param_name) != possible_names.end(); }); - NGRAPH_CHECK(param != params.end(), - "The tensor name ", - param_name, - " is not associated with any of " - "Parameters in the network."); + OPENVINO_ASSERT(param != params.end(), + "The tensor name ", + param_name, + " is not associated with any of " + "Parameters in the network."); uniq_params.insert(param->get()); - auto res = std::find_if(results.begin(), results.end(), [&](const std::shared_ptr& node) { + auto res = std::find_if(results.begin(), results.end(), [&](const std::shared_ptr& node) { const auto& possible_names = node->output(0).get_names(); return possible_names.find(res_name) != possible_names.end(); }); - NGRAPH_CHECK(res != results.end(), - "The tensor name ", - res_name, - " is not associated with any of " - "Results in the network."); + OPENVINO_ASSERT(res != results.end(), + "The tensor name ", + res_name, + " is not associated with any of " + "Results in the network."); // In case of several Results connected to one output tensor, // We can't determine what result we need to take exactly. // But we can take first unused, the order is not important, data is the same. - opset8::Result* unused_res = nullptr; + ov::op::v0::Result* unused_res = nullptr; for (const auto& target_in : (*res)->input_value(0).get_target_inputs()) { - auto is_target_res = ov::as_type(target_in.get_node()); + auto is_target_res = ov::as_type(target_in.get_node()); if (!is_target_res) { continue; } @@ -68,13 +64,13 @@ std::tuple> find break; } } - NGRAPH_CHECK(unused_res != nullptr, - "All Result operations associated with the tensor ", - res_name, - " are already involved in the transformation."); + OPENVINO_ASSERT(unused_res != nullptr, + "All Result operations associated with the tensor ", + res_name, + " are already involved in the transformation."); uniq_res.insert(unused_res); - if (auto casted = std::dynamic_pointer_cast(unused_res->shared_from_this())) + if (auto casted = std::dynamic_pointer_cast(unused_res->shared_from_this())) pairs_to_replace.emplace_back(*param, casted); variable_names.push_back(param_name + res_name); } @@ -96,32 +92,32 @@ bool ov::pass::MakeStateful::run_on_model(const std::shared_ptr& f) { } } - VariableVector variables; + ov::op::util::VariableVector variables; SinkVector sinks; for (size_t i = 0; i < m_param_res_pairs.size(); ++i) { const auto& param = m_param_res_pairs[i].first; const auto& res = m_param_res_pairs[i].second; - NGRAPH_CHECK(param->get_partial_shape().is_static(), - "Shape of Parameter ", - param->get_friendly_name(), - " must be static. MakeStateful transformation doesn't support dynamic shapes."); + OPENVINO_ASSERT(param->get_partial_shape().is_static(), + "Shape of Parameter ", + param->get_friendly_name(), + " must be static. MakeStateful transformation doesn't support dynamic shapes."); // Create Variable std::string var_name = variable_names[i]; - auto variable = - std::make_shared(VariableInfo{param->get_shape(), param->get_element_type(), var_name}); + auto variable = std::make_shared( + ov::op::util::VariableInfo{param->get_shape(), param->get_element_type(), var_name}); variables.push_back(variable); // Create ReadValue - auto const_zero = make_shared(param->get_element_type(), param->get_shape(), 0); - auto read_val = make_shared(const_zero, variable); + auto const_zero = std::make_shared(param->get_element_type(), param->get_shape(), 0); + auto read_val = std::make_shared(const_zero, variable); replace_node(param, read_val); - copy_runtime_info(param, {read_val, const_zero}); + ov::copy_runtime_info(param, {read_val, const_zero}); // Create Assign - auto assign = make_shared(res->input_value(0), variable); + auto assign = std::make_shared(res->input_value(0), variable); copy_runtime_info(res, assign); // Update Function diff --git a/src/core/src/pass/manager.cpp b/src/core/src/pass/manager.cpp index 1d9b0c0e129..f55e0c8b57a 100644 --- a/src/core/src/pass/manager.cpp +++ b/src/core/src/pass/manager.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "ngraph/pass/manager.hpp" +#include "openvino/pass/manager.hpp" #include #include @@ -12,14 +12,10 @@ #include #include "itt.hpp" -#include "ngraph/function.hpp" -#include "ngraph/graph_util.hpp" -#include "ngraph/log.hpp" -#include "ngraph/node.hpp" -#include "ngraph/pass/graph_rewrite.hpp" #include "ngraph/pass/pass.hpp" -#include "ngraph/pass/visualize_tree.hpp" #include "ngraph/util.hpp" +#include "openvino/pass/graph_rewrite.hpp" +#include "openvino/pass/visualize_tree.hpp" #include "openvino/util/env_util.hpp" #include "openvino/util/log.hpp" #include "perf_counters.hpp" @@ -61,7 +57,7 @@ void ov::pass::Manager::set_per_pass_validation(bool new_state) { } bool ov::pass::Manager::run_passes(shared_ptr func) { - NGRAPH_SUPPRESS_DEPRECATED_START + OPENVINO_SUPPRESS_DEPRECATED_START OV_ITT_SCOPED_TASK(ov::itt::domains::core, "pass::Manager::run_passes"); static bool profile_enabled = @@ -93,7 +89,7 @@ bool ov::pass::Manager::run_passes(shared_ptr func) { continue; } // GraphRewrite is a temporary container for MatcherPass to make execution - // on on entire ngraph::Function + // on on entire ov::Model pass_applied = GraphRewrite(matcher_pass).run_on_model(func); } else if (auto function_pass = dynamic_pointer_cast(pass)) { // This checks is to skip the graph transformation when the graph pass relies on @@ -147,7 +143,7 @@ bool ov::pass::Manager::run_passes(shared_ptr func) { if (profile_enabled) { cout << "passes done in " << overall_timer.get_milliseconds() << "ms\n"; } - NGRAPH_SUPPRESS_DEPRECATED_END + OPENVINO_SUPPRESS_DEPRECATED_END return function_changed; } diff --git a/src/core/src/pass/perf_counters.cpp b/src/core/src/pass/perf_counters.cpp index 32e5fda79d0..ddc91abf51b 100644 --- a/src/core/src/pass/perf_counters.cpp +++ b/src/core/src/pass/perf_counters.cpp @@ -5,7 +5,7 @@ namespace ov { namespace pass { -openvino::itt::handle_t PerfCounters::operator[](::ngraph::Node::type_info_t const& type_inf) { +openvino::itt::handle_t PerfCounters::operator[](ov::Node::type_info_t const& type_inf) { std::lock_guard guard(m_mutex); auto it = m_counters.find(&type_inf); if (it != m_counters.end()) diff --git a/src/core/src/pass/perf_counters.hpp b/src/core/src/pass/perf_counters.hpp index e6b12fce500..13c1d3abe15 100644 --- a/src/core/src/pass/perf_counters.hpp +++ b/src/core/src/pass/perf_counters.hpp @@ -2,11 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 // #pragma once + #include #include -#include #include +#include "openvino/core/node.hpp" + namespace ov { namespace pass { class PerfCounters { @@ -16,10 +18,10 @@ class PerfCounters { public: PerfCounters() = default; - openvino::itt::handle_t operator[](::ngraph::Node::type_info_t const& type_inf); + openvino::itt::handle_t operator[](ov::Node::type_info_t const& type_inf); private: - using key = ::ngraph::Node::type_info_t const*; + using key = ov::Node::type_info_t const*; using value = openvino::itt::handle_t; using counters_map = std::unordered_map; diff --git a/src/core/src/pass/serialize.cpp b/src/core/src/pass/serialize.cpp index e7bad776f35..d806f771f3f 100644 --- a/src/core/src/pass/serialize.cpp +++ b/src/core/src/pass/serialize.cpp @@ -12,8 +12,6 @@ #include #include -#include "ngraph/ops.hpp" -#include "ngraph/opsets/opset.hpp" #include "openvino/core/coordinate_diff.hpp" #include "openvino/core/except.hpp" #include "openvino/core/meta_data.hpp" @@ -439,7 +437,8 @@ public: ov::as_type>(&adapter)) { special_body_ports_on_adapter(a->get(), parameter_mapping, result_mapping, port_map); } - } else if (const auto& a = ov::as_type>>(&adapter)) { + } else if (const auto& a = + ov::as_type>>(&adapter)) { m_xml_node.append_attribute(name.c_str()).set_value(a->get()->get_info().variable_id.c_str()); } else if (const auto& a = ov::as_type>>(&adapter)) { diff --git a/src/core/src/pass/validate.cpp b/src/core/src/pass/validate.cpp index 20309c194de..049643b797a 100644 --- a/src/core/src/pass/validate.cpp +++ b/src/core/src/pass/validate.cpp @@ -4,7 +4,7 @@ #include "openvino/pass/validate.hpp" -#include +#include "openvino/cc/pass/itt.hpp" bool ov::pass::Validate::run_on_model(const std::shared_ptr& m) { RUN_ON_MODEL_SCOPE(Validate); diff --git a/src/core/src/pass/visualize_tree.cpp b/src/core/src/pass/visualize_tree.cpp index d694d6b1494..58622688b47 100644 --- a/src/core/src/pass/visualize_tree.cpp +++ b/src/core/src/pass/visualize_tree.cpp @@ -2,25 +2,19 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "ngraph/pass/visualize_tree.hpp" +#include "openvino/pass/visualize_tree.hpp" #include #include -#include -#include "ngraph/env_util.hpp" -#include "ngraph/file_util.hpp" -#include "ngraph/function.hpp" -#include "ngraph/graph_util.hpp" -#include "ngraph/node.hpp" -#include "ngraph/op/constant.hpp" -#include "ngraph/op/parameter.hpp" -#include "ngraph/op/util/op_types.hpp" -#include "ngraph/pass/pass.hpp" -#include "ngraph/util.hpp" - -using namespace ngraph; -using namespace std; +#include "openvino/cc/pass/itt.hpp" +#include "openvino/core/type.hpp" +#include "openvino/op/constant.hpp" +#include "openvino/op/parameter.hpp" +#include "openvino/op/util/op_types.hpp" +#include "openvino/util/common_util.hpp" +#include "openvino/util/env_util.hpp" +#include "openvino/util/file_util.hpp" /* * As we are visualizing the graph, we will make some tweaks to the generated dot file to make @@ -105,7 +99,7 @@ using namespace std; class HeightMap { public: HeightMap() {} - HeightMap(std::set initials) { + HeightMap(std::set initials) { for (auto& n : initials) { m_heights[n] = 0; } @@ -130,29 +124,27 @@ public: } private: - std::unordered_map m_heights; + std::unordered_map m_heights; }; -static std::string label_edge(const std::shared_ptr& /* src */, - const std::shared_ptr& dst, +static std::string label_edge(const std::shared_ptr& /* src */, + const std::shared_ptr& dst, size_t arg_index, int64_t jump_distance) { std::stringstream ss; - OPENVINO_SUPPRESS_DEPRECATED_START - if (getenv_bool("OV_VISUALIZE_TREE_EDGE_LABELS")) { + if (ov::util::getenv_bool("OV_VISUALIZE_TREE_EDGE_LABELS")) { ss << "[label=\" " << dst->input_value(arg_index).get_index() << " -> " << arg_index << " \"]"; - } else if (getenv_bool("OV_VISUALIZE_TREE_EDGE_JUMP_DISTANCE")) { + } else if (ov::util::getenv_bool("OV_VISUALIZE_TREE_EDGE_JUMP_DISTANCE")) { if (jump_distance > 1) { ss << "[label=\"jump=" << jump_distance << "\"]"; } } - OPENVINO_SUPPRESS_DEPRECATED_END return ss.str(); } static std::string get_attribute_values(const std::map& attributes, const std::string& delimiter = ", ") { - stringstream ss; + std::stringstream ss; bool first = true; for (const auto& item : attributes) { ss << (first ? " " : delimiter) << item.first; @@ -173,9 +165,9 @@ static std::string get_attribute_values(const std::map& at return ss.str(); } -bool pass::VisualizeTree::run_on_model(const std::shared_ptr& f) { +bool ov::pass::VisualizeTree::run_on_model(const std::shared_ptr& f) { RUN_ON_MODEL_SCOPE(VisualizeTree); - unordered_map height_maps; + std::unordered_map height_maps; for (auto& node : f->get_ops()) { if (node->description() == "Result") { @@ -201,7 +193,7 @@ bool pass::VisualizeTree::run_on_model(const std::shared_ptr& f) { size_t fake_node_ctr = 0; - traverse_nodes(f, [&](shared_ptr node) { + traverse_nodes(f, [&](std::shared_ptr node) { add_node_arguments(node, height_maps, fake_node_ctr); }); @@ -213,30 +205,29 @@ bool pass::VisualizeTree::run_on_model(const std::shared_ptr& f) { return false; } -pass::VisualizeTree::VisualizeTree(const string& file_name, node_modifiers_t nm, bool dot_only) +ov::pass::VisualizeTree::VisualizeTree(const std::string& file_name, node_modifiers_t nm, bool dot_only) : m_name{file_name}, m_node_modifiers{nm}, m_dot_only(dot_only) {} -void pass::VisualizeTree::add_node_arguments(shared_ptr node, - unordered_map& height_maps, - size_t& fake_node_ctr) { - OPENVINO_SUPPRESS_DEPRECATED_START - static const int const_max_elements = getenv_int("OV_VISUALIZE_TREE_CONST_MAX_ELEMENTS", 7); - OPENVINO_SUPPRESS_DEPRECATED_END +void ov::pass::VisualizeTree::add_node_arguments(std::shared_ptr node, + std::unordered_map& height_maps, + size_t& fake_node_ctr) { + static const int const_max_elements = ov::util::getenv_int("OV_VISUALIZE_TREE_CONST_MAX_ELEMENTS", 7); size_t arg_index = 0; for (auto input_value : node->input_values()) { auto arg = input_value.get_node_shared_ptr(); size_t jump_distance = height_maps[arg.get()].max_jump_to(height_maps[node.get()]); - if (ov::is_type(arg) || ov::is_type(arg)) { - auto clone_name = "CLONE_" + to_string(fake_node_ctr); - auto color = string("color=\"") + (arg->description() == "Parameter" ? "blue" : "black") + string("\""); + if (ov::is_type(arg) || ov::is_type(arg)) { + auto clone_name = "CLONE_" + std::to_string(fake_node_ctr); + auto color = + std::string("color=\"") + (arg->description() == "Parameter" ? "blue" : "black") + std::string("\""); std::vector attributes{"shape=\"box\"", "style=\"dashed\"", color, - string("label=\"") + get_node_name(arg) + string("\n") + - get_constant_value(arg, const_max_elements) + string("\"")}; + std::string("label=\"") + get_node_name(arg) + std::string("\n") + + get_constant_value(arg, const_max_elements) + std::string("\"")}; if (m_node_modifiers && !arg->output(0).get_rt_info().empty()) { m_node_modifiers(*arg, attributes); @@ -253,8 +244,8 @@ void pass::VisualizeTree::add_node_arguments(shared_ptr node, } else if (jump_distance > max_jump_distance) { m_ss << add_attributes(arg); m_ss << add_attributes(node); - auto recv_node_name = "RECV_" + to_string(fake_node_ctr); - auto send_node_name = "SEND_" + to_string(fake_node_ctr); + auto recv_node_name = "RECV_" + std::to_string(fake_node_ctr); + auto send_node_name = "SEND_" + std::to_string(fake_node_ctr); m_ss << " " << recv_node_name << "[shape=\"box\" style=\"solid,filled\" " "fillcolor=\"#ffcccc\" label=\"Receive[" @@ -278,8 +269,8 @@ void pass::VisualizeTree::add_node_arguments(shared_ptr node, } } -string pass::VisualizeTree::add_attributes(shared_ptr node) { - string rc; +std::string ov::pass::VisualizeTree::add_attributes(std::shared_ptr node) { + std::string rc; if (m_nodes_with_attributes.find(node) == m_nodes_with_attributes.end()) { m_nodes_with_attributes.insert(node); rc = get_attributes(node); @@ -287,7 +278,7 @@ string pass::VisualizeTree::add_attributes(shared_ptr node) { return rc; } -static std::string pretty_partial_shape(const PartialShape& shape) { +static std::string pretty_partial_shape(const ov::PartialShape& shape) { std::stringstream ss; if (shape.rank().is_dynamic()) { @@ -300,7 +291,7 @@ static std::string pretty_partial_shape(const PartialShape& shape) { } template -static std::string pretty_min_max_denormal_value(const vector& values) { +static std::string pretty_min_max_denormal_value(const std::vector& values) { std::stringstream ss; T min_value = values[0]; @@ -336,7 +327,7 @@ static std::string pretty_min_max_denormal_value(const vector& values) { } template -static std::string pretty_value(const vector& values, size_t max_elements, bool allow_obfuscate = false) { +static std::string pretty_value(const std::vector& values, size_t max_elements, bool allow_obfuscate = false) { std::stringstream ss; for (size_t i = 0; i < values.size(); ++i) { if (i < max_elements) { @@ -362,53 +353,51 @@ static std::string pretty_value(const vector& values, size_t max_elements, bo ss << value; } - OPENVINO_SUPPRESS_DEPRECATED_START const std::string additional_ss = - getenv_bool("OV_VISUALIZE_TREE_MIN_MAX_DENORMAL") ? pretty_min_max_denormal_value(values) : ""; + ov::util::getenv_bool("OV_VISUALIZE_TREE_MIN_MAX_DENORMAL") ? pretty_min_max_denormal_value(values) : ""; if (!additional_ss.empty()) { ss << std::endl << "(" << additional_ss << ")"; } - OPENVINO_SUPPRESS_DEPRECATED_END return ss.str(); } -static std::string get_value(const shared_ptr& constant, +static std::string get_value(const std::shared_ptr& constant, size_t max_elements, bool allow_obfuscate = false) { std::stringstream ss; switch (constant->get_output_element_type(0)) { - case element::Type_t::undefined: + case ov::element::Type_t::undefined: ss << "[ undefined value ]"; break; - case element::Type_t::dynamic: + case ov::element::Type_t::dynamic: ss << "[ dynamic value ]"; break; - case element::Type_t::u1: + case ov::element::Type_t::u1: ss << "[ u1 value ]"; break; - case element::Type_t::u4: + case ov::element::Type_t::u4: ss << "[ u4 value ]"; break; - case element::Type_t::i4: + case ov::element::Type_t::i4: ss << "[ i4 value ]"; break; - case element::Type_t::bf16: - case element::Type_t::f16: - case element::Type_t::f32: - case element::Type_t::f64: + case ov::element::Type_t::bf16: + case ov::element::Type_t::f16: + case ov::element::Type_t::f32: + case ov::element::Type_t::f64: ss << "[" << pretty_value(constant->cast_vector(), max_elements, allow_obfuscate) << "]"; break; - case element::Type_t::i8: - case element::Type_t::i16: - case element::Type_t::i32: - case element::Type_t::i64: + case ov::element::Type_t::i8: + case ov::element::Type_t::i16: + case ov::element::Type_t::i32: + case ov::element::Type_t::i64: ss << "[" << pretty_value(constant->cast_vector(), max_elements, allow_obfuscate) << "]"; break; - case element::Type_t::boolean: - case element::Type_t::u8: - case element::Type_t::u16: - case element::Type_t::u32: - case element::Type_t::u64: + case ov::element::Type_t::boolean: + case ov::element::Type_t::u8: + case ov::element::Type_t::u16: + case ov::element::Type_t::u32: + case ov::element::Type_t::u64: ss << "[" << pretty_value(constant->cast_vector(), max_elements, allow_obfuscate) << "]"; break; } @@ -429,9 +418,7 @@ static std::string get_bounds_and_label_info(const ov::Output output) if (size == 0) { label << "empty"; } else { - OPENVINO_SUPPRESS_DEPRECATED_START - static const int const_max_elements = getenv_int("OV_VISUALIZE_TREE_CONST_MAX_ELEMENTS", 7); - OPENVINO_SUPPRESS_DEPRECATED_END + static const int const_max_elements = ov::util::getenv_int("OV_VISUALIZE_TREE_CONST_MAX_ELEMENTS", 7); label << " lower: " << (lower ? get_value(std::make_shared(lower), const_max_elements, true) : "NONE"); label << " upper: " @@ -441,7 +428,7 @@ static std::string get_bounds_and_label_info(const ov::Output output) return label.str(); } -std::string pass::VisualizeTree::get_constant_value(std::shared_ptr node, size_t max_elements) { +std::string ov::pass::VisualizeTree::get_constant_value(std::shared_ptr node, size_t max_elements) { std::stringstream ss; ss << "{" << node->get_element_type().to_string() << "}"; ss << pretty_partial_shape(node->get_output_partial_shape(0)); @@ -451,11 +438,11 @@ std::string pass::VisualizeTree::get_constant_value(std::shared_ptr node, return ss.str(); } -string pass::VisualizeTree::get_attributes(shared_ptr node) { - vector attributes; +std::string ov::pass::VisualizeTree::get_attributes(std::shared_ptr node) { + std::vector attributes; attributes.push_back("shape=box"); - if (ngraph::op::is_output(node)) { + if (ov::op::util::is_output(node)) { attributes.push_back("color=crimson"); attributes.push_back("penwidth=1.5"); } else { @@ -464,23 +451,21 @@ string pass::VisualizeTree::get_attributes(shared_ptr node) { // Construct the label attribute { - stringstream label; + std::stringstream label; label << "label=\"" << get_node_name(node); - OPENVINO_SUPPRESS_DEPRECATED_START - static const bool nvtos = - getenv_bool("NGRAPH_VISUALIZE_TREE_OUTPUT_SHAPES") || getenv_bool("OV_VISUALIZE_TREE_OUTPUT_SHAPES"); - static const bool nvtot = - getenv_bool("NGRAPH_VISUALIZE_TREE_OUTPUT_TYPES") || getenv_bool("OV_VISUALIZE_TREE_OUTPUT_TYPES"); - static const bool nvtio = getenv_bool("OV_VISUALIZE_TREE_IO"); - static const bool nvtrti = getenv_bool("OV_VISUALIZE_TREE_RUNTIME_INFO"); - static const bool ovpvl = getenv_bool("OV_VISUALIZE_PARTIAL_VALUES_AND_LABELS"); - OPENVINO_SUPPRESS_DEPRECATED_END + static const bool nvtos = ov::util::getenv_bool("NGRAPH_VISUALIZE_TREE_OUTPUT_SHAPES") || + ov::util::getenv_bool("OV_VISUALIZE_TREE_OUTPUT_SHAPES"); + static const bool nvtot = ov::util::getenv_bool("NGRAPH_VISUALIZE_TREE_OUTPUT_TYPES") || + ov::util::getenv_bool("OV_VISUALIZE_TREE_OUTPUT_TYPES"); + static const bool nvtio = ov::util::getenv_bool("OV_VISUALIZE_TREE_IO"); + static const bool nvtrti = ov::util::getenv_bool("OV_VISUALIZE_TREE_RUNTIME_INFO"); + static const bool ovpvl = ov::util::getenv_bool("OV_VISUALIZE_PARTIAL_VALUES_AND_LABELS"); if (nvtos || nvtot || nvtio) { if (nvtio) { for (const auto& input : node->inputs()) { - label << "\\nin" << to_string(input.get_index()) << ": "; + label << "\\nin" << std::to_string(input.get_index()) << ": "; if (nvtot) label << "{" << input.get_element_type().to_string() << "}"; if (nvtos) @@ -495,7 +480,7 @@ string pass::VisualizeTree::get_attributes(shared_ptr node) { } for (const auto& output : node->outputs()) { if (nvtio) - label << "\\nout" << to_string(output.get_index()) << ": "; + label << "\\nout" << std::to_string(output.get_index()) << ": "; if (nvtot) label << "{" << output.get_element_type().to_string() << "}"; if (nvtos) @@ -521,26 +506,23 @@ string pass::VisualizeTree::get_attributes(shared_ptr node) { m_node_modifiers(*node, attributes); } - stringstream ss; - OPENVINO_SUPPRESS_DEPRECATED_START - ss << " " << node->get_name() << " [" << join(attributes, " ") << "]\n"; - OPENVINO_SUPPRESS_DEPRECATED_END + std::stringstream ss; + ss << " " << node->get_name() << " [" << ov::util::join(attributes, " ") << "]\n"; return ss.str(); } -string pass::VisualizeTree::get_node_name(shared_ptr node) { - OPENVINO_SUPPRESS_DEPRECATED_START - static const bool nvtmn = getenv_bool("OV_VISUALIZE_TREE_MEMBERS_NAME"); - string rc = (nvtmn ? string("friendly_name: ") : "") + node->get_friendly_name(); +std::string ov::pass::VisualizeTree::get_node_name(std::shared_ptr node) { + static const bool nvtmn = ov::util::getenv_bool("OV_VISUALIZE_TREE_MEMBERS_NAME"); + std::string rc = (nvtmn ? std::string("friendly_name: ") : "") + node->get_friendly_name(); if (node->get_friendly_name() != node->get_name()) { - rc += "\\n" + (nvtmn ? string("name: ") : "") + node->get_name(); + rc += "\\n" + (nvtmn ? std::string("name: ") : "") + node->get_name(); } const auto type_info = node->get_type_info(); - rc += "\\n" + (nvtmn ? string("type_name: ") : "") + std::string(type_info.version_id) + + rc += "\\n" + (nvtmn ? std::string("type_name: ") : "") + std::string(type_info.version_id) + "::" + std::string(type_info.name); - static const bool nvttn = getenv_bool("OV_VISUALIZE_TREE_TENSORS_NAME"); + static const bool nvttn = ov::util::getenv_bool("OV_VISUALIZE_TREE_TENSORS_NAME"); if (nvttn) { auto to_string = [](const std::unordered_set& names) { std::stringstream ss; @@ -553,7 +535,7 @@ string pass::VisualizeTree::get_node_name(shared_ptr node) { }; if (node->get_input_size() != 0) { - rc += "\\n" + (nvtmn ? string("in_tensor_names: ") : ""); + rc += "\\n" + (nvtmn ? std::string("in_tensor_names: ") : ""); for (size_t i = 0; i < node->get_input_size(); ++i) { const auto input = node->input(i); const auto tensor_ptr = input.get_tensor_ptr(); @@ -565,7 +547,7 @@ string pass::VisualizeTree::get_node_name(shared_ptr node) { } } if (node->get_output_size() != 0) { - rc += "\\n" + (nvtmn ? string("out_tensor_names: ") : ""); + rc += "\\n" + (nvtmn ? std::string("out_tensor_names: ") : ""); for (size_t i = 0; i < node->get_output_size(); ++i) { const auto output = node->output(i); const auto tensor_ptr = output.get_tensor_ptr(); @@ -578,35 +560,33 @@ string pass::VisualizeTree::get_node_name(shared_ptr node) { } } - static const bool nvtrti = getenv_bool("OV_VISUALIZE_TREE_RUNTIME_INFO"); + static const bool nvtrti = ov::util::getenv_bool("OV_VISUALIZE_TREE_RUNTIME_INFO"); if (nvtrti) { const auto rt = node->get_rt_info(); if (!rt.empty()) { rc += "\\nrt info: " + get_attribute_values(rt, "\\n"); } } - OPENVINO_SUPPRESS_DEPRECATED_END return rc; } -void pass::VisualizeTree::render() const { - NGRAPH_SUPPRESS_DEPRECATED_START - string ext = file_util::get_file_ext(m_name); - string output_format = ext.substr(1); - string dot_file = m_name; - if (to_lower(ext) != ".dot") { +void ov::pass::VisualizeTree::render() const { + std::string ext = ov::util::get_file_ext(m_name); + std::string output_format = ext.substr(1); + std::string dot_file = m_name; + if (ov::util::to_lower(ext) != ".dot") { dot_file += ".dot"; } - ofstream out(dot_file); + std::ofstream out(dot_file); if (out) { out << "digraph \n{\n"; out << m_ss.str(); out << "}\n"; out.close(); - if (!m_dot_only && to_lower(ext) != ".dot") { + if (!m_dot_only && ov::util::to_lower(ext) != ".dot") { #ifndef _WIN32 - stringstream ss; + std::stringstream ss; ss << "dot -T" << output_format << " " << dot_file << " -o" << m_name; auto cmd = ss.str(); auto stream = popen(cmd.c_str(), "r"); @@ -616,5 +596,4 @@ void pass::VisualizeTree::render() const { #endif } } - NGRAPH_SUPPRESS_DEPRECATED_END } diff --git a/src/core/src/pattern/matcher.cpp b/src/core/src/pattern/matcher.cpp index 70e5e75157e..da553dcc64d 100644 --- a/src/core/src/pattern/matcher.cpp +++ b/src/core/src/pattern/matcher.cpp @@ -84,7 +84,7 @@ void Matcher::capture(const std::set& static_nodes) { } } bool Matcher::is_contained_match(const NodeVector& exclusions, bool ignore_unused) { - NGRAPH_SUPPRESS_DEPRECATED_START + OPENVINO_SUPPRESS_DEPRECATED_START if (exclusions.empty()) { NodeVector label_exclusions; for (const auto& entry : m_pattern_map) { @@ -97,7 +97,7 @@ bool Matcher::is_contained_match(const NodeVector& exclusions, bool ignore_unuse } return ngraph::get_subgraph_outputs(get_matched_nodes(), exclusions).size() < 2; - NGRAPH_SUPPRESS_DEPRECATED_END + OPENVINO_SUPPRESS_DEPRECATED_END } bool Matcher::match_value(const ov::Output& pattern_value, const ov::Output& graph_value) {