From f5fd042239a3e470ab8f5a68b29edc0e67ac8d8c Mon Sep 17 00:00:00 2001 From: "River.Li" Date: Wed, 1 Nov 2023 15:03:14 +0800 Subject: [PATCH] Cleanup IE and ngraph 1. InferenceEngine::SizeVector 2. InferenceEngine::parallel_for 3. all ngraph namespace except ngraph::op --- src/plugins/intel_cpu/src/compiled_model.cpp | 1 - .../src/emitters/x64/cpu_generator.cpp | 4 +- .../emitters/x64/jit_conversion_emitters.cpp | 6 +- .../emitters/x64/jit_conversion_emitters.hpp | 6 +- .../src/emitters/x64/jit_dnnl_emitters.cpp | 4 +- .../src/emitters/x64/jit_dnnl_emitters.hpp | 4 +- .../emitters/x64/jit_dnnl_ext_emitters.hpp | 30 +-- .../src/emitters/x64/jit_eltwise_emitters.cpp | 62 ++--- .../src/emitters/x64/jit_eltwise_emitters.hpp | 68 ++--- .../src/emitters/x64/jit_emitter.cpp | 2 +- .../src/emitters/x64/jit_emitter.hpp | 2 +- .../emitters/x64/jit_snippets_emitters.cpp | 2 +- .../emitters/x64/jit_snippets_emitters.hpp | 6 +- src/plugins/intel_cpu/src/extension.cpp | 4 +- src/plugins/intel_cpu/src/extension.h | 4 +- src/plugins/intel_cpu/src/extension_mngr.cpp | 2 +- src/plugins/intel_cpu/src/extension_mngr.h | 2 +- src/plugins/intel_cpu/src/graph.cpp | 2 +- src/plugins/intel_cpu/src/graph_dumper.cpp | 20 +- src/plugins/intel_cpu/src/graph_dumper.h | 2 +- src/plugins/intel_cpu/src/graph_optimizer.cpp | 4 +- .../memory_desc/cpu_blocked_memory_desc.cpp | 8 +- .../src/memory_desc/cpu_blocked_memory_desc.h | 2 +- src/plugins/intel_cpu/src/node.cpp | 4 +- src/plugins/intel_cpu/src/node.h | 10 +- .../intel_cpu/src/nodes/adaptive_pooling.cpp | 4 +- .../intel_cpu/src/nodes/adaptive_pooling.h | 4 +- .../intel_cpu/src/nodes/batch_to_space.cpp | 4 +- .../intel_cpu/src/nodes/batch_to_space.h | 4 +- src/plugins/intel_cpu/src/nodes/bin_conv.cpp | 6 +- src/plugins/intel_cpu/src/nodes/bin_conv.h | 4 +- src/plugins/intel_cpu/src/nodes/bucketize.cpp | 4 +- src/plugins/intel_cpu/src/nodes/bucketize.h | 4 +- .../intel_cpu/src/nodes/color_convert.cpp | 18 +- .../intel_cpu/src/nodes/color_convert.h | 4 +- .../src/nodes/common/permute_kernel.h | 16 +- .../intel_cpu/src/nodes/common/softmax.h | 2 +- src/plugins/intel_cpu/src/nodes/concat.cpp | 8 +- src/plugins/intel_cpu/src/nodes/concat.h | 6 +- src/plugins/intel_cpu/src/nodes/conv.cpp | 10 +- src/plugins/intel_cpu/src/nodes/conv.h | 8 +- src/plugins/intel_cpu/src/nodes/convert.cpp | 4 +- src/plugins/intel_cpu/src/nodes/convert.h | 4 +- .../src/nodes/ctc_greedy_decoder.cpp | 8 +- .../intel_cpu/src/nodes/ctc_greedy_decoder.h | 4 +- .../src/nodes/ctc_greedy_decoder_seq_len.cpp | 8 +- .../src/nodes/ctc_greedy_decoder_seq_len.h | 4 +- src/plugins/intel_cpu/src/nodes/ctc_loss.cpp | 8 +- src/plugins/intel_cpu/src/nodes/ctc_loss.h | 4 +- src/plugins/intel_cpu/src/nodes/cum_sum.cpp | 6 +- src/plugins/intel_cpu/src/nodes/cum_sum.h | 4 +- src/plugins/intel_cpu/src/nodes/deconv.cpp | 12 +- src/plugins/intel_cpu/src/nodes/deconv.h | 4 +- src/plugins/intel_cpu/src/nodes/def_conv.cpp | 4 +- src/plugins/intel_cpu/src/nodes/def_conv.h | 4 +- .../intel_cpu/src/nodes/depth_to_space.cpp | 8 +- .../intel_cpu/src/nodes/depth_to_space.h | 4 +- .../intel_cpu/src/nodes/detection_output.cpp | 2 +- src/plugins/intel_cpu/src/nodes/dft.cpp | 4 +- src/plugins/intel_cpu/src/nodes/dft.h | 4 +- src/plugins/intel_cpu/src/nodes/eltwise.cpp | 102 ++++---- src/plugins/intel_cpu/src/nodes/eltwise.h | 10 +- .../src/nodes/embedding_bag_offset_sum.cpp | 6 +- .../src/nodes/embedding_bag_offset_sum.h | 4 +- .../src/nodes/embedding_bag_packed_sum.cpp | 6 +- .../src/nodes/embedding_bag_packed_sum.h | 4 +- .../intel_cpu/src/nodes/embedding_bag_sum.cpp | 6 +- .../intel_cpu/src/nodes/embedding_bag_sum.h | 6 +- .../src/nodes/embedding_segments_sum.cpp | 6 +- .../src/nodes/embedding_segments_sum.h | 4 +- .../nodes/executors/acl/acl_ie_scheduler.cpp | 4 +- .../nodes/executors/mlas/mlas_transpose.hpp | 2 +- .../intel_cpu/src/nodes/executors/mvn.hpp | 2 +- ...xperimental_detectron_detection_output.cpp | 8 +- .../experimental_detectron_detection_output.h | 4 +- ...ectron_generate_proposals_single_image.cpp | 8 +- ...etectron_generate_proposals_single_image.h | 4 +- ...erimental_detectron_priorgridgenerator.cpp | 4 +- ...xperimental_detectron_priorgridgenerator.h | 4 +- ...rimental_detectron_roifeatureextractor.cpp | 4 +- ...perimental_detectron_roifeatureextractor.h | 4 +- .../nodes/experimental_detectron_topkrois.cpp | 4 +- .../nodes/experimental_detectron_topkrois.h | 4 +- .../src/nodes/extract_image_patches.cpp | 10 +- .../src/nodes/extract_image_patches.h | 4 +- src/plugins/intel_cpu/src/nodes/eye.cpp | 4 +- src/plugins/intel_cpu/src/nodes/eye.h | 4 +- .../intel_cpu/src/nodes/fake_quantize.cpp | 24 +- .../intel_cpu/src/nodes/fake_quantize.h | 4 +- .../intel_cpu/src/nodes/fullyconnected.cpp | 4 +- .../intel_cpu/src/nodes/fullyconnected.h | 4 +- src/plugins/intel_cpu/src/nodes/gather.h | 4 +- .../intel_cpu/src/nodes/gather_elements.cpp | 2 +- .../intel_cpu/src/nodes/gather_elements.h | 2 +- src/plugins/intel_cpu/src/nodes/gather_nd.cpp | 8 +- src/plugins/intel_cpu/src/nodes/gather_nd.h | 4 +- .../intel_cpu/src/nodes/gather_tree.cpp | 6 +- src/plugins/intel_cpu/src/nodes/gather_tree.h | 4 +- .../src/nodes/generate_proposals.cpp | 8 +- .../intel_cpu/src/nodes/generate_proposals.h | 4 +- src/plugins/intel_cpu/src/nodes/grn.cpp | 4 +- src/plugins/intel_cpu/src/nodes/grn.h | 4 +- src/plugins/intel_cpu/src/nodes/input.cpp | 6 +- src/plugins/intel_cpu/src/nodes/input.h | 2 +- .../intel_cpu/src/nodes/interaction.cpp | 4 +- src/plugins/intel_cpu/src/nodes/interaction.h | 4 +- .../intel_cpu/src/nodes/interpolate.cpp | 24 +- src/plugins/intel_cpu/src/nodes/interpolate.h | 4 +- .../intel_cpu/src/nodes/log_softmax.cpp | 4 +- src/plugins/intel_cpu/src/nodes/log_softmax.h | 4 +- src/plugins/intel_cpu/src/nodes/lrn.cpp | 12 +- src/plugins/intel_cpu/src/nodes/lrn.h | 4 +- .../intel_cpu/src/nodes/mathematics.cpp | 58 ++--- src/plugins/intel_cpu/src/nodes/mathematics.h | 6 +- src/plugins/intel_cpu/src/nodes/matmul.cpp | 4 +- src/plugins/intel_cpu/src/nodes/matmul.h | 4 +- .../intel_cpu/src/nodes/matrix_nms.cpp | 14 +- src/plugins/intel_cpu/src/nodes/matrix_nms.h | 4 +- src/plugins/intel_cpu/src/nodes/memory.cpp | 10 +- src/plugins/intel_cpu/src/nodes/memory.hpp | 10 +- src/plugins/intel_cpu/src/nodes/mha.h | 4 +- .../intel_cpu/src/nodes/multiclass_nms.hpp | 16 +- src/plugins/intel_cpu/src/nodes/mvn.cpp | 14 +- src/plugins/intel_cpu/src/nodes/mvn.h | 4 +- .../src/nodes/non_max_suppression.cpp | 4 +- .../intel_cpu/src/nodes/non_max_suppression.h | 4 +- src/plugins/intel_cpu/src/nodes/non_zero.cpp | 6 +- src/plugins/intel_cpu/src/nodes/non_zero.h | 4 +- src/plugins/intel_cpu/src/nodes/normalize.cpp | 12 +- src/plugins/intel_cpu/src/nodes/normalize.h | 4 +- src/plugins/intel_cpu/src/nodes/one_hot.cpp | 8 +- src/plugins/intel_cpu/src/nodes/one_hot.h | 4 +- src/plugins/intel_cpu/src/nodes/priorbox.cpp | 4 +- src/plugins/intel_cpu/src/nodes/priorbox.h | 4 +- .../src/nodes/priorbox_clustered.cpp | 4 +- .../intel_cpu/src/nodes/priorbox_clustered.h | 4 +- src/plugins/intel_cpu/src/nodes/proposal.cpp | 8 +- src/plugins/intel_cpu/src/nodes/proposal.h | 4 +- .../intel_cpu/src/nodes/psroi_pooling.cpp | 8 +- .../intel_cpu/src/nodes/psroi_pooling.h | 4 +- src/plugins/intel_cpu/src/nodes/range.cpp | 10 +- src/plugins/intel_cpu/src/nodes/range.h | 4 +- src/plugins/intel_cpu/src/nodes/rdft.cpp | 4 +- src/plugins/intel_cpu/src/nodes/rdft.h | 4 +- src/plugins/intel_cpu/src/nodes/reduce.cpp | 26 +- src/plugins/intel_cpu/src/nodes/reduce.h | 14 +- src/plugins/intel_cpu/src/nodes/reference.cpp | 2 +- src/plugins/intel_cpu/src/nodes/reference.h | 4 +- .../intel_cpu/src/nodes/region_yolo.cpp | 4 +- src/plugins/intel_cpu/src/nodes/region_yolo.h | 4 +- src/plugins/intel_cpu/src/nodes/reorder.cpp | 2 +- src/plugins/intel_cpu/src/nodes/reorder.h | 2 +- .../intel_cpu/src/nodes/reorg_yolo.cpp | 4 +- src/plugins/intel_cpu/src/nodes/reorg_yolo.h | 4 +- src/plugins/intel_cpu/src/nodes/reshape.cpp | 6 +- src/plugins/intel_cpu/src/nodes/reshape.h | 4 +- .../intel_cpu/src/nodes/reverse_sequence.cpp | 4 +- .../intel_cpu/src/nodes/reverse_sequence.h | 6 +- src/plugins/intel_cpu/src/nodes/rnn.cpp | 4 +- src/plugins/intel_cpu/src/nodes/rnn.h | 8 +- src/plugins/intel_cpu/src/nodes/roi_align.cpp | 12 +- src/plugins/intel_cpu/src/nodes/roi_align.h | 4 +- .../intel_cpu/src/nodes/roi_pooling.cpp | 8 +- src/plugins/intel_cpu/src/nodes/roi_pooling.h | 4 +- src/plugins/intel_cpu/src/nodes/roll.cpp | 4 +- src/plugins/intel_cpu/src/nodes/roll.h | 4 +- .../intel_cpu/src/nodes/scatter_update.cpp | 10 +- .../intel_cpu/src/nodes/scatter_update.h | 4 +- src/plugins/intel_cpu/src/nodes/shapeof.cpp | 4 +- src/plugins/intel_cpu/src/nodes/shapeof.h | 4 +- .../intel_cpu/src/nodes/shuffle_channels.cpp | 4 +- .../intel_cpu/src/nodes/shuffle_channels.h | 4 +- src/plugins/intel_cpu/src/nodes/softmax.cpp | 6 +- src/plugins/intel_cpu/src/nodes/softmax.h | 4 +- .../intel_cpu/src/nodes/space_to_depth.cpp | 8 +- .../intel_cpu/src/nodes/space_to_depth.h | 4 +- src/plugins/intel_cpu/src/nodes/split.cpp | 14 +- src/plugins/intel_cpu/src/nodes/split.h | 4 +- src/plugins/intel_cpu/src/nodes/subgraph.h | 2 +- .../intel_cpu/src/nodes/tensoriterator.cpp | 4 +- src/plugins/intel_cpu/src/nodes/topk.cpp | 2 +- src/plugins/intel_cpu/src/nodes/topk.h | 4 +- src/plugins/intel_cpu/src/nodes/transpose.h | 8 +- .../shape_inference/custom/fullyconnected.hpp | 2 +- .../src/shape_inference/custom/matmul.hpp | 4 +- .../cpu_opset/arm/pass/convert_group_conv.cpp | 20 +- .../arm/pass/convert_group_conv1d.cpp | 28 +-- .../arm/pass/convert_group_conv1d.hpp | 2 +- .../arm/pass/convert_reduce_multi_axis.cpp | 40 +-- .../arm/pass/convert_reduce_multi_axis.hpp | 2 +- .../cpu_opset/arm/pass/mish_decomposition.cpp | 12 +- .../cpu_opset/common/op/fully_connected.cpp | 14 +- .../cpu_opset/common/op/fully_connected.hpp | 20 +- .../cpu_opset/common/op/leaky_relu.cpp | 10 +- .../cpu_opset/common/op/leaky_relu.hpp | 10 +- .../cpu_opset/common/op/power_static.cpp | 10 +- .../cpu_opset/common/op/power_static.hpp | 10 +- .../cpu_opset/common/op/swish_cpu.cpp | 6 +- .../cpu_opset/common/op/swish_cpu.hpp | 6 +- .../common/pass/align_matmul_input_ranks.cpp | 40 +-- .../pass/convert_broadcast_to_tiles.cpp | 18 +- .../pass/convert_fq_rnn_to_quantized_rnn.cpp | 84 +++---- .../common/pass/convert_matmul_to_fc.cpp | 24 +- .../common/pass/convert_tile_to_seq_tiles.cpp | 18 +- .../common/pass/convert_to_leaky_relu.cpp | 16 +- .../common/pass/convert_to_power_static.cpp | 32 +-- .../common/pass/convert_to_swish_cpu.cpp | 12 +- .../common/pass/decompose_integer_divide.cpp | 8 +- .../pass/move_eltwise_up_data_movement.cpp | 30 +-- .../common/pass/reshape_fc_fusion.cpp | 30 +-- .../pass/rnn_sequences_optimization.cpp | 60 ++--- .../convert_to_cpu_specific_opset.hpp | 6 +- .../cpu_opset/x64/op/interaction.cpp | 6 +- .../cpu_opset/x64/op/interaction.hpp | 8 +- .../transformations/cpu_opset/x64/op/mha.cpp | 46 ++-- .../transformations/cpu_opset/x64/op/mha.hpp | 46 ++-- .../cpu_opset/x64/pass/mha_fusion.cpp | 234 +++++++++--------- .../cpu_opset/x64/pass/mha_fusion.hpp | 4 +- .../x64/pass/simplify_fakequantize.hpp | 4 +- .../x64/pass/brgemm_to_brgemm_cpu.cpp | 2 +- .../snippets/x64/pass/enforce_precision.hpp | 6 +- .../lowered/fuse_load_store_and_convert.cpp | 4 +- .../transformations/transformation_pipeline.h | 2 +- src/plugins/intel_cpu/src/utils/cpu_utils.hpp | 6 +- .../src/utils/debug_capabilities.cpp | 24 +- .../intel_cpu/src/utils/ngraph_utils.hpp | 8 +- .../rt_info/memory_formats_attribute.cpp | 4 +- .../rt_info/memory_formats_attribute.hpp | 6 +- 228 files changed, 1158 insertions(+), 1159 deletions(-) diff --git a/src/plugins/intel_cpu/src/compiled_model.cpp b/src/plugins/intel_cpu/src/compiled_model.cpp index f4aeaaab85bc29..f7c1f149dd26ba 100644 --- a/src/plugins/intel_cpu/src/compiled_model.cpp +++ b/src/plugins/intel_cpu/src/compiled_model.cpp @@ -56,7 +56,6 @@ CompiledModel::CompiledModel(const std::shared_ptr& model, m_name{model->get_name()}, m_loaded_from_cache(loaded_from_cache) { bool isFloatModel = !ov::op::util::has_op_with_type(m_model); - m_mutex = std::make_shared(); const auto& core = m_plugin->get_core(); if (!core) diff --git a/src/plugins/intel_cpu/src/emitters/x64/cpu_generator.cpp b/src/plugins/intel_cpu/src/emitters/x64/cpu_generator.cpp index da30b19eba675c..52b0ddaf36578b 100644 --- a/src/plugins/intel_cpu/src/emitters/x64/cpu_generator.cpp +++ b/src/plugins/intel_cpu/src/emitters/x64/cpu_generator.cpp @@ -31,7 +31,7 @@ using namespace std; [this](const ov::snippets::lowered::ExpressionPtr& expr) -> std::shared_ptr { \ return std::make_shared(h.get(), isa, expr); \ }, \ - [](const std::shared_ptr& n) -> std::set> { \ + [](const std::shared_ptr& n) -> std::set> { \ return e_type::get_supported_precisions(n); \ } \ }; @@ -40,7 +40,7 @@ using namespace std; [this](const ov::snippets::lowered::ExpressionPtr& expr) -> std::shared_ptr { \ return std::make_shared(h.get(), isa, expr->get_node()); \ }, \ - [](const std::shared_ptr& n) -> std::set> { \ + [](const std::shared_ptr& n) -> std::set> { \ return e_type::get_supported_precisions(n); \ } \ }; diff --git a/src/plugins/intel_cpu/src/emitters/x64/jit_conversion_emitters.cpp b/src/plugins/intel_cpu/src/emitters/x64/jit_conversion_emitters.cpp index 6d4d6c0d04f75e..a217f7eb07ef54 100644 --- a/src/plugins/intel_cpu/src/emitters/x64/jit_conversion_emitters.cpp +++ b/src/plugins/intel_cpu/src/emitters/x64/jit_conversion_emitters.cpp @@ -17,7 +17,7 @@ using namespace Xbyak; namespace ov { namespace intel_cpu { -jit_convert_emitter::jit_convert_emitter(jit_generator *host, cpu_isa_t host_isa, const std::shared_ptr& node, Precision exec_prc) +jit_convert_emitter::jit_convert_emitter(jit_generator *host, cpu_isa_t host_isa, const std::shared_ptr& node, Precision exec_prc) : jit_emitter(host, host_isa, exec_prc) { input_type = node->get_input_element_type(0); output_type = node->get_output_element_type(0); @@ -58,7 +58,7 @@ void jit_convert_emitter::float2bfloat(const std::vector &in_vec_idxs, c } jit_convert_truncation_emitter::jit_convert_truncation_emitter(jit_generator *host, cpu_isa_t host_isa, - const std::shared_ptr& node, Precision exec_prc) + const std::shared_ptr& node, Precision exec_prc) : jit_convert_emitter(host, host_isa, node, exec_prc) { prepare_table(); } @@ -193,7 +193,7 @@ void jit_convert_truncation_emitter::dword2int8(const std::vector &in_ve } jit_convert_saturation_emitter::jit_convert_saturation_emitter(jit_generator *host, cpu_isa_t host_isa, - const std::shared_ptr& node, Precision exec_prc) + const std::shared_ptr& node, Precision exec_prc) : jit_convert_emitter(host, host_isa, node, exec_prc) { } diff --git a/src/plugins/intel_cpu/src/emitters/x64/jit_conversion_emitters.hpp b/src/plugins/intel_cpu/src/emitters/x64/jit_conversion_emitters.hpp index cf1728c299a9a3..c7c628cd69339d 100644 --- a/src/plugins/intel_cpu/src/emitters/x64/jit_conversion_emitters.hpp +++ b/src/plugins/intel_cpu/src/emitters/x64/jit_conversion_emitters.hpp @@ -14,7 +14,7 @@ namespace intel_cpu { class jit_convert_emitter : public jit_emitter { public: jit_convert_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, - const std::shared_ptr& n, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); + const std::shared_ptr& n, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; @@ -47,7 +47,7 @@ class jit_convert_emitter : public jit_emitter { class jit_convert_truncation_emitter : public jit_convert_emitter { public: jit_convert_truncation_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, - const std::shared_ptr& n, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); + const std::shared_ptr& n, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); private: void emit_impl(const std::vector& in, const std::vector& out) const override; @@ -68,7 +68,7 @@ class jit_convert_truncation_emitter : public jit_convert_emitter { class jit_convert_saturation_emitter : public jit_convert_emitter { public: jit_convert_saturation_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, - const std::shared_ptr& n, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); + const std::shared_ptr& n, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); private: void emit_impl(const std::vector& in, const std::vector& out) const override; diff --git a/src/plugins/intel_cpu/src/emitters/x64/jit_dnnl_emitters.cpp b/src/plugins/intel_cpu/src/emitters/x64/jit_dnnl_emitters.cpp index 2df36538729c44..5097f034548716 100644 --- a/src/plugins/intel_cpu/src/emitters/x64/jit_dnnl_emitters.cpp +++ b/src/plugins/intel_cpu/src/emitters/x64/jit_dnnl_emitters.cpp @@ -13,11 +13,11 @@ using namespace Xbyak; namespace ov { namespace intel_cpu { -std::set> jit_dnnl_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_dnnl_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32}}; } -jit_dnnl_emitter::jit_dnnl_emitter(jit_generator *host, cpu_isa_t host_isa, const std::shared_ptr& node, InferenceEngine::Precision exec_prc) +jit_dnnl_emitter::jit_dnnl_emitter(jit_generator *host, cpu_isa_t host_isa, const std::shared_ptr& node, InferenceEngine::Precision exec_prc) : jit_emitter(host, host_isa, exec_prc) { kind = dnnl_eltwise_tanh; diff --git a/src/plugins/intel_cpu/src/emitters/x64/jit_dnnl_emitters.hpp b/src/plugins/intel_cpu/src/emitters/x64/jit_dnnl_emitters.hpp index 0b7165d2484580..6213df7faba965 100644 --- a/src/plugins/intel_cpu/src/emitters/x64/jit_dnnl_emitters.hpp +++ b/src/plugins/intel_cpu/src/emitters/x64/jit_dnnl_emitters.hpp @@ -20,13 +20,13 @@ class jit_dnnl_emitter : public jit_emitter { void emit_impl(const std::vector &in_idxs, const std::vector &out_idxs) const override {}; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); protected: jit_dnnl_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, dnnl_alg_kind_t algKind, float inpAlpha, float inpBeta, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); - jit_dnnl_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, + jit_dnnl_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); void set_injector(); diff --git a/src/plugins/intel_cpu/src/emitters/x64/jit_dnnl_ext_emitters.hpp b/src/plugins/intel_cpu/src/emitters/x64/jit_dnnl_ext_emitters.hpp index c64b90b1ce103f..0c7908e98abb48 100644 --- a/src/plugins/intel_cpu/src/emitters/x64/jit_dnnl_ext_emitters.hpp +++ b/src/plugins/intel_cpu/src/emitters/x64/jit_dnnl_ext_emitters.hpp @@ -13,7 +13,7 @@ namespace intel_cpu { class jit_relu_emitter : public jit_dnnl_emitter { public: - jit_relu_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, + jit_relu_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32) : jit_dnnl_emitter(host, host_isa, n, exec_prc) { kind = dnnl_eltwise_relu; @@ -26,7 +26,7 @@ class jit_relu_emitter : public jit_dnnl_emitter { class jit_sigmoid_emitter : public jit_dnnl_emitter { public: - jit_sigmoid_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, + jit_sigmoid_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32) : jit_dnnl_emitter(host, host_isa, n, exec_prc) { kind = dnnl_eltwise_logistic; @@ -39,7 +39,7 @@ class jit_sigmoid_emitter : public jit_dnnl_emitter { class jit_tanh_emitter : public jit_dnnl_emitter { public: - jit_tanh_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, + jit_tanh_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32) : jit_dnnl_emitter(host, host_isa, n, exec_prc) { kind = dnnl_eltwise_tanh; @@ -52,11 +52,11 @@ class jit_tanh_emitter : public jit_dnnl_emitter { class jit_elu_emitter : public jit_dnnl_emitter { public: - jit_elu_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, + jit_elu_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32) : jit_dnnl_emitter(host, host_isa, n, exec_prc) { kind = dnnl_eltwise_elu; - alpha = ngraph::as_type_ptr(n)->get_alpha(); + alpha = ov::as_type_ptr(n)->get_alpha(); beta = 0.f; set_injector(); @@ -65,7 +65,7 @@ class jit_elu_emitter : public jit_dnnl_emitter { class jit_exp_emitter : public jit_dnnl_emitter { public: - jit_exp_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, + jit_exp_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32) : jit_dnnl_emitter(host, host_isa, n, exec_prc) { kind = dnnl_eltwise_exp; @@ -78,7 +78,7 @@ class jit_exp_emitter : public jit_dnnl_emitter { class jit_abs_emitter : public jit_dnnl_emitter { public: - jit_abs_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, + jit_abs_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32) : jit_dnnl_emitter(host, host_isa, n, exec_prc) { kind = dnnl_eltwise_abs; @@ -91,11 +91,11 @@ class jit_abs_emitter : public jit_dnnl_emitter { class jit_clamp_emitter : public jit_dnnl_emitter { public: - jit_clamp_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, + jit_clamp_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32) : jit_dnnl_emitter(host, host_isa, n, exec_prc) { kind = dnnl_eltwise_clip; - auto op = ngraph::as_type_ptr(n); + auto op = ov::as_type_ptr(n); alpha = op->get_min(); beta = op->get_max(); @@ -105,11 +105,11 @@ class jit_clamp_emitter : public jit_dnnl_emitter { class jit_swish_emitter : public jit_dnnl_emitter { public: - jit_swish_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, + jit_swish_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32) : jit_dnnl_emitter(host, host_isa, n, exec_prc) { kind = dnnl_eltwise_swish; - auto op = ngraph::as_type_ptr(n); + auto op = ov::as_type_ptr(n); alpha = op->get_alpha(); beta = 0.f; @@ -119,7 +119,7 @@ class jit_swish_emitter : public jit_dnnl_emitter { class jit_hswish_emitter : public jit_dnnl_emitter { public: - jit_hswish_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, + jit_hswish_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32) : jit_dnnl_emitter(host, host_isa, n, exec_prc) { // since v3.0 oneDNN has flexible version of hardswish, ov still uses the one with hardcoded alpha and beta @@ -133,7 +133,7 @@ class jit_hswish_emitter : public jit_dnnl_emitter { class jit_gelu_v0_emitter : public jit_dnnl_emitter { public: - jit_gelu_v0_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, + jit_gelu_v0_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32) : jit_dnnl_emitter(host, host_isa, n, exec_prc) { kind = dnnl_eltwise_gelu_erf; @@ -144,7 +144,7 @@ class jit_gelu_v0_emitter : public jit_dnnl_emitter { class jit_gelu_v7_emitter : public jit_dnnl_emitter { public: - jit_gelu_v7_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, + jit_gelu_v7_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32) : jit_dnnl_emitter(host, host_isa, n, exec_prc) { auto gelu = getNgraphOpAs(n); @@ -167,7 +167,7 @@ class jit_round_emitter : public jit_dnnl_emitter { jit_round_emitter( dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, - const std::shared_ptr& n, + const std::shared_ptr& n, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32) : jit_dnnl_emitter(host, host_isa, n, exec_prc) { const auto round = getNgraphOpAs(n); const auto mode = round->get_mode(); diff --git a/src/plugins/intel_cpu/src/emitters/x64/jit_eltwise_emitters.cpp b/src/plugins/intel_cpu/src/emitters/x64/jit_eltwise_emitters.cpp index 9e29f988437e60..e862a4c55db29d 100644 --- a/src/plugins/intel_cpu/src/emitters/x64/jit_eltwise_emitters.cpp +++ b/src/plugins/intel_cpu/src/emitters/x64/jit_eltwise_emitters.cpp @@ -77,7 +77,7 @@ void jit_add_emitter::emit_isa(const std::vector &in_vec_idxs, const std } } -std::set> jit_add_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_add_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32, element::f32}, {element::i32, element::i32}}; } @@ -168,7 +168,7 @@ size_t jit_mul_add_emitter::aux_vecs_count() const { return 1; } -std::set> jit_mul_add_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_mul_add_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32, element::f32, element::f32}, {element::i32, element::i32, element::i32}}; } @@ -215,7 +215,7 @@ void jit_subtract_emitter::emit_isa(const std::vector &in_vec_idxs, cons } } -std::set> jit_subtract_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_subtract_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32, element::f32}, {element::i32, element::i32}}; } @@ -262,7 +262,7 @@ void jit_multiply_emitter::emit_isa(const std::vector &in_vec_idxs, cons } } -std::set> jit_multiply_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_multiply_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32, element::f32}, {element::i32, element::i32}}; } @@ -323,7 +323,7 @@ void jit_divide_emitter::emit_isa(const std::vector &in_vec_idxs, const } } -std::set> jit_divide_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_divide_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32, element::f32}, {element::i32, element::i32}}; } @@ -339,7 +339,7 @@ jit_floor_emitter::jit_floor_emitter(x64::jit_generator *host, x64::cpu_isa_t ho size_t jit_floor_emitter::get_inputs_num() const { return 1; } -std::set> jit_floor_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_floor_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32}}; } @@ -371,7 +371,7 @@ jit_ceiling_emitter::jit_ceiling_emitter(x64::jit_generator *host, x64::cpu_isa_ size_t jit_ceiling_emitter::get_inputs_num() const { return 1; } -std::set> jit_ceiling_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_ceiling_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32}}; } @@ -404,7 +404,7 @@ jit_floor_mod_emitter::jit_floor_mod_emitter(x64::jit_generator *host, x64::cpu_ size_t jit_floor_mod_emitter::get_inputs_num() const { return 2; } -std::set> jit_floor_mod_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_floor_mod_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32, element::f32}}; } @@ -458,7 +458,7 @@ jit_mod_emitter::jit_mod_emitter(x64::jit_generator *host, x64::cpu_isa_t host_i size_t jit_mod_emitter::get_inputs_num() const { return 2; } -std::set> jit_mod_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_mod_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32, element::f32}}; } @@ -548,7 +548,7 @@ void jit_maximum_emitter::emit_isa(const std::vector &in_vec_idxs, const } } -std::set> jit_maximum_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_maximum_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32, element::f32}, {element::i32, element::i32}}; } @@ -596,7 +596,7 @@ void jit_minimum_emitter::emit_isa(const std::vector &in_vec_idxs, const } } -std::set> jit_minimum_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_minimum_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32, element::f32}, {element::i32, element::i32}}; } @@ -651,7 +651,7 @@ void jit_squared_difference_emitter::emit_isa(const std::vector &in_vec_ } } -std::set> jit_squared_difference_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_squared_difference_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32, element::f32}, {element::i32, element::i32}}; } @@ -664,7 +664,7 @@ jit_power_dynamic_emitter::jit_power_dynamic_emitter(x64::jit_generator *host, x size_t jit_power_dynamic_emitter::get_inputs_num() const { return 2; } -std::set> jit_power_dynamic_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_power_dynamic_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32, element::f32}}; } @@ -779,7 +779,7 @@ jit_equal_emitter::jit_equal_emitter(x64::jit_generator *host, x64::cpu_isa_t ho size_t jit_equal_emitter::get_inputs_num() const { return 2; } -std::set> jit_equal_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_equal_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32, element::f32}}; } @@ -842,7 +842,7 @@ jit_not_equal_emitter::jit_not_equal_emitter(x64::jit_generator *host, x64::cpu_ size_t jit_not_equal_emitter::get_inputs_num() const { return 2; } -std::set> jit_not_equal_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_not_equal_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32, element::f32}}; } @@ -905,7 +905,7 @@ jit_greater_emitter::jit_greater_emitter(x64::jit_generator *host, x64::cpu_isa_ size_t jit_greater_emitter::get_inputs_num() const { return 2; } -std::set> jit_greater_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_greater_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32, element::f32}}; } @@ -969,7 +969,7 @@ jit_greater_equal_emitter::jit_greater_equal_emitter(x64::jit_generator *host, x size_t jit_greater_equal_emitter::get_inputs_num() const { return 2; } -std::set> jit_greater_equal_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_greater_equal_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32, element::f32}}; } @@ -1032,7 +1032,7 @@ jit_less_emitter::jit_less_emitter(x64::jit_generator *host, x64::cpu_isa_t host size_t jit_less_emitter::get_inputs_num() const { return 2; } -std::set> jit_less_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_less_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32, element::f32}}; } @@ -1095,7 +1095,7 @@ jit_less_equal_emitter::jit_less_equal_emitter(x64::jit_generator *host, x64::cp size_t jit_less_equal_emitter::get_inputs_num() const { return 2; } -std::set> jit_less_equal_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_less_equal_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32, element::f32}}; } @@ -1159,7 +1159,7 @@ jit_logical_and_emitter::jit_logical_and_emitter(x64::jit_generator *host, x64:: size_t jit_logical_and_emitter::get_inputs_num() const { return 2; } -std::set> jit_logical_and_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_logical_and_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32, element::f32}}; } @@ -1243,7 +1243,7 @@ jit_logical_or_emitter::jit_logical_or_emitter(x64::jit_generator *host, x64::cp size_t jit_logical_or_emitter::get_inputs_num() const { return 2; } -std::set> jit_logical_or_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_logical_or_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32, element::f32}}; } @@ -1326,7 +1326,7 @@ jit_logical_xor_emitter::jit_logical_xor_emitter(x64::jit_generator *host, x64:: size_t jit_logical_xor_emitter::get_inputs_num() const { return 2; } -std::set> jit_logical_xor_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_logical_xor_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32, element::f32}}; } @@ -1409,7 +1409,7 @@ jit_logical_not_emitter::jit_logical_not_emitter(x64::jit_generator *host, x64:: size_t jit_logical_not_emitter::get_inputs_num() const { return 1; } -std::set> jit_logical_not_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_logical_not_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32}}; } @@ -1483,7 +1483,7 @@ jit_power_static_emitter::jit_power_static_emitter(x64::jit_generator *host, x64 size_t jit_power_static_emitter::get_inputs_num() const { return 1; } -std::set> jit_power_static_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_power_static_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32}}; } @@ -1661,7 +1661,7 @@ jit_prelu_emitter::jit_prelu_emitter(x64::jit_generator *host, x64::cpu_isa_t ho } size_t jit_prelu_emitter::get_inputs_num() const { return 2; } -std::set> jit_prelu_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_prelu_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32, element::f32}}; } @@ -1720,7 +1720,7 @@ jit_sqrt_emitter::jit_sqrt_emitter(x64::jit_generator *host, x64::cpu_isa_t host size_t jit_sqrt_emitter::get_inputs_num() const { return 1; } -std::set> jit_sqrt_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_sqrt_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32}}; } @@ -1751,7 +1751,7 @@ jit_negative_emitter::jit_negative_emitter(x64::jit_generator *host, x64::cpu_is size_t jit_negative_emitter::get_inputs_num() const { return 1; } -std::set> jit_negative_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_negative_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32}}; } @@ -1789,7 +1789,7 @@ jit_erf_emitter::jit_erf_emitter(x64::jit_generator *host, x64::cpu_isa_t host_i size_t jit_erf_emitter::get_inputs_num() const { return 1; } -std::set> jit_erf_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_erf_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32}}; } @@ -1973,7 +1973,7 @@ jit_soft_sign_emitter::jit_soft_sign_emitter(x64::jit_generator *host, x64::cpu_ size_t jit_soft_sign_emitter::get_inputs_num() const { return 1; } -std::set> jit_soft_sign_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_soft_sign_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32}}; } @@ -2181,14 +2181,14 @@ void jit_is_nan_emitter::register_table_entries() { } /// SELECT /// -jit_select_emitter::jit_select_emitter(x64::jit_generator *host, x64::cpu_isa_t host_isa, const std::shared_ptr& node, Precision exec_prc) +jit_select_emitter::jit_select_emitter(x64::jit_generator *host, x64::cpu_isa_t host_isa, const std::shared_ptr& node, Precision exec_prc) : jit_emitter(host, host_isa, exec_prc) {} jit_select_emitter::jit_select_emitter(x64::jit_generator *host, x64::cpu_isa_t host_isa, Precision exec_prc) : jit_emitter(host, host_isa, exec_prc) {} size_t jit_select_emitter::get_inputs_num() const { return 3; } -std::set> jit_select_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_select_emitter::get_supported_precisions(const std::shared_ptr& node) { return {{element::f32, element::f32, element::f32}}; } diff --git a/src/plugins/intel_cpu/src/emitters/x64/jit_eltwise_emitters.hpp b/src/plugins/intel_cpu/src/emitters/x64/jit_eltwise_emitters.hpp index e624b0f95294c0..024179bee5f5e9 100644 --- a/src/plugins/intel_cpu/src/emitters/x64/jit_eltwise_emitters.hpp +++ b/src/plugins/intel_cpu/src/emitters/x64/jit_eltwise_emitters.hpp @@ -16,7 +16,7 @@ class jit_add_emitter : public jit_emitter { jit_add_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -32,7 +32,7 @@ class jit_mul_add_emitter : public jit_emitter { jit_mul_add_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -51,7 +51,7 @@ class jit_subtract_emitter : public jit_emitter { jit_subtract_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -68,7 +68,7 @@ class jit_multiply_emitter : public jit_emitter { jit_multiply_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -86,7 +86,7 @@ class jit_divide_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -104,7 +104,7 @@ class jit_floor_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -121,7 +121,7 @@ class jit_ceiling_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -138,7 +138,7 @@ class jit_floor_mod_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -157,7 +157,7 @@ class jit_mod_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -175,7 +175,7 @@ class jit_maximum_emitter : public jit_emitter { jit_maximum_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -192,7 +192,7 @@ class jit_minimum_emitter : public jit_emitter { jit_minimum_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -211,7 +211,7 @@ class jit_squared_difference_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -229,7 +229,7 @@ class jit_power_dynamic_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -247,7 +247,7 @@ class jit_equal_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -268,7 +268,7 @@ class jit_not_equal_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -289,7 +289,7 @@ class jit_greater_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -310,7 +310,7 @@ class jit_greater_equal_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -331,7 +331,7 @@ class jit_less_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -353,7 +353,7 @@ class jit_less_equal_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -374,7 +374,7 @@ class jit_logical_and_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -395,7 +395,7 @@ class jit_logical_or_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -416,7 +416,7 @@ class jit_logical_xor_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -436,7 +436,7 @@ class jit_logical_not_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -457,7 +457,7 @@ class jit_power_static_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: @@ -482,7 +482,7 @@ class jit_prelu_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -501,7 +501,7 @@ class jit_sqrt_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -516,7 +516,7 @@ class jit_negative_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector& in, const std::vector& out) const override; @@ -534,7 +534,7 @@ class jit_erf_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl( @@ -556,7 +556,7 @@ class jit_soft_sign_emitter : public jit_emitter { InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); private: void emit_impl(const std::vector &in_vec_idxs, const std::vector &out_vec_idxs) const override; @@ -579,7 +579,7 @@ class jit_is_finite_emitter : public jit_emitter { } size_t get_inputs_num() const override { return 1; }; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr) { + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr) { return {{element::f32}}; } @@ -607,7 +607,7 @@ class jit_is_inf_emitter : public jit_emitter { } size_t get_inputs_num() const override { return 1; }; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr) { + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr) { return {{element::f32}}; } @@ -637,7 +637,7 @@ class jit_is_nan_emitter : public jit_emitter { } size_t get_inputs_num() const override { return 1; } - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr) { + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr) { return {{element::f32}}; } @@ -656,11 +656,11 @@ class jit_select_emitter : public jit_emitter { public: jit_select_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); - jit_select_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, + jit_select_emitter(dnnl::impl::cpu::x64::jit_generator *host, dnnl::impl::cpu::x64::cpu_isa_t host_isa, const std::shared_ptr& n, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() const override; - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); size_t aux_vecs_count() const override; private: diff --git a/src/plugins/intel_cpu/src/emitters/x64/jit_emitter.cpp b/src/plugins/intel_cpu/src/emitters/x64/jit_emitter.cpp index 5fbb6e7d381ea8..f9885daa0f6dc0 100644 --- a/src/plugins/intel_cpu/src/emitters/x64/jit_emitter.cpp +++ b/src/plugins/intel_cpu/src/emitters/x64/jit_emitter.cpp @@ -55,7 +55,7 @@ size_t jit_emitter::aux_gprs_count() const { return entry_map_.empty() ? 0 : 1; } -std::set> jit_emitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> jit_emitter::get_supported_precisions(const std::shared_ptr& node) { return {}; } diff --git a/src/plugins/intel_cpu/src/emitters/x64/jit_emitter.hpp b/src/plugins/intel_cpu/src/emitters/x64/jit_emitter.hpp index e7a74f2c065a30..cbc0a61eecd529 100644 --- a/src/plugins/intel_cpu/src/emitters/x64/jit_emitter.hpp +++ b/src/plugins/intel_cpu/src/emitters/x64/jit_emitter.hpp @@ -49,7 +49,7 @@ class jit_emitter : public ov::snippets::Emitter { * Precisions are ordered, the first bigger bitness precision with the same type will be selected. * Empty collection means the emitter supports any input precisions. */ - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); protected: virtual size_t aux_gprs_count() const; diff --git a/src/plugins/intel_cpu/src/emitters/x64/jit_snippets_emitters.cpp b/src/plugins/intel_cpu/src/emitters/x64/jit_snippets_emitters.cpp index 2530098e9d6cbf..f05177d58fbb55 100644 --- a/src/plugins/intel_cpu/src/emitters/x64/jit_snippets_emitters.cpp +++ b/src/plugins/intel_cpu/src/emitters/x64/jit_snippets_emitters.cpp @@ -861,7 +861,7 @@ BrgemmEmitter::BrgemmEmitter(jit_generator* h, cpu_isa_t isa, const ExpressionPt m_load_offset_scratch = brgemm_node->get_offset_scratch(); } -std::set> BrgemmEmitter::get_supported_precisions(const std::shared_ptr& node) { +std::set> BrgemmEmitter::get_supported_precisions(const std::shared_ptr& node) { const auto brgemm = as_type_ptr(node); OPENVINO_ASSERT(brgemm, "BrgemmEmitter::get_supported_precisions() expects BrgemmCPU node"); switch (brgemm->get_type()) { diff --git a/src/plugins/intel_cpu/src/emitters/x64/jit_snippets_emitters.hpp b/src/plugins/intel_cpu/src/emitters/x64/jit_snippets_emitters.hpp index 7019fb14c6ec29..7e91302648ea02 100644 --- a/src/plugins/intel_cpu/src/emitters/x64/jit_snippets_emitters.hpp +++ b/src/plugins/intel_cpu/src/emitters/x64/jit_snippets_emitters.hpp @@ -364,7 +364,7 @@ class BrgemmEmitter : public jit_emitter { const ov::snippets::lowered::ExpressionPtr& expr); size_t get_inputs_num() const override { return m_with_scratch ? 3 : 2; } - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr); size_t aux_gprs_count() const override; private: @@ -427,7 +427,7 @@ class BrgemmCopyBEmitter : public jit_emitter { const ov::snippets::lowered::ExpressionPtr& expr); size_t get_inputs_num() const override {return 1;} - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr) { + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr) { return {{element::i8}, {element::bf16}}; } @@ -466,7 +466,7 @@ class HorizonEmitter : public jit_emitter { const ov::snippets::lowered::ExpressionPtr& expr); size_t get_inputs_num() const override {return 1;} - static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr) { + static std::set> get_supported_precisions(const std::shared_ptr& node = nullptr) { return {{element::f32}}; } diff --git a/src/plugins/intel_cpu/src/extension.cpp b/src/plugins/intel_cpu/src/extension.cpp index 71c84045e12848..9b95454c20ab26 100644 --- a/src/plugins/intel_cpu/src/extension.cpp +++ b/src/plugins/intel_cpu/src/extension.cpp @@ -178,11 +178,11 @@ std::map Extension::getOpSets() { return opsets; } -std::vector Extension::getImplTypes(const std::shared_ptr&) { +std::vector Extension::getImplTypes(const std::shared_ptr&) { return {}; } -InferenceEngine::ILayerImpl::Ptr Extension::getImplementation(const std::shared_ptr& node, const std::string& implType) { +InferenceEngine::ILayerImpl::Ptr Extension::getImplementation(const std::shared_ptr& node, const std::string& implType) { return nullptr; } diff --git a/src/plugins/intel_cpu/src/extension.h b/src/plugins/intel_cpu/src/extension.h index 5a2773fcc259c0..6d36a20b38a598 100644 --- a/src/plugins/intel_cpu/src/extension.h +++ b/src/plugins/intel_cpu/src/extension.h @@ -14,8 +14,8 @@ class Extension : public InferenceEngine::IExtension { void GetVersion(const InferenceEngine::Version*& versionInfo) const noexcept override; void Unload() noexcept override; std::map getOpSets() override; - std::vector getImplTypes(const std::shared_ptr& node) override; - InferenceEngine::ILayerImpl::Ptr getImplementation(const std::shared_ptr& node, const std::string& implType) override; + std::vector getImplTypes(const std::shared_ptr& node) override; + InferenceEngine::ILayerImpl::Ptr getImplementation(const std::shared_ptr& node, const std::string& implType) override; }; } // namespace intel_cpu diff --git a/src/plugins/intel_cpu/src/extension_mngr.cpp b/src/plugins/intel_cpu/src/extension_mngr.cpp index c14e1499830e97..d842f227fb5590 100644 --- a/src/plugins/intel_cpu/src/extension_mngr.cpp +++ b/src/plugins/intel_cpu/src/extension_mngr.cpp @@ -17,7 +17,7 @@ void ExtensionManager::AddExtension(const IExtensionPtr& extension) { _extensions.push_back(extension); } -InferenceEngine::ILayerImpl::Ptr ExtensionManager::CreateImplementation(const std::shared_ptr& op) { +InferenceEngine::ILayerImpl::Ptr ExtensionManager::CreateImplementation(const std::shared_ptr& op) { if (!op) OPENVINO_THROW("Cannot get nGraph operation!"); for (const auto& ext : _extensions) { diff --git a/src/plugins/intel_cpu/src/extension_mngr.h b/src/plugins/intel_cpu/src/extension_mngr.h index f8ffdd0165267f..67505861bcdd75 100644 --- a/src/plugins/intel_cpu/src/extension_mngr.h +++ b/src/plugins/intel_cpu/src/extension_mngr.h @@ -16,7 +16,7 @@ class ExtensionManager { public: using Ptr = std::shared_ptr; ExtensionManager() = default; - InferenceEngine::ILayerImpl::Ptr CreateImplementation(const std::shared_ptr& op); + InferenceEngine::ILayerImpl::Ptr CreateImplementation(const std::shared_ptr& op); void AddExtension(const InferenceEngine::IExtensionPtr& extension); const std::vector & Extensions() const; diff --git a/src/plugins/intel_cpu/src/graph.cpp b/src/plugins/intel_cpu/src/graph.cpp index 6fba670ae65842..f957f1b27e8529 100644 --- a/src/plugins/intel_cpu/src/graph.cpp +++ b/src/plugins/intel_cpu/src/graph.cpp @@ -669,7 +669,7 @@ void Graph::AllocateWithReuse() { MemorySolver staticMemSolver(definedBoxes); size_t total_size = static_cast(staticMemSolver.solve()) * alignment; - memWorkspace = std::make_shared(getEngine(), DnnlBlockedMemoryDesc(InferenceEngine::Precision::I8, Shape(InferenceEngine::SizeVector{total_size}))); + memWorkspace = std::make_shared(getEngine(), DnnlBlockedMemoryDesc(InferenceEngine::Precision::I8, Shape(VectorDims{total_size}))); if (edge_clusters.empty()) return; diff --git a/src/plugins/intel_cpu/src/graph_dumper.cpp b/src/plugins/intel_cpu/src/graph_dumper.cpp index cbe34697bd238b..4d2d041f4d4f4a 100644 --- a/src/plugins/intel_cpu/src/graph_dumper.cpp +++ b/src/plugins/intel_cpu/src/graph_dumper.cpp @@ -113,16 +113,16 @@ std::map extract_node_metadata(const NodePtr &node) { } // namespace -std::shared_ptr dump_graph_as_ie_ngraph_net(const Graph &graph) { - std::map > node2layer; +std::shared_ptr dump_graph_as_ie_ngraph_net(const Graph &graph) { + std::map > node2layer; - ngraph::ResultVector results; - ngraph::ParameterVector params; - ngraph::NodeVector to_hold; + ov::ResultVector results; + ov::ParameterVector params; + ov::NodeVector to_hold; auto get_inputs = [&] (const NodePtr & node) { auto pr_edges = node->getParentEdges(); - ngraph::OutputVector inputs(pr_edges.size()); + ov::OutputVector inputs(pr_edges.size()); for (size_t i = 0; i < pr_edges.size(); i++) { auto edge = node->getParentEdgeAt(i); @@ -162,7 +162,7 @@ std::shared_ptr dump_graph_as_ie_ngraph_net(const Graph &graph } auto meta_data = extract_node_metadata(node); - std::shared_ptr return_node; + std::shared_ptr return_node; if (is_input) { auto& desc = node->getChildEdgeAt(0)->getMemory().getDesc(); auto param = std::make_shared(details::convertPrecision(desc.getPrecision()), desc.getShape().toPartialShape()); @@ -192,7 +192,7 @@ std::shared_ptr dump_graph_as_ie_ngraph_net(const Graph &graph return return_node; }; - ngraph::NodeVector nodes; + ov::NodeVector nodes; nodes.reserve(graph.graphNodes.size()); for (auto &node : graph.graphNodes) { // important: graph.graphNodes are in topological order nodes.emplace_back(create_ngraph_node(node)); @@ -204,7 +204,7 @@ std::shared_ptr dump_graph_as_ie_ngraph_net(const Graph &graph holder->add_control_dependency(node); } - return std::make_shared(results, params, graph._name); + return std::make_shared(results, params, graph._name); } #ifdef CPU_DEBUG_CAPS @@ -227,7 +227,7 @@ void serializeToXML(const Graph &graph, const std::string& path) { return; std::string binPath; - ngraph::pass::Manager manager; + ov::pass::Manager manager; manager.register_pass(path, binPath, ov::pass::Serialize::Version::IR_V10); diff --git a/src/plugins/intel_cpu/src/graph_dumper.h b/src/plugins/intel_cpu/src/graph_dumper.h index 6b5a6cef7cbe00..1c561195d20428 100644 --- a/src/plugins/intel_cpu/src/graph_dumper.h +++ b/src/plugins/intel_cpu/src/graph_dumper.h @@ -13,7 +13,7 @@ namespace ov { namespace intel_cpu { -std::shared_ptr dump_graph_as_ie_ngraph_net(const Graph &graph); +std::shared_ptr dump_graph_as_ie_ngraph_net(const Graph &graph); #ifdef CPU_DEBUG_CAPS void serialize(const Graph &graph); void summary_perf(const Graph &graph); diff --git a/src/plugins/intel_cpu/src/graph_optimizer.cpp b/src/plugins/intel_cpu/src/graph_optimizer.cpp index ed37f4f6d099ce..881c785e8581ad 100644 --- a/src/plugins/intel_cpu/src/graph_optimizer.cpp +++ b/src/plugins/intel_cpu/src/graph_optimizer.cpp @@ -556,7 +556,7 @@ void GraphOptimizer::FuseConvolutionMatMulDeconvAndBias(Graph &graph) { // Bias -> Reshape -> Conv/Deconv/FC const VectorDims flattenShape = {biasOutputShape.getElementsCount()}; // Construct Ngraph Reshape node and CPU Reshape node. - auto reshapeConstInput = std::make_shared(ov::element::i32, ngraph::Shape{1}, flattenShape); + auto reshapeConstInput = std::make_shared(ov::element::i32, ov::Shape{1}, flattenShape); auto reshapeDummyInput = std::make_shared( details::convertPrecision(biasNode->getOriginalOutputPrecisionAtPort(0)), biasOutputShape.toPartialShape()); @@ -2583,7 +2583,7 @@ void GraphOptimizer::reshapeRnnSeq(Graph &graph) { auto edge = childrenEdges[j]; auto childNode = edge->getChild(); - const auto secondInput = std::make_shared(ov::element::i32, ngraph::Shape{1}, std::vector{1}); + const auto secondInput = std::make_shared(ov::element::i32, ov::Shape{1}, std::vector{1}); const auto unsqueeze = std::make_shared( std::make_shared(details::convertPrecision(parentNode->getOriginalOutputPrecisionAtPort(0)), parentNode->getOutputShapeAtPort(0).toPartialShape()), secondInput); diff --git a/src/plugins/intel_cpu/src/memory_desc/cpu_blocked_memory_desc.cpp b/src/plugins/intel_cpu/src/memory_desc/cpu_blocked_memory_desc.cpp index 266b3a2a6840ab..6493ece5b3aa61 100644 --- a/src/plugins/intel_cpu/src/memory_desc/cpu_blocked_memory_desc.cpp +++ b/src/plugins/intel_cpu/src/memory_desc/cpu_blocked_memory_desc.cpp @@ -143,14 +143,14 @@ size_t CpuBlockedMemoryDesc::getMaxMemSize() const { return maxDimsDesc->getCurrentMemSize(); } -size_t CpuBlockedMemoryDesc::getOffset(const InferenceEngine::SizeVector& v) const { - InferenceEngine::SizeVector off_v = v; +size_t CpuBlockedMemoryDesc::getOffset(const VectorDims& v) const { + VectorDims off_v = v; size_t n_blocked_dims = order.size(); if (blockedDims.size() != n_blocked_dims || strides.size() != n_blocked_dims) { OPENVINO_THROW("Cannot calculate offset. Incorrect primitive descriptor!"); } - InferenceEngine::SizeVector blockedShift(n_blocked_dims); + VectorDims blockedShift(n_blocked_dims); for (size_t i = 1; i <= n_blocked_dims; i++) { blockedShift[n_blocked_dims - i] = off_v[order[n_blocked_dims - i]] % blockedDims[n_blocked_dims - i]; off_v[order[n_blocked_dims - i]] /= blockedDims[n_blocked_dims - i]; @@ -167,7 +167,7 @@ size_t CpuBlockedMemoryDesc::getElementOffset(size_t elemNumber) const { // TODO [DS]: rewrite to support dynamic shapes auto& dims = shape.getStaticDims(); size_t n_dims = dims.size(); - InferenceEngine::SizeVector pos(n_dims); + VectorDims pos(n_dims); for (size_t rd = 1; rd <= n_dims; ++rd) { const size_t d = n_dims - rd; const size_t cur_dim = dims[d]; diff --git a/src/plugins/intel_cpu/src/memory_desc/cpu_blocked_memory_desc.h b/src/plugins/intel_cpu/src/memory_desc/cpu_blocked_memory_desc.h index 8f0d0033b8a82a..27b8346d498653 100644 --- a/src/plugins/intel_cpu/src/memory_desc/cpu_blocked_memory_desc.h +++ b/src/plugins/intel_cpu/src/memory_desc/cpu_blocked_memory_desc.h @@ -84,7 +84,7 @@ class CpuBlockedMemoryDesc : public BlockedMemoryDesc { size_t getElementOffset(size_t elemNumber) const override; bool canComputeMemSizeZeroDims() const override; size_t getCurrentMemSizeImp() const override; - size_t getOffset(const InferenceEngine::SizeVector& v) const; + size_t getOffset(const VectorDims& v) const; bool isPlainFormat() const; bool isBlockedCFormat(size_t blk_size) const; bool isTailCFormat() const; diff --git a/src/plugins/intel_cpu/src/node.cpp b/src/plugins/intel_cpu/src/node.cpp index 149a7ca7a87147..cff25ce9af8a85 100644 --- a/src/plugins/intel_cpu/src/node.cpp +++ b/src/plugins/intel_cpu/src/node.cpp @@ -79,7 +79,7 @@ Node::NodesFactory & Node::factory() { return factoryInstance; } -Node::Node(const std::shared_ptr& op, +Node::Node(const std::shared_ptr& op, const GraphContext::CPtr ctx, const ShapeInferFactory& shapeInferFactory) : selectedPrimitiveDescriptorIndex(-1), @@ -1310,7 +1310,7 @@ InferenceEngine::Precision Node::getRuntimePrecision() const { return runtimePrecision; } -Node* Node::NodesFactory::create(const std::shared_ptr& op, const GraphContext::CPtr context) { +Node* Node::NodesFactory::create(const std::shared_ptr& op, const GraphContext::CPtr context) { // getExceptionDescWithoutStatus removes redundant information from the exception message. For instance, the NotImplemented // exception is generated in the form: full_path_to_src_file:line_number [ NOT_IMPLEMENTED ] reason. // An example for gather node: diff --git a/src/plugins/intel_cpu/src/node.h b/src/plugins/intel_cpu/src/node.h index 72c74e6429a7be..37edffe25805ab 100644 --- a/src/plugins/intel_cpu/src/node.h +++ b/src/plugins/intel_cpu/src/node.h @@ -585,7 +585,7 @@ class Node { std::string originalLayers; // contains names of the original layers separated by comma - Node(const std::shared_ptr& op, const GraphContext::CPtr ctx, const ShapeInferFactory& shapeInferFactory); + Node(const std::shared_ptr& op, const GraphContext::CPtr ctx, const ShapeInferFactory& shapeInferFactory); Node(const std::string& type, const std::string& name, const GraphContext::CPtr ctx); int selectedPrimitiveDescriptorIndex = -1; @@ -631,7 +631,7 @@ class Node { virtual std::vector getAvailableFormatsForDims(const Shape& dims) const; - dnnl::memory::format_tag getWeightsFormatTagByDims(const InferenceEngine::SizeVector& dims) const; + dnnl::memory::format_tag getWeightsFormatTagByDims(const VectorDims& dims) const; /** * @brief Auxiliary function to get node input precisions @@ -742,17 +742,17 @@ constexpr uint64_t PortMask(T... rest) { } class Node::NodesFactory : public openvino::cc::Factory& op, + Node*(const std::shared_ptr& op, const GraphContext::CPtr)> { public: NodesFactory(); - Node* create(const std::shared_ptr& op, const GraphContext::CPtr context); + Node* create(const std::shared_ptr& op, const GraphContext::CPtr context); }; template struct NodeImpl : public NodeType { - NodeImpl(const std::shared_ptr& op, const GraphContext::CPtr context) + NodeImpl(const std::shared_ptr& op, const GraphContext::CPtr context) : NodeType(op, context) { NodeType::perfCounters().template buildClassCounters(NameFromType(NodeType::getType())); } diff --git a/src/plugins/intel_cpu/src/nodes/adaptive_pooling.cpp b/src/plugins/intel_cpu/src/nodes/adaptive_pooling.cpp index 5fd3cc7e14d16c..1258d354630a88 100644 --- a/src/plugins/intel_cpu/src/nodes/adaptive_pooling.cpp +++ b/src/plugins/intel_cpu/src/nodes/adaptive_pooling.cpp @@ -24,7 +24,7 @@ namespace ov { namespace intel_cpu { namespace node { -bool AdaptivePooling::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool AdaptivePooling::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { if (one_of(op->get_type_info(), ngraph::op::v8::AdaptiveAvgPool::get_type_info_static())) { auto adaPool = std::dynamic_pointer_cast(op); @@ -48,7 +48,7 @@ bool AdaptivePooling::isSupportedOperation(const std::shared_ptr& op, const GraphContext::CPtr context) +AdaptivePooling::AdaptivePooling(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, AdaptivePoolingShapeInferFactory(op)) { std::string errorMessage; if (isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/adaptive_pooling.h b/src/plugins/intel_cpu/src/nodes/adaptive_pooling.h index cc1d65bfbbd515..0d8710fc054846 100644 --- a/src/plugins/intel_cpu/src/nodes/adaptive_pooling.h +++ b/src/plugins/intel_cpu/src/nodes/adaptive_pooling.h @@ -16,14 +16,14 @@ namespace node { class AdaptivePooling : public Node { public: - AdaptivePooling(const std::shared_ptr& op, const GraphContext::CPtr context); + AdaptivePooling(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; void execute(dnnl::stream strm) override; bool created() const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: int spatialDimsCount; diff --git a/src/plugins/intel_cpu/src/nodes/batch_to_space.cpp b/src/plugins/intel_cpu/src/nodes/batch_to_space.cpp index 69459ea7b40a65..cc49ed8f11691a 100644 --- a/src/plugins/intel_cpu/src/nodes/batch_to_space.cpp +++ b/src/plugins/intel_cpu/src/nodes/batch_to_space.cpp @@ -17,7 +17,7 @@ namespace ov { namespace intel_cpu { namespace node { -bool BatchToSpace::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool BatchToSpace::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const auto batchToSpace = std::dynamic_pointer_cast(op); if (!batchToSpace) { @@ -30,7 +30,7 @@ bool BatchToSpace::isSupportedOperation(const std::shared_ptr& op, const GraphContext::CPtr context) +BatchToSpace::BatchToSpace(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, PortMask(1, 2, 3))) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/batch_to_space.h b/src/plugins/intel_cpu/src/nodes/batch_to_space.h index 430893f4689060..985a1df3b7d9fe 100644 --- a/src/plugins/intel_cpu/src/nodes/batch_to_space.h +++ b/src/plugins/intel_cpu/src/nodes/batch_to_space.h @@ -16,7 +16,7 @@ namespace node { class BatchToSpace : public Node { public: - BatchToSpace(const std::shared_ptr& op, const GraphContext::CPtr context); + BatchToSpace(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -27,7 +27,7 @@ class BatchToSpace : public Node { bool needShapeInfer() const override {return true;}; void executeDynamicImpl(dnnl::stream strm) override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: template diff --git a/src/plugins/intel_cpu/src/nodes/bin_conv.cpp b/src/plugins/intel_cpu/src/nodes/bin_conv.cpp index ce847a82793402..731dd6f9996084 100644 --- a/src/plugins/intel_cpu/src/nodes/bin_conv.cpp +++ b/src/plugins/intel_cpu/src/nodes/bin_conv.cpp @@ -878,7 +878,7 @@ struct jit_uni_bin_conv_kernel_f32 : public jit_uni_bin_conv_kernel, public jit_ } }; #endif -bool BinaryConvolution::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool BinaryConvolution::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { if (isDynamicNgraphNode(op)) { errorMessage = "Doesn't support op with dynamic shapes"; @@ -891,7 +891,7 @@ bool BinaryConvolution::isSupportedOperation(const std::shared_ptrget_mode() != ngraph::op::v1::BinaryConvolution::BinaryConvolutionMode::XNOR_POPCOUNT) { - errorMessage = "Doesn't support mode: " + ngraph::as_string(binConv->get_mode()); + errorMessage = "Doesn't support mode: " + ov::as_string(binConv->get_mode()); return false; } } catch (...) { @@ -900,7 +900,7 @@ bool BinaryConvolution::isSupportedOperation(const std::shared_ptr& op, const GraphContext::CPtr context) +BinaryConvolution::BinaryConvolution(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/bin_conv.h b/src/plugins/intel_cpu/src/nodes/bin_conv.h index e60b9a320f1bc3..5c99cc08df2006 100644 --- a/src/plugins/intel_cpu/src/nodes/bin_conv.h +++ b/src/plugins/intel_cpu/src/nodes/bin_conv.h @@ -77,7 +77,7 @@ struct jit_uni_bin_conv_kernel { class BinaryConvolution : public Node { public: - BinaryConvolution(const std::shared_ptr& op, const GraphContext::CPtr context); + BinaryConvolution(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override; void createPrimitive() override; @@ -90,7 +90,7 @@ class BinaryConvolution : public Node { void setPostOps(dnnl::primitive_attr &attr); bool canFuse(const NodePtr& node) const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; impl_desc_type getImplType() { return implType; } diff --git a/src/plugins/intel_cpu/src/nodes/bucketize.cpp b/src/plugins/intel_cpu/src/nodes/bucketize.cpp index eef4eb9b8c0674..5f537c955f6b3c 100644 --- a/src/plugins/intel_cpu/src/nodes/bucketize.cpp +++ b/src/plugins/intel_cpu/src/nodes/bucketize.cpp @@ -17,7 +17,7 @@ namespace ov { namespace intel_cpu { namespace node { -bool Bucketize::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool Bucketize::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const auto bucketsize = std::dynamic_pointer_cast(op); if (!bucketsize) { @@ -30,7 +30,7 @@ bool Bucketize::isSupportedOperation(const std::shared_ptr& return true; } -Bucketize::Bucketize(const std::shared_ptr& op, const GraphContext::CPtr context) +Bucketize::Bucketize(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, PassThroughShapeInferFactory()) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/bucketize.h b/src/plugins/intel_cpu/src/nodes/bucketize.h index af72309abd1e7d..70ad495adfdc1c 100644 --- a/src/plugins/intel_cpu/src/nodes/bucketize.h +++ b/src/plugins/intel_cpu/src/nodes/bucketize.h @@ -13,7 +13,7 @@ namespace node { class Bucketize : public Node { public: - Bucketize(const std::shared_ptr& op, const GraphContext::CPtr context); + Bucketize(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -26,7 +26,7 @@ class Bucketize : public Node { void prepareParams() override; bool isExecutable() const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: template diff --git a/src/plugins/intel_cpu/src/nodes/color_convert.cpp b/src/plugins/intel_cpu/src/nodes/color_convert.cpp index d3632119d8ed15..474dd06008b8d9 100644 --- a/src/plugins/intel_cpu/src/nodes/color_convert.cpp +++ b/src/plugins/intel_cpu/src/nodes/color_convert.cpp @@ -24,7 +24,7 @@ namespace intel_cpu { namespace node { namespace { -std::tuple getAlgorithmFor(const std::shared_ptr& op) { +std::tuple getAlgorithmFor(const std::shared_ptr& op) { if (ov::is_type(op)) return std::make_tuple(Algorithm::ColorConvertNV12toRGB, std::string()); if (ov::is_type(op)) @@ -327,7 +327,7 @@ void RefConverter::convert(const T* y, size_t width, size_t stride_y, size_t stride_uv) { - InferenceEngine::parallel_for2d(batch_size, height, [&](int batch, int h) { + ov::parallel_for2d(batch_size, height, [&](int batch, int h) { T* out = dst + batch * width * height * 3; auto y_ptr = y + batch * stride_y; auto uv_ptr = uv + batch * stride_uv; @@ -569,7 +569,7 @@ class SinglePlaneConvert : public Converter { const size_t stride_y = height * width * 3 / 2; const size_t stride_uv = height * width * 3 / 2; - InferenceEngine::parallel_for2d(batch_size, height, [&](int batch, int h) { + ov::parallel_for2d(batch_size, height, [&](int batch, int h) { typename jit_uni_converter::Params args; args.y = y + batch * stride_y + h * width; args.u = args.v = uv + batch * stride_uv + (h / 2) * width; @@ -604,7 +604,7 @@ class TwoPlaneConvert : public Converter { const size_t stride_y = height * width; const size_t stride_uv = height * width / 2; - InferenceEngine::parallel_for2d(batch_size, height, [&](int batch, int h) { + ov::parallel_for2d(batch_size, height, [&](int batch, int h) { typename jit_uni_converter::Params args; args.y = y + batch * stride_y + h * width; args.u = args.v = uv + batch * stride_uv + (h / 2) * width; @@ -679,7 +679,7 @@ void RefConverter::convert(const T* y, size_t width, size_t stride_y, size_t stride_uv) { - InferenceEngine::parallel_for2d(batch_size, height, [&](int batch, int h) { + ov::parallel_for2d(batch_size, height, [&](int batch, int h) { T* out = dst + batch * width * height * 3; auto y_ptr = y + batch * stride_y; auto u_ptr = u + batch * stride_uv; @@ -920,7 +920,7 @@ class SinglePlaneConvert : public Converter { const size_t stride_y = height * width * 3 / 2; const size_t stride_uv = height * width * 3 / 2; - InferenceEngine::parallel_for2d(batch_size, height, [&](int batch, int h) { + ov::parallel_for2d(batch_size, height, [&](int batch, int h) { typename jit_uni_converter::Params args; args.y = y + batch * stride_y + h * width; args.u = u + batch * stride_uv + (h / 2) * (width / 2); @@ -957,7 +957,7 @@ class ThreePlaneConvert : public Converter { const size_t stride_y = height * width; const size_t stride_uv = height * width / 4; - InferenceEngine::parallel_for2d(batch_size, height, [&](int batch, int h) { + ov::parallel_for2d(batch_size, height, [&](int batch, int h) { typename jit_uni_converter::Params args; args.y = y + batch * stride_y + h * width; args.u = u + batch * stride_uv + (h / 2) * (width / 2); @@ -999,13 +999,13 @@ const VectorDims & ColorConvert::Converter::inputDims(size_t idx) const { return _node->getParentEdgesAtPort(idx)[0]->getMemory().getStaticDims(); } -bool ColorConvert::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool ColorConvert::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { Algorithm alg; std::tie(alg, errorMessage) = getAlgorithmFor(op); return alg != Algorithm::Default; } -ColorConvert::ColorConvert(const std::shared_ptr& op, const GraphContext::CPtr context) +ColorConvert::ColorConvert(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, ColorConvertShapeInferFactory(op)) { std::string errorMessage; std::tie(algorithm, errorMessage) = getAlgorithmFor(op); diff --git a/src/plugins/intel_cpu/src/nodes/color_convert.h b/src/plugins/intel_cpu/src/nodes/color_convert.h index 7b13338da61d1f..be26dc2e4cae5c 100644 --- a/src/plugins/intel_cpu/src/nodes/color_convert.h +++ b/src/plugins/intel_cpu/src/nodes/color_convert.h @@ -16,7 +16,7 @@ namespace node { class ColorConvert : public Node { public: - ColorConvert(const std::shared_ptr& op, const GraphContext::CPtr context); + ColorConvert(const std::shared_ptr& op, const GraphContext::CPtr context); class Converter; public: @@ -28,7 +28,7 @@ class ColorConvert : public Node { bool needPrepareParams() const override; void executeDynamicImpl(dnnl::stream strm) override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: void initSupportedNV12Impls(); diff --git a/src/plugins/intel_cpu/src/nodes/common/permute_kernel.h b/src/plugins/intel_cpu/src/nodes/common/permute_kernel.h index 52e136338b5b7f..323bd733afc057 100644 --- a/src/plugins/intel_cpu/src/nodes/common/permute_kernel.h +++ b/src/plugins/intel_cpu/src/nodes/common/permute_kernel.h @@ -12,11 +12,11 @@ namespace ov { namespace intel_cpu { struct PermuteParams { - InferenceEngine::SizeVector src_block_dims; - InferenceEngine::SizeVector dst_block_dims; - InferenceEngine::SizeVector src_block_order; - InferenceEngine::SizeVector dst_block_order; - InferenceEngine::SizeVector order; + VectorDims src_block_dims; + VectorDims dst_block_dims; + VectorDims src_block_order; + VectorDims dst_block_order; + VectorDims order; size_t data_size; size_t hash() const; @@ -25,9 +25,9 @@ struct PermuteParams { struct jit_permute_config_params { uint32_t ndims; - InferenceEngine::SizeVector dst_block_dims; - InferenceEngine::SizeVector src_strides; - InferenceEngine::SizeVector dst_strides; + VectorDims dst_block_dims; + VectorDims src_strides; + VectorDims dst_strides; int n; int data_size; diff --git a/src/plugins/intel_cpu/src/nodes/common/softmax.h b/src/plugins/intel_cpu/src/nodes/common/softmax.h index 83797247413c2b..85697ccbcab152 100644 --- a/src/plugins/intel_cpu/src/nodes/common/softmax.h +++ b/src/plugins/intel_cpu/src/nodes/common/softmax.h @@ -17,7 +17,7 @@ struct jit_uni_softmax_kernel; static inline void softmax_many_batches(const float *src_data, float *dst_data, int B, int C, int H, int W) { - InferenceEngine::parallel_for(B * H * W, [&](size_t i) { + ov::parallel_for(B * H * W, [&](size_t i) { const float *psrc = src_data + (i / (H * W)) * C * H * W - (i / (H * W)) * H * W; float *pdst = dst_data + (i / (H * W)) * C * H * W - (i / (H * W)) * H * W; diff --git a/src/plugins/intel_cpu/src/nodes/concat.cpp b/src/plugins/intel_cpu/src/nodes/concat.cpp index 8332b653ec5e10..8bc2eced0996a3 100644 --- a/src/plugins/intel_cpu/src/nodes/concat.cpp +++ b/src/plugins/intel_cpu/src/nodes/concat.cpp @@ -37,9 +37,9 @@ bool Concat::isExecutable() const { return !isInPlace() && !hasEmptyOutputTensors(); } -bool Concat::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool Concat::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { - const auto concatOp = ngraph::as_type_ptr(op); + const auto concatOp = ov::as_type_ptr(op); if (!concatOp) { errorMessage = "Node is not an instance of the Concat operation."; return false; @@ -50,7 +50,7 @@ bool Concat::isSupportedOperation(const std::shared_ptr& op, return true; } -Concat::Concat(const std::shared_ptr& op, const GraphContext::CPtr context) +Concat::Concat(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { @@ -58,7 +58,7 @@ Concat::Concat(const std::shared_ptr& op, const GraphContext::CPtr } const auto inRank = getInputShapeAtPort(0).getRank(); - auto concatOp = ngraph::as_type_ptr(op); + auto concatOp = ov::as_type_ptr(op); auto axis = concatOp->get_axis(); if (axis < 0) { axis += inRank; diff --git a/src/plugins/intel_cpu/src/nodes/concat.h b/src/plugins/intel_cpu/src/nodes/concat.h index e9a4c9e764a7b3..5c34396e23197f 100644 --- a/src/plugins/intel_cpu/src/nodes/concat.h +++ b/src/plugins/intel_cpu/src/nodes/concat.h @@ -16,9 +16,9 @@ namespace node { class Concat : public Node { public: - Concat(const std::shared_ptr& op, const GraphContext::CPtr context); + Concat(const std::shared_ptr& op, const GraphContext::CPtr context); - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; void initOptimalPrimitiveDescriptor() override; @@ -40,7 +40,7 @@ class Concat : public Node { bool canBeInPlace = false; bool canOptimizeNspc = false; void execRef(); - size_t inverseOrder(const InferenceEngine::SizeVector& order, size_t axis); + size_t inverseOrder(const VectorDims& order, size_t axis); void execNspcSpecCase(); std::vector inputStrides; std::vector nelemToCopy; // byte moved in each iter diff --git a/src/plugins/intel_cpu/src/nodes/conv.cpp b/src/plugins/intel_cpu/src/nodes/conv.cpp index 806014beebab77..dd7515e79588bc 100644 --- a/src/plugins/intel_cpu/src/nodes/conv.cpp +++ b/src/plugins/intel_cpu/src/nodes/conv.cpp @@ -215,9 +215,9 @@ class Convolution::FusedSubgraph { std::vector> outputs; }; -bool Convolution::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool Convolution::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { - if (!ngraph::is_type(op) && !ngraph::is_type(op)) { + if (!ov::is_type(op) && !ov::is_type(op)) { errorMessage = "Only opset1 Convolution and GroupConvolution operations are supported"; return false; } @@ -237,7 +237,7 @@ bool Convolution::isSupportedOperation(const std::shared_ptr return true; } -Convolution::Convolution(const std::shared_ptr& op, const GraphContext::CPtr context) +Convolution::Convolution(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)), withBiases(false), withSum(false), withDWConv(false), isGrouped(false), dw_conv_oc(0), dw_conv_ih(0), dw_conv_iw(0), dw_conv_in_dt(memory::data_type::undef), groupNum(1lu), IC(1), groupIC(1), groupOC(1), eltwisePrecision(Precision::FP32) { @@ -246,8 +246,8 @@ Convolution::Convolution(const std::shared_ptr& op, const GraphCon OPENVINO_THROW_NOT_IMPLEMENTED(errorMessage); } - auto convolutionOp = ngraph::as_type_ptr(op); - auto groupConvolutionOp = ngraph::as_type_ptr(op); + auto convolutionOp = ov::as_type_ptr(op); + auto groupConvolutionOp = ov::as_type_ptr(op); if (convolutionOp) { algorithm = Algorithm::ConvolutionCommon; diff --git a/src/plugins/intel_cpu/src/nodes/conv.h b/src/plugins/intel_cpu/src/nodes/conv.h index 301fca3862b146..0d4c53792b8d32 100644 --- a/src/plugins/intel_cpu/src/nodes/conv.h +++ b/src/plugins/intel_cpu/src/nodes/conv.h @@ -19,9 +19,9 @@ class Eltwise; class Convolution : public Node { public: - Convolution(const std::shared_ptr& op, const GraphContext::CPtr context); + Convolution(const std::shared_ptr& op, const GraphContext::CPtr context); - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; void getSupportedDescriptors() override; void createDescriptor(const std::vector& inputDesc, const std::vector& outputDesc) override; @@ -55,7 +55,7 @@ class Convolution : public Node { std::vector inputZeroPoints; void initializeInputZeroPoints(const uint8_t* inputZpData, const size_t inputZpSize); - const InferenceEngine::SizeVector &getWeightDims() { return weightDims; } + const VectorDims &getWeightDims() { return weightDims; } const std::vector &getStride() { return stride; } const std::vector &getDilation() { return dilation; } const std::vector &getPaddingL() { return paddingL; } @@ -141,7 +141,7 @@ class Convolution : public Node { std::vector dilation; std::vector paddingL; std::vector paddingR; - InferenceEngine::SizeVector weightDims; + VectorDims weightDims; std::unordered_map convPostOpsArgs[2]; size_t dw_conv_oc; diff --git a/src/plugins/intel_cpu/src/nodes/convert.cpp b/src/plugins/intel_cpu/src/nodes/convert.cpp index e8633cfdfcc9f4..291f2ec6849e42 100644 --- a/src/plugins/intel_cpu/src/nodes/convert.cpp +++ b/src/plugins/intel_cpu/src/nodes/convert.cpp @@ -17,7 +17,7 @@ namespace ov { namespace intel_cpu { namespace node { -bool Convert::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool Convert::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const auto convert = std::dynamic_pointer_cast(op); if (!convert) { @@ -30,7 +30,7 @@ bool Convert::isSupportedOperation(const std::shared_ptr& op return true; } -Convert::Convert(const std::shared_ptr& op, const GraphContext::CPtr context) +Convert::Convert(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, PassThroughShapeInferFactory()) { std::string errorMessage; if (isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/convert.h b/src/plugins/intel_cpu/src/nodes/convert.h index 3fd65ebb20a5d6..afde5f2d3ad0c3 100644 --- a/src/plugins/intel_cpu/src/nodes/convert.h +++ b/src/plugins/intel_cpu/src/nodes/convert.h @@ -16,7 +16,7 @@ namespace node { class Convert : public Node { public: - Convert(const std::shared_ptr& op, const GraphContext::CPtr context); + Convert(const std::shared_ptr& op, const GraphContext::CPtr context); Convert(const Shape &shape, const InferenceEngine::Precision &inPrc, const InferenceEngine::Precision &outPrc, const std::string &nodeName, const GraphContext::CPtr context); @@ -44,7 +44,7 @@ class Convert : public Node { bool needPrepareParams() const override { return inputShapesModified(); } - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; static bool isSupportedDesc(const MemoryDesc &desc); diff --git a/src/plugins/intel_cpu/src/nodes/ctc_greedy_decoder.cpp b/src/plugins/intel_cpu/src/nodes/ctc_greedy_decoder.cpp index d3e868a894a270..42ee6ff87d8e9a 100644 --- a/src/plugins/intel_cpu/src/nodes/ctc_greedy_decoder.cpp +++ b/src/plugins/intel_cpu/src/nodes/ctc_greedy_decoder.cpp @@ -15,9 +15,9 @@ namespace ov { namespace intel_cpu { namespace node { -bool CTCGreedyDecoder::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool CTCGreedyDecoder::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { - const auto greedyDecOp = ngraph::as_type_ptr(op); + const auto greedyDecOp = ov::as_type_ptr(op); if (!greedyDecOp) { errorMessage = "Node is not an instance of the CTCGreedyDecoder operation from operation set v0."; return false; @@ -28,7 +28,7 @@ bool CTCGreedyDecoder::isSupportedOperation(const std::shared_ptr& op, const GraphContext::CPtr context) +CTCGreedyDecoder::CTCGreedyDecoder(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { @@ -47,7 +47,7 @@ CTCGreedyDecoder::CTCGreedyDecoder(const std::shared_ptr& op, cons if (!dimsEqualWeak(dataDims[0], seqDims[0]) || !dimsEqualWeak(dataDims[1], seqDims[1])) OPENVINO_THROW(errorPrefix, "has invalid input shapes."); - auto greedyDecOp = ngraph::as_type_ptr(op); + auto greedyDecOp = ov::as_type_ptr(op); mergeRepeated = greedyDecOp->get_ctc_merge_repeated(); } diff --git a/src/plugins/intel_cpu/src/nodes/ctc_greedy_decoder.h b/src/plugins/intel_cpu/src/nodes/ctc_greedy_decoder.h index 4413f96cf8a47b..b83d8bb198c10c 100644 --- a/src/plugins/intel_cpu/src/nodes/ctc_greedy_decoder.h +++ b/src/plugins/intel_cpu/src/nodes/ctc_greedy_decoder.h @@ -13,7 +13,7 @@ namespace node { class CTCGreedyDecoder : public Node { public: - CTCGreedyDecoder(const std::shared_ptr& op, const GraphContext::CPtr context); + CTCGreedyDecoder(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -22,7 +22,7 @@ class CTCGreedyDecoder : public Node { void executeDynamicImpl(dnnl::stream strm) override; bool needPrepareParams() const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: const size_t DATA_INDEX = 0lu; const size_t SEQUENCE_LENGTH_INDEX = 1lu; diff --git a/src/plugins/intel_cpu/src/nodes/ctc_greedy_decoder_seq_len.cpp b/src/plugins/intel_cpu/src/nodes/ctc_greedy_decoder_seq_len.cpp index b8b197afdfaa92..bdf28edc61ecf4 100644 --- a/src/plugins/intel_cpu/src/nodes/ctc_greedy_decoder_seq_len.cpp +++ b/src/plugins/intel_cpu/src/nodes/ctc_greedy_decoder_seq_len.cpp @@ -15,9 +15,9 @@ namespace ov { namespace intel_cpu { namespace node { -bool CTCGreedyDecoderSeqLen::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool CTCGreedyDecoderSeqLen::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { - const auto greedyDecOp = ngraph::as_type_ptr(op); + const auto greedyDecOp = ov::as_type_ptr(op); if (!greedyDecOp) { errorMessage = "Node is not an instance of the CTCGreedyDecoderSeqLen operation from operation set v6."; return false; @@ -28,7 +28,7 @@ bool CTCGreedyDecoderSeqLen::isSupportedOperation(const std::shared_ptr& op, const GraphContext::CPtr context) +CTCGreedyDecoderSeqLen::CTCGreedyDecoderSeqLen(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { @@ -46,7 +46,7 @@ CTCGreedyDecoderSeqLen::CTCGreedyDecoderSeqLen(const std::shared_ptr(op); + auto greedyDecOp = ov::as_type_ptr(op); mergeRepeated = greedyDecOp->get_merge_repeated(); } diff --git a/src/plugins/intel_cpu/src/nodes/ctc_greedy_decoder_seq_len.h b/src/plugins/intel_cpu/src/nodes/ctc_greedy_decoder_seq_len.h index 9b5670fb897e2c..1f9a4d94dc12fd 100644 --- a/src/plugins/intel_cpu/src/nodes/ctc_greedy_decoder_seq_len.h +++ b/src/plugins/intel_cpu/src/nodes/ctc_greedy_decoder_seq_len.h @@ -13,7 +13,7 @@ namespace node { class CTCGreedyDecoderSeqLen : public Node { public: - CTCGreedyDecoderSeqLen(const std::shared_ptr& op, const GraphContext::CPtr context); + CTCGreedyDecoderSeqLen(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -22,7 +22,7 @@ class CTCGreedyDecoderSeqLen : public Node { void executeDynamicImpl(dnnl::stream strm) override; bool needPrepareParams() const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: const size_t DATA_INDEX = 0lu; diff --git a/src/plugins/intel_cpu/src/nodes/ctc_loss.cpp b/src/plugins/intel_cpu/src/nodes/ctc_loss.cpp index 9d653396027fc0..bdc897ad723444 100644 --- a/src/plugins/intel_cpu/src/nodes/ctc_loss.cpp +++ b/src/plugins/intel_cpu/src/nodes/ctc_loss.cpp @@ -14,9 +14,9 @@ namespace ov { namespace intel_cpu { namespace node { -bool CTCLoss::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool CTCLoss::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { - const auto ctcLossOp = ngraph::as_type_ptr(op); + const auto ctcLossOp = ov::as_type_ptr(op); if (!ctcLossOp) { errorMessage = "Node is not an instance of the CTCLoss operation from operation set v4."; return false; @@ -27,7 +27,7 @@ bool CTCLoss::isSupportedOperation(const std::shared_ptr& op return true; } -CTCLoss::CTCLoss(const std::shared_ptr& op, const GraphContext::CPtr context) +CTCLoss::CTCLoss(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { @@ -39,7 +39,7 @@ CTCLoss::CTCLoss(const std::shared_ptr& op, const GraphContext::CP if (getOriginalInputsNumber() != 4 && getOriginalInputsNumber() != 5) OPENVINO_THROW(errorPrefix, " has invalid inputs number."); - auto ctcLossOp = ngraph::as_type_ptr(op); + auto ctcLossOp = ov::as_type_ptr(op); ctcMergeRepeated = ctcLossOp->get_ctc_merge_repeated(); preprocessCollapseRepeated = ctcLossOp->get_preprocess_collapse_repeated(); unique = ctcLossOp->get_unique(); diff --git a/src/plugins/intel_cpu/src/nodes/ctc_loss.h b/src/plugins/intel_cpu/src/nodes/ctc_loss.h index a2825b10e4b1ba..0acd062e2470c0 100644 --- a/src/plugins/intel_cpu/src/nodes/ctc_loss.h +++ b/src/plugins/intel_cpu/src/nodes/ctc_loss.h @@ -13,14 +13,14 @@ namespace node { class CTCLoss : public Node { public: - CTCLoss(const std::shared_ptr& op, const GraphContext::CPtr context); + CTCLoss(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; void execute(dnnl::stream strm) override; bool created() const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; void executeDynamicImpl(dnnl::stream strm) override; bool needPrepareParams() const override { return false; }; diff --git a/src/plugins/intel_cpu/src/nodes/cum_sum.cpp b/src/plugins/intel_cpu/src/nodes/cum_sum.cpp index bcb14b2274e44a..2f51b3471b1395 100644 --- a/src/plugins/intel_cpu/src/nodes/cum_sum.cpp +++ b/src/plugins/intel_cpu/src/nodes/cum_sum.cpp @@ -20,7 +20,7 @@ namespace ov { namespace intel_cpu { namespace node { -bool CumSum::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool CumSum::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const auto cumsum = std::dynamic_pointer_cast(op); if (!cumsum) { @@ -33,7 +33,7 @@ bool CumSum::isSupportedOperation(const std::shared_ptr& op, return true; } -CumSum::CumSum(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { +CumSum::CumSum(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { OPENVINO_THROW_NOT_IMPLEMENTED(errorMessage); @@ -59,7 +59,7 @@ CumSum::CumSum(const std::shared_ptr& op, const GraphContext::CPtr if (getOriginalInputsNumber() == numOfInputs) { const auto axis_shape = cumsum->get_input_partial_shape(AXIS); - if (axis_shape.is_dynamic() || !ngraph::is_scalar(axis_shape.to_shape())) + if (axis_shape.is_dynamic() || !ov::is_scalar(axis_shape.to_shape())) OPENVINO_THROW(errorPrefix, " doesn't support 'axis' input tensor with non scalar rank"); } diff --git a/src/plugins/intel_cpu/src/nodes/cum_sum.h b/src/plugins/intel_cpu/src/nodes/cum_sum.h index eee2da8c085472..8334eb47f91334 100644 --- a/src/plugins/intel_cpu/src/nodes/cum_sum.h +++ b/src/plugins/intel_cpu/src/nodes/cum_sum.h @@ -13,7 +13,7 @@ namespace node { class CumSum : public Node { public: - CumSum(const std::shared_ptr& op, const GraphContext::CPtr context); + CumSum(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -23,7 +23,7 @@ class CumSum : public Node { bool needPrepareParams() const override; void executeDynamicImpl(dnnl::stream strm) override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: template diff --git a/src/plugins/intel_cpu/src/nodes/deconv.cpp b/src/plugins/intel_cpu/src/nodes/deconv.cpp index f51e1790cda4af..7040e405436cab 100644 --- a/src/plugins/intel_cpu/src/nodes/deconv.cpp +++ b/src/plugins/intel_cpu/src/nodes/deconv.cpp @@ -126,7 +126,7 @@ bool DeconvKey::operator==(const DeconvKey &rhs) const { */ class DeconfolutionShapeInferFactory : public ShapeInferFactory { public: - DeconfolutionShapeInferFactory(std::shared_ptr op) : m_op(op) {} + DeconfolutionShapeInferFactory(std::shared_ptr op) : m_op(op) {} ShapeInferPtr makeShapeInfer() const override { if (m_op->get_input_size() > 2) { return std::make_shared(make_shape_inference(m_op), PortMask(2)); @@ -134,11 +134,11 @@ class DeconfolutionShapeInferFactory : public ShapeInferFactory { return std::make_shared(make_shape_inference(m_op), EMPTY_PORT_MASK); } private: - std::shared_ptr m_op; + std::shared_ptr m_op; }; } // namespace -bool Deconvolution::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool Deconvolution::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { if (std::dynamic_pointer_cast(op) == nullptr && std::dynamic_pointer_cast(op) == nullptr) { @@ -160,7 +160,7 @@ bool Deconvolution::isSupportedOperation(const std::shared_ptr& op, +Deconvolution::Deconvolution(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, DeconfolutionShapeInferFactory(op)) { std::string errorMessage; errorPrefix = "Deconvolution node with name '" + getName() + "' "; @@ -221,7 +221,7 @@ Deconvolution::Deconvolution(const std::shared_ptr& op, externOutShape = inputShapes.size() == 3; biasPort = externOutShape ? 3 : 2; if (externOutShape && isDynamicNode()) { - bool isConstOutShape = ngraph::is_type(op->get_input_node_shared_ptr(2)); + bool isConstOutShape = ov::is_type(op->get_input_node_shared_ptr(2)); if (isConstOutShape) { lastOutputSpatialDims = ov::as_type(op->get_input_node_ptr(2))->cast_vector(); } @@ -247,7 +247,7 @@ MemoryPtr Deconvolution::createWeiBlobAsIO(const VectorDims& dims) { VectorDims dimsForBlockedDesc{dims}; std::swap(dimsForBlockedDesc[withGroups + 0], dimsForBlockedDesc[withGroups + 1]); - InferenceEngine::SizeVector orderForBlockedDesc; + VectorDims orderForBlockedDesc; if (withGroups) { orderForBlockedDesc = {0, 2, 1}; } else { diff --git a/src/plugins/intel_cpu/src/nodes/deconv.h b/src/plugins/intel_cpu/src/nodes/deconv.h index 9cca004a45e273..9341f7616a525a 100644 --- a/src/plugins/intel_cpu/src/nodes/deconv.h +++ b/src/plugins/intel_cpu/src/nodes/deconv.h @@ -19,7 +19,7 @@ namespace node { class Deconvolution : public Node { public: - Deconvolution(const std::shared_ptr& op, const GraphContext::CPtr context); + Deconvolution(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; @@ -40,7 +40,7 @@ class Deconvolution : public Node { InferenceEngine::Precision getRuntimePrecision() const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; bool canFuse(const NodePtr& node) const override; const VectorDims& getWeightDims() const { return getInputShapeAtPort(1).getStaticDims(); } diff --git a/src/plugins/intel_cpu/src/nodes/def_conv.cpp b/src/plugins/intel_cpu/src/nodes/def_conv.cpp index ccaff614239a03..10c3e7d676dfaf 100644 --- a/src/plugins/intel_cpu/src/nodes/def_conv.cpp +++ b/src/plugins/intel_cpu/src/nodes/def_conv.cpp @@ -670,7 +670,7 @@ struct jit_uni_def_conv_kernel_f32 : public jit_uni_def_conv_kernel, public jit_ } }; #endif -bool DeformableConvolution::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool DeformableConvolution::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { if (!one_of(op->get_type_info(), ngraph::op::v1::DeformableConvolution::get_type_info_static(), @@ -742,7 +742,7 @@ bool DefConvKey::operator==(const DefConvKey &rhs) const { } // namespace -DeformableConvolution::DeformableConvolution(const std::shared_ptr& op, const GraphContext::CPtr context) +DeformableConvolution::DeformableConvolution(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/def_conv.h b/src/plugins/intel_cpu/src/nodes/def_conv.h index c96c2caa280562..5030ce27040d89 100644 --- a/src/plugins/intel_cpu/src/nodes/def_conv.h +++ b/src/plugins/intel_cpu/src/nodes/def_conv.h @@ -71,9 +71,9 @@ struct jit_uni_def_conv_kernel { class DeformableConvolution : public Node { public: - DeformableConvolution(const std::shared_ptr& op, const GraphContext::CPtr context); + DeformableConvolution(const std::shared_ptr& op, const GraphContext::CPtr context); - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; void execute(dnnl::stream strm) override; diff --git a/src/plugins/intel_cpu/src/nodes/depth_to_space.cpp b/src/plugins/intel_cpu/src/nodes/depth_to_space.cpp index f593c76e7c5795..20fc17fc50f6ad 100644 --- a/src/plugins/intel_cpu/src/nodes/depth_to_space.cpp +++ b/src/plugins/intel_cpu/src/nodes/depth_to_space.cpp @@ -49,7 +49,7 @@ bool DepthToSpace::DepthToSpaceAttrs::operator==(const DepthToSpaceAttrs& rhs) c return result; } -bool DepthToSpace::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool DepthToSpace::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { auto depthToSpace = ov::as_type_ptr(op); if (!depthToSpace) { @@ -58,7 +58,7 @@ bool DepthToSpace::isSupportedOperation(const std::shared_ptrget_mode(); if (!one_of(mode, ngraph::op::v0::DepthToSpace::DepthToSpaceMode::BLOCKS_FIRST, ngraph::op::v0::DepthToSpace::DepthToSpaceMode::DEPTH_FIRST)) { - errorMessage = "Does not support mode: " + ngraph::as_string(mode); + errorMessage = "Does not support mode: " + ov::as_string(mode); return false; } } catch (...) { @@ -67,7 +67,7 @@ bool DepthToSpace::isSupportedOperation(const std::shared_ptr& op, const GraphContext::CPtr context) +DepthToSpace::DepthToSpace(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { @@ -86,7 +86,7 @@ DepthToSpace::DepthToSpace(const std::shared_ptr& op, const GraphC } else if (modeNgraph == ngraph::op::v0::DepthToSpace::DepthToSpaceMode::DEPTH_FIRST) { attrs.mode = Mode::DEPTH_FIRST; } else { - THROW_ERROR("doesn't support mode: ", ngraph::as_string(modeNgraph)); + THROW_ERROR("doesn't support mode: ", ov::as_string(modeNgraph)); } attrs.blockSize = depthToSpace->get_block_size(); diff --git a/src/plugins/intel_cpu/src/nodes/depth_to_space.h b/src/plugins/intel_cpu/src/nodes/depth_to_space.h index 6fce5829dc7c4e..499d969b384a59 100644 --- a/src/plugins/intel_cpu/src/nodes/depth_to_space.h +++ b/src/plugins/intel_cpu/src/nodes/depth_to_space.h @@ -15,9 +15,9 @@ namespace node { class DepthToSpace : public Node { public: - DepthToSpace(const std::shared_ptr& op, const GraphContext::CPtr context); + DepthToSpace(const std::shared_ptr& op, const GraphContext::CPtr context); - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; void createPrimitive() override; diff --git a/src/plugins/intel_cpu/src/nodes/detection_output.cpp b/src/plugins/intel_cpu/src/nodes/detection_output.cpp index d6a42c1991ed3e..18d46663ce8fe4 100644 --- a/src/plugins/intel_cpu/src/nodes/detection_output.cpp +++ b/src/plugins/intel_cpu/src/nodes/detection_output.cpp @@ -51,7 +51,7 @@ bool DetectionOutput::isSupportedOperation(const std::shared_ptr return true; } -DetectionOutput::DetectionOutput(const std::shared_ptr& op, const GraphContext::CPtr context) +DetectionOutput::DetectionOutput(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/dft.cpp b/src/plugins/intel_cpu/src/nodes/dft.cpp index 1331560485aeb4..4dbc2b6ff64ac4 100644 --- a/src/plugins/intel_cpu/src/nodes/dft.cpp +++ b/src/plugins/intel_cpu/src/nodes/dft.cpp @@ -25,7 +25,7 @@ namespace ov { namespace intel_cpu { namespace node { -bool DFT::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool DFT::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { if (isDynamicNgraphNode(op)) { errorMessage = "Doesn't support op with dynamic shapes"; @@ -44,7 +44,7 @@ bool DFT::isSupportedOperation(const std::shared_ptr& op, st return true; } -DFT::DFT(const std::shared_ptr& op, const GraphContext::CPtr context) : +DFT::DFT(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/dft.h b/src/plugins/intel_cpu/src/nodes/dft.h index 019bed18dab57e..9f61dd94e32f22 100644 --- a/src/plugins/intel_cpu/src/nodes/dft.h +++ b/src/plugins/intel_cpu/src/nodes/dft.h @@ -16,7 +16,7 @@ namespace node { class DFT : public Node { public: - DFT(const std::shared_ptr& op, const GraphContext::CPtr context); + DFT(const std::shared_ptr& op, const GraphContext::CPtr context); ~DFT() override = default; void getSupportedDescriptors() override; @@ -26,7 +26,7 @@ class DFT : public Node { void prepareParams() override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: std::vector getAxes() const; diff --git a/src/plugins/intel_cpu/src/nodes/eltwise.cpp b/src/plugins/intel_cpu/src/nodes/eltwise.cpp index 1b5967d9660c2c..7a9ad61a394051 100644 --- a/src/plugins/intel_cpu/src/nodes/eltwise.cpp +++ b/src/plugins/intel_cpu/src/nodes/eltwise.cpp @@ -930,7 +930,7 @@ struct jit_uni_eltwise_generic : public jit_uni_eltwise_kernel, public jit_gener #endif // OPENVINO_ARCH_X86_64 -Eltwise::BroadcastingPolicy Eltwise::determineBroadcastingPolicy(const std::shared_ptr& op) { +Eltwise::BroadcastingPolicy Eltwise::determineBroadcastingPolicy(const std::shared_ptr& op) { const auto const1 = ov::as_type_ptr(op->get_input_node_shared_ptr(0)); const auto const2 = ov::as_type_ptr(op->get_input_node_shared_ptr(1)); int constPort = -1; @@ -943,49 +943,49 @@ Eltwise::BroadcastingPolicy Eltwise::determineBroadcastingPolicy(const std::shar } auto const_shape = op->get_input_shape(constPort); - if (ngraph::shape_size(const_shape) == 1) + if (ov::shape_size(const_shape) == 1) return PerTensor; else return PerChannel; } -const std::map& Eltwise::getInitializers() { - static const std::map initializers = { - {ngraph::op::v1::Add::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { +const std::map& Eltwise::getInitializers() { + static const std::map initializers = { + {ngraph::op::v1::Add::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseAdd; node.broadcastingPolicy = determineBroadcastingPolicy(op); }}, - {ngraph::op::v1::Subtract::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v1::Subtract::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseSubtract; node.broadcastingPolicy = determineBroadcastingPolicy(op); }}, - {ngraph::op::v1::Multiply::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v1::Multiply::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseMultiply; node.broadcastingPolicy = determineBroadcastingPolicy(op); }}, - {ngraph::op::v1::Divide::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v1::Divide::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseDivide; node.broadcastingPolicy = determineBroadcastingPolicy(op); }}, - {ngraph::op::v0::SquaredDifference::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v0::SquaredDifference::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseSquaredDifference; }}, - {ngraph::op::v1::Maximum::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v1::Maximum::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseMaximum; }}, - {ngraph::op::v1::Minimum::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v1::Minimum::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseMinimum; }}, - {ngraph::op::v1::Mod::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v1::Mod::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseMod; }}, - {ngraph::op::v1::FloorMod::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v1::FloorMod::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseFloorMod; }}, - {ngraph::op::v1::Power::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v1::Power::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwisePowerDynamic; }}, - {PowerStaticNode::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {PowerStaticNode::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { auto powerStatic = getNgraphOpAs(op); node.algorithm = Algorithm::EltwisePowerStatic; node.alpha = powerStatic->get_power(); @@ -993,10 +993,10 @@ const std::map& Eltwise::g node.gamma = powerStatic->get_shift(); node.broadcastingPolicy = PerTensor; }}, - {ngraph::op::v1::Equal::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v1::Equal::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseEqual; }}, - {ngraph::op::v1::NotEqual::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v1::NotEqual::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseNotEqual; }}, {ov::op::v10::IsFinite::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { @@ -1011,46 +1011,46 @@ const std::map& Eltwise::g {ov::op::v10::IsNaN::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseIsNaN; }}, - {ngraph::op::v1::Greater::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v1::Greater::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseGreater; }}, - {ngraph::op::v1::GreaterEqual::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v1::GreaterEqual::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseGreaterEqual; }}, - {ngraph::op::v1::Less::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v1::Less::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseLess; }}, - {ngraph::op::v1::LessEqual::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v1::LessEqual::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseLessEqual; }}, - {ngraph::op::v1::LogicalAnd::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v1::LogicalAnd::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseLogicalAnd; }}, - {ngraph::op::v1::LogicalOr::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v1::LogicalOr::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseLogicalOr; }}, - {ngraph::op::v1::LogicalXor::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v1::LogicalXor::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseLogicalXor; }}, - {ngraph::op::v1::LogicalNot::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v1::LogicalNot::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseLogicalNot; }}, - {ngraph::op::v0::Relu::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v0::Relu::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseRelu; node.onednnAlgorithm = dnnl::algorithm::eltwise_relu; }}, - {LeakyReluNode::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {LeakyReluNode::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { auto leakyRelu = getNgraphOpAs(op); node.algorithm = Algorithm::EltwiseRelu; node.onednnAlgorithm = dnnl::algorithm::eltwise_relu; node.alpha = leakyRelu->get_slope(); node.beta = 0.0f; }}, - {ngraph::op::v0::Gelu::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v0::Gelu::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseGeluErf; node.onednnAlgorithm = dnnl::algorithm::eltwise_gelu_erf; }}, - {ngraph::op::v7::Gelu::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v7::Gelu::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { auto gelu = getNgraphOpAs(op); ngraph::op::GeluApproximationMode approximationMode = gelu->get_approximation_mode(); if (approximationMode == ngraph::op::GeluApproximationMode::ERF) { @@ -1065,29 +1065,29 @@ const std::map& Eltwise::g approximationMode); } }}, - {ngraph::op::v0::Elu::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v0::Elu::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { auto eluOp = getNgraphOpAs(op); node.alpha = static_cast(eluOp->get_alpha()); node.algorithm = Algorithm::EltwiseElu; node.onednnAlgorithm = dnnl::algorithm::eltwise_elu; }}, - {ngraph::op::v0::Tanh::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v0::Tanh::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseTanh; node.onednnAlgorithm = dnnl::algorithm::eltwise_tanh; }}, - {ngraph::op::v0::Sigmoid::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v0::Sigmoid::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseSigmoid; node.onednnAlgorithm = dnnl::algorithm::eltwise_logistic; }}, - {ngraph::op::v0::Abs::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v0::Abs::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseAbs; node.onednnAlgorithm = dnnl::algorithm::eltwise_abs; }}, - {ngraph::op::v0::Sqrt::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v0::Sqrt::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseSqrt; node.onednnAlgorithm = dnnl::algorithm::eltwise_sqrt; }}, - {ngraph::op::v0::Clamp::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v0::Clamp::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { auto clampOp = getNgraphOpAs(op); float alpha_ = static_cast(clampOp->get_min()); @@ -1102,32 +1102,32 @@ const std::map& Eltwise::g node.algorithm = Algorithm::EltwiseClamp; node.onednnAlgorithm = dnnl::algorithm::eltwise_clip; }}, - {ngraph::op::v0::Exp::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v0::Exp::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseExp; node.onednnAlgorithm = dnnl::algorithm::eltwise_exp; }}, - {SwishNode::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {SwishNode::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { auto swishOp = getNgraphOpAs(op); node.algorithm = Algorithm::EltwiseSwish; node.onednnAlgorithm = dnnl::algorithm::eltwise_swish; node.alpha = swishOp->get_alpha(); }}, - {ngraph::op::v4::HSwish::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v4::HSwish::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { // since v3.0 version, oneDNN has flexible implementation of hardswish, ov still uses the one with hardcoded alpha and beta node.alpha = 1.f / 6.f; node.beta = 0.5f; node.algorithm = Algorithm::EltwiseHswish; node.onednnAlgorithm = dnnl::algorithm::eltwise_hardswish; }}, - {ngraph::op::v4::Mish::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v4::Mish::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseMish; node.onednnAlgorithm = dnnl::algorithm::eltwise_mish; }}, - {ngraph::op::v5::HSigmoid::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v5::HSigmoid::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseHsigmoid; node.onednnAlgorithm = dnnl::algorithm::eltwise_hsigmoid; }}, - {ngraph::op::v5::Round::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v5::Round::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { auto roundOp = getNgraphOpAs(op); switch (roundOp->get_mode()) { @@ -1141,25 +1141,25 @@ const std::map& Eltwise::g break; } }}, - {ngraph::op::v0::PRelu::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v0::PRelu::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwisePrelu; node.broadcastingPolicy = determineBroadcastingPolicy(op); }}, - {ngraph::op::v0::Erf::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v0::Erf::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseErf; }}, - {ngraph::op::v4::SoftPlus::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v4::SoftPlus::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseSoftRelu; node.alpha = 1.f; node.onednnAlgorithm = dnnl::algorithm::eltwise_soft_relu; }}, - {ngraph::op::v9::SoftSign::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v9::SoftSign::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseSoftSign; }}, - {ngraph::op::v1::Select::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v1::Select::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseSelect; }}, - {ngraph::op::v0::Log::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { + {ngraph::op::v0::Log::get_type_info_static(), [](const std::shared_ptr& op, Eltwise& node) { node.algorithm = Algorithm::EltwiseLog; }}, }; @@ -1801,7 +1801,7 @@ static Eltwise::executorPtr buildExecutor(const EltwiseKey& key) { key.implType == EltwiseImplType::optimizedShapeAgnostic); } -bool Eltwise::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool Eltwise::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { if (getInitializers().find(op->get_type_info()) == getInitializers().end()) { errorMessage = "Doesn't support Eltwise algorithm: " + std::string(op->get_type_name()); @@ -1810,14 +1810,14 @@ bool Eltwise::isSupportedOperation(const std::shared_ptr& op if (const auto binOp = ov::as_type_ptr(op)) { if (binOp->get_autob().m_type != ngraph::op::AutoBroadcastType::NONE && binOp->get_autob().m_type != ngraph::op::AutoBroadcastType::NUMPY) { - errorMessage = "Doesn't support broadcast type: " + ngraph::as_string(binOp->get_autob().m_type); + errorMessage = "Doesn't support broadcast type: " + ov::as_string(binOp->get_autob().m_type); return false; } } if (const auto select = ov::as_type_ptr(op)) { if (select->get_auto_broadcast().m_type != ngraph::op::AutoBroadcastType::NONE && select->get_auto_broadcast().m_type != ngraph::op::AutoBroadcastType::NUMPY) { - errorMessage = "Doesn't support broadcast type: " + ngraph::as_string(select->get_autob().m_type); + errorMessage = "Doesn't support broadcast type: " + ov::as_string(select->get_autob().m_type); return false; } } @@ -1827,7 +1827,7 @@ bool Eltwise::isSupportedOperation(const std::shared_ptr& op return true; } -Eltwise::Eltwise(const std::shared_ptr& op, const GraphContext::CPtr context) : +Eltwise::Eltwise(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, EltwiseShapeInferFactory()), broadcastingPolicy(Undefined) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/eltwise.h b/src/plugins/intel_cpu/src/nodes/eltwise.h index 7feb2ba88c9bdb..6d88e0654bde77 100644 --- a/src/plugins/intel_cpu/src/nodes/eltwise.h +++ b/src/plugins/intel_cpu/src/nodes/eltwise.h @@ -103,7 +103,7 @@ class Eltwise : public Node { using executorPtr = std::shared_ptr; public: - Eltwise(const std::shared_ptr& op, const GraphContext::CPtr context); + Eltwise(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; @@ -141,7 +141,7 @@ class Eltwise : public Node { BroadcastingPolicy getBroadcastingPolicy() const { return broadcastingPolicy; } - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: executorPtr execPtr = nullptr; @@ -185,10 +185,10 @@ class Eltwise : public Node { std::vector memPtrs = {}; std::vector fqDataPtrs; - using Initializer = std::function&, Eltwise& node)>; - static const std::map& getInitializers(); + using Initializer = std::function&, Eltwise& node)>; + static const std::map& getInitializers(); - static BroadcastingPolicy determineBroadcastingPolicy(const std::shared_ptr& op); + static BroadcastingPolicy determineBroadcastingPolicy(const std::shared_ptr& op); size_t getOpInputsNum() const; diff --git a/src/plugins/intel_cpu/src/nodes/embedding_bag_offset_sum.cpp b/src/plugins/intel_cpu/src/nodes/embedding_bag_offset_sum.cpp index 72a2d4cd137cf7..e9c5822d18bbbf 100644 --- a/src/plugins/intel_cpu/src/nodes/embedding_bag_offset_sum.cpp +++ b/src/plugins/intel_cpu/src/nodes/embedding_bag_offset_sum.cpp @@ -14,9 +14,9 @@ namespace ov { namespace intel_cpu { namespace node { -bool EmbeddingBagOffsetSum::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool EmbeddingBagOffsetSum::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { - const auto embBagOffsetSumOp = ngraph::as_type_ptr(op); + const auto embBagOffsetSumOp = ov::as_type_ptr(op); if (!embBagOffsetSumOp) { errorMessage = "Node is not an instance of the EmbeddingBagOffsetsSum operation from opset v3."; return false; @@ -27,7 +27,7 @@ bool EmbeddingBagOffsetSum::isSupportedOperation(const std::shared_ptr& op, const GraphContext::CPtr context) +EmbeddingBagOffsetSum::EmbeddingBagOffsetSum(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)), EmbeddingBagSum(op, 3lu, 1lu, 4lu, 3lu) { std::string errorMessage; diff --git a/src/plugins/intel_cpu/src/nodes/embedding_bag_offset_sum.h b/src/plugins/intel_cpu/src/nodes/embedding_bag_offset_sum.h index 66a9f5831ef6ef..27a894a8808fec 100644 --- a/src/plugins/intel_cpu/src/nodes/embedding_bag_offset_sum.h +++ b/src/plugins/intel_cpu/src/nodes/embedding_bag_offset_sum.h @@ -17,7 +17,7 @@ namespace node { class EmbeddingBagOffsetSum : public Node, public EmbeddingBagSum { public: - EmbeddingBagOffsetSum(const std::shared_ptr& op, const GraphContext::CPtr context); + EmbeddingBagOffsetSum(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -25,7 +25,7 @@ class EmbeddingBagOffsetSum : public Node, public EmbeddingBagSum { bool created() const override; bool isExecutable() const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; protected: void prepareParams() override; diff --git a/src/plugins/intel_cpu/src/nodes/embedding_bag_packed_sum.cpp b/src/plugins/intel_cpu/src/nodes/embedding_bag_packed_sum.cpp index 2515d0fabc7145..11f55c51e42fe2 100644 --- a/src/plugins/intel_cpu/src/nodes/embedding_bag_packed_sum.cpp +++ b/src/plugins/intel_cpu/src/nodes/embedding_bag_packed_sum.cpp @@ -14,9 +14,9 @@ namespace ov { namespace intel_cpu { namespace node { -bool EmbeddingBagPackedSum::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool EmbeddingBagPackedSum::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { - const auto embBagPackedSumOp = ngraph::as_type_ptr(op); + const auto embBagPackedSumOp = ov::as_type_ptr(op); if (!embBagPackedSumOp) { errorMessage = "Node is not an instance of the EmbeddingBagPackedSum operation from opset v3."; return false; @@ -27,7 +27,7 @@ bool EmbeddingBagPackedSum::isSupportedOperation(const std::shared_ptr& op, const GraphContext::CPtr context) +EmbeddingBagPackedSum::EmbeddingBagPackedSum(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)), EmbeddingBagSum(op, 2lu, 1lu, 2lu, 3lu) { std::string errorMessage; diff --git a/src/plugins/intel_cpu/src/nodes/embedding_bag_packed_sum.h b/src/plugins/intel_cpu/src/nodes/embedding_bag_packed_sum.h index 5ceee8f9ba4d3e..1b5dd89a40c8d9 100644 --- a/src/plugins/intel_cpu/src/nodes/embedding_bag_packed_sum.h +++ b/src/plugins/intel_cpu/src/nodes/embedding_bag_packed_sum.h @@ -17,7 +17,7 @@ namespace node { class EmbeddingBagPackedSum : public Node, public EmbeddingBagSum { public: - EmbeddingBagPackedSum(const std::shared_ptr& op, const GraphContext::CPtr context); + EmbeddingBagPackedSum(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -25,7 +25,7 @@ class EmbeddingBagPackedSum : public Node, public EmbeddingBagSum { bool created() const override; bool isExecutable() const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; protected: void prepareParams() override; diff --git a/src/plugins/intel_cpu/src/nodes/embedding_bag_sum.cpp b/src/plugins/intel_cpu/src/nodes/embedding_bag_sum.cpp index 1ffe5ed123e642..89a924bdd825b5 100644 --- a/src/plugins/intel_cpu/src/nodes/embedding_bag_sum.cpp +++ b/src/plugins/intel_cpu/src/nodes/embedding_bag_sum.cpp @@ -18,7 +18,7 @@ namespace intel_cpu { namespace node { EmbeddingBagSum::EmbeddingBagSum( - const std::shared_ptr& op, + const std::shared_ptr& op, size_t requiredInputNum, size_t indicesIdx, size_t perSampleWeightsIdx, @@ -48,7 +48,7 @@ void EmbeddingBagSum::prepareParams(const VectorDims& indexStaticShape) { template void EmbeddingBagSum::processData(const T* srcData, const T* weightsData, - const InferenceEngine::SizeVector& inDataDims, const MemoryPtr& outMemory) { + const VectorDims& inDataDims, const MemoryPtr& outMemory) { std::string msgPrefix = std::string("Node EmbeddingBagSum with name '") + _layerName + "' "; initFromInputs(); @@ -120,7 +120,7 @@ void EmbeddingBagSum::processData(const T* srcData, const T* weightsData, } void EmbeddingBagSum::execute(const uint8_t* srcData, const uint8_t* weightsData, const InferenceEngine::Precision &srcPrc, - const InferenceEngine::SizeVector& inDims, const MemoryPtr& outMemory) { + const VectorDims& inDims, const MemoryPtr& outMemory) { switch (srcPrc) { case Precision::FP32: { return processData::value_type>(reinterpret_cast(srcData), diff --git a/src/plugins/intel_cpu/src/nodes/embedding_bag_sum.h b/src/plugins/intel_cpu/src/nodes/embedding_bag_sum.h index 59d545ab11f477..6331f1761b2069 100644 --- a/src/plugins/intel_cpu/src/nodes/embedding_bag_sum.h +++ b/src/plugins/intel_cpu/src/nodes/embedding_bag_sum.h @@ -17,14 +17,14 @@ namespace node { class EmbeddingBagSum { public: EmbeddingBagSum( - const std::shared_ptr&, + const std::shared_ptr&, size_t requiredInputsNum, size_t indicesIdx, size_t perSampleWeightsIdx, size_t defaultIndexIdx); void execute(const uint8_t* srcData, const uint8_t* weightsData, const InferenceEngine::Precision &srcPrc, - const InferenceEngine::SizeVector& inDims, const MemoryPtr& outMemory); + const VectorDims& inDims, const MemoryPtr& outMemory); ~EmbeddingBagSum() = default; @@ -41,7 +41,7 @@ class EmbeddingBagSum { template void processData(const T* srcData, const T* weightsData, - const InferenceEngine::SizeVector& inDataDims, const MemoryPtr& outMemory); + const VectorDims& inDataDims, const MemoryPtr& outMemory); const size_t EMB_TABLE_IDX = 0lu; const size_t INDICES_IDX; diff --git a/src/plugins/intel_cpu/src/nodes/embedding_segments_sum.cpp b/src/plugins/intel_cpu/src/nodes/embedding_segments_sum.cpp index 077a22415f4681..2a9f6dbf5ab7ae 100644 --- a/src/plugins/intel_cpu/src/nodes/embedding_segments_sum.cpp +++ b/src/plugins/intel_cpu/src/nodes/embedding_segments_sum.cpp @@ -14,9 +14,9 @@ namespace ov { namespace intel_cpu { namespace node { -bool EmbeddingSegmentsSum::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool EmbeddingSegmentsSum::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { - const auto embBagSegSumOp = ngraph::as_type_ptr(op); + const auto embBagSegSumOp = ov::as_type_ptr(op); if (!embBagSegSumOp) { errorMessage = "Node is not an instance of the EmbeddingSegmentsSum operation from opset v3."; return false; @@ -27,7 +27,7 @@ bool EmbeddingSegmentsSum::isSupportedOperation(const std::shared_ptr& op, const GraphContext::CPtr context) +EmbeddingSegmentsSum::EmbeddingSegmentsSum(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, PortMask(NUM_SEGMENTS_IDX))), EmbeddingBagSum(op, 4lu, 1lu, 5lu, 4lu) { std::string errorMessage; diff --git a/src/plugins/intel_cpu/src/nodes/embedding_segments_sum.h b/src/plugins/intel_cpu/src/nodes/embedding_segments_sum.h index 33c961540e143f..04722758dd4dc4 100644 --- a/src/plugins/intel_cpu/src/nodes/embedding_segments_sum.h +++ b/src/plugins/intel_cpu/src/nodes/embedding_segments_sum.h @@ -17,7 +17,7 @@ namespace node { class EmbeddingSegmentsSum : public Node, public EmbeddingBagSum { public: - EmbeddingSegmentsSum(const std::shared_ptr& op, const GraphContext::CPtr context); + EmbeddingSegmentsSum(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -25,7 +25,7 @@ class EmbeddingSegmentsSum : public Node, public EmbeddingBagSum { bool created() const override; bool isExecutable() const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; protected: void prepareParams() override; diff --git a/src/plugins/intel_cpu/src/nodes/executors/acl/acl_ie_scheduler.cpp b/src/plugins/intel_cpu/src/nodes/executors/acl/acl_ie_scheduler.cpp index c617363aefebf6..451b20fde3bc3b 100644 --- a/src/plugins/intel_cpu/src/nodes/executors/acl/acl_ie_scheduler.cpp +++ b/src/plugins/intel_cpu/src/nodes/executors/acl/acl_ie_scheduler.cpp @@ -50,7 +50,7 @@ void ACLScheduler::schedule_custom(ICPPKernel *kernel, const Hints &hints, const const auto num_windows = _num_threads; const auto hints_split_dimension = hints.split_dimension(); - InferenceEngine::parallel_for(num_windows, [&](int wid) { + ov::parallel_for(num_windows, [&](int wid) { Window win = max_window.split_window(hints_split_dimension, wid, num_windows); win.validate(); main_run(win, {wid, static_cast(_num_threads), &cpu_info()}); @@ -68,7 +68,7 @@ void ACLScheduler::schedule_op(ICPPKernel *kernel, const Hints &hints, const Win } void ACLScheduler::run_workloads(std::vector &workloads) { - InferenceEngine::parallel_for(workloads.size(), [&](int wid) { + ov::parallel_for(workloads.size(), [&](int wid) { workloads[wid]({wid, static_cast(parallel_get_num_threads()), &cpu_info()}); }); } diff --git a/src/plugins/intel_cpu/src/nodes/executors/mlas/mlas_transpose.hpp b/src/plugins/intel_cpu/src/nodes/executors/mlas/mlas_transpose.hpp index ab44d50ac4478d..d4e102eb393c06 100644 --- a/src/plugins/intel_cpu/src/nodes/executors/mlas/mlas_transpose.hpp +++ b/src/plugins/intel_cpu/src/nodes/executors/mlas/mlas_transpose.hpp @@ -20,7 +20,7 @@ class MlasTransposeExecutor : public TransposeExecutor { impl_desc_type getImplType() const override { return implType; } private: static int64_t calcShapeSize(const Shape& shape, size_t start, size_t end); - static bool IsTransposeMovingSingleAxis(InferenceEngine::SizeVector permutations, size_t& from, size_t& to); + static bool IsTransposeMovingSingleAxis(VectorDims permutations, size_t& from, size_t& to); void TransposeSingleAxisOutwards(const MemoryCPtr& input, const MemoryPtr& output, size_t from, size_t to); void TransposeSingleAxisInwards(const MemoryCPtr& input, const MemoryPtr& output, size_t from, size_t to); diff --git a/src/plugins/intel_cpu/src/nodes/executors/mvn.hpp b/src/plugins/intel_cpu/src/nodes/executors/mvn.hpp index 0a1dbb6904cf16..c3c01914e3a509 100644 --- a/src/plugins/intel_cpu/src/nodes/executors/mvn.hpp +++ b/src/plugins/intel_cpu/src/nodes/executors/mvn.hpp @@ -47,7 +47,7 @@ class MVNExecutor { virtual impl_desc_type getImplType() const = 0; - static InferenceEngine::SizeVector transformTo5DCase(const InferenceEngine::SizeVector& shape, bool initAcrossChannels); + static VectorDims transformTo5DCase(const VectorDims& shape, bool initAcrossChannels); protected: MVNAttrs mvnAttrs; diff --git a/src/plugins/intel_cpu/src/nodes/experimental_detectron_detection_output.cpp b/src/plugins/intel_cpu/src/nodes/experimental_detectron_detection_output.cpp index 0bab34c9e1131c..3fe06a6db6720c 100644 --- a/src/plugins/intel_cpu/src/nodes/experimental_detectron_detection_output.cpp +++ b/src/plugins/intel_cpu/src/nodes/experimental_detectron_detection_output.cpp @@ -223,9 +223,9 @@ bool ExperimentalDetectronDetectionOutput::needPrepareParams() const { return false; } -bool ExperimentalDetectronDetectionOutput::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool ExperimentalDetectronDetectionOutput::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { - const auto doOp = ngraph::as_type_ptr(op); + const auto doOp = ov::as_type_ptr(op); if (!doOp) { errorMessage = "Node is not an instance of the ExperimentalDetectronDetectionOutput from the operations set v6."; return false; @@ -236,14 +236,14 @@ bool ExperimentalDetectronDetectionOutput::isSupportedOperation(const std::share return true; } -ExperimentalDetectronDetectionOutput::ExperimentalDetectronDetectionOutput(const std::shared_ptr& op, +ExperimentalDetectronDetectionOutput::ExperimentalDetectronDetectionOutput(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { OPENVINO_THROW_NOT_IMPLEMENTED(errorMessage); } - auto doOp = ngraph::as_type_ptr(op); + auto doOp = ov::as_type_ptr(op); auto attributes = doOp->get_attrs(); score_threshold_ = attributes.score_threshold; diff --git a/src/plugins/intel_cpu/src/nodes/experimental_detectron_detection_output.h b/src/plugins/intel_cpu/src/nodes/experimental_detectron_detection_output.h index 72804ec6853498..3905cedac0e7cd 100644 --- a/src/plugins/intel_cpu/src/nodes/experimental_detectron_detection_output.h +++ b/src/plugins/intel_cpu/src/nodes/experimental_detectron_detection_output.h @@ -13,7 +13,7 @@ namespace node { class ExperimentalDetectronDetectionOutput : public Node { public: - ExperimentalDetectronDetectionOutput(const std::shared_ptr& op, const GraphContext::CPtr context); + ExperimentalDetectronDetectionOutput(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -23,7 +23,7 @@ class ExperimentalDetectronDetectionOutput : public Node { bool needShapeInfer() const override; bool needPrepareParams() const override; void executeDynamicImpl(dnnl::stream strm) override { execute(strm); } - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: const int INPUT_ROIS {0}; diff --git a/src/plugins/intel_cpu/src/nodes/experimental_detectron_generate_proposals_single_image.cpp b/src/plugins/intel_cpu/src/nodes/experimental_detectron_generate_proposals_single_image.cpp index 26eec464bacfbc..e02a3ee6eb69f5 100644 --- a/src/plugins/intel_cpu/src/nodes/experimental_detectron_generate_proposals_single_image.cpp +++ b/src/plugins/intel_cpu/src/nodes/experimental_detectron_generate_proposals_single_image.cpp @@ -272,9 +272,9 @@ void fill_output_blobs(const float* proposals, const int* roi_indices, } // namespace bool ExperimentalDetectronGenerateProposalsSingleImage::isSupportedOperation - (const std::shared_ptr& op, std::string& errorMessage) noexcept { + (const std::shared_ptr& op, std::string& errorMessage) noexcept { try { - const auto proposalOp = ngraph::as_type_ptr(op); + const auto proposalOp = ov::as_type_ptr(op); if (!proposalOp) { errorMessage = "Node is not an instance of the Proposal from the operations set v0."; return false; @@ -286,7 +286,7 @@ bool ExperimentalDetectronGenerateProposalsSingleImage::isSupportedOperation } ExperimentalDetectronGenerateProposalsSingleImage::ExperimentalDetectronGenerateProposalsSingleImage( - const std::shared_ptr& op, + const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; @@ -294,7 +294,7 @@ ExperimentalDetectronGenerateProposalsSingleImage::ExperimentalDetectronGenerate OPENVINO_THROW_NOT_IMPLEMENTED(errorMessage); } - auto proposalOp = ngraph::as_type_ptr(op); + auto proposalOp = ov::as_type_ptr(op); auto proposalAttrs = proposalOp->get_attrs(); min_size_ = proposalAttrs.min_size; diff --git a/src/plugins/intel_cpu/src/nodes/experimental_detectron_generate_proposals_single_image.h b/src/plugins/intel_cpu/src/nodes/experimental_detectron_generate_proposals_single_image.h index af68fb79350294..4f8f3d45a73df1 100644 --- a/src/plugins/intel_cpu/src/nodes/experimental_detectron_generate_proposals_single_image.h +++ b/src/plugins/intel_cpu/src/nodes/experimental_detectron_generate_proposals_single_image.h @@ -13,7 +13,7 @@ namespace node { class ExperimentalDetectronGenerateProposalsSingleImage : public Node { public: - ExperimentalDetectronGenerateProposalsSingleImage(const std::shared_ptr& op, + ExperimentalDetectronGenerateProposalsSingleImage(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; @@ -24,7 +24,7 @@ class ExperimentalDetectronGenerateProposalsSingleImage : public Node { bool needShapeInfer() const override; bool needPrepareParams() const override; void executeDynamicImpl(dnnl::stream strm) override { execute(strm); } - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: // Inputs: diff --git a/src/plugins/intel_cpu/src/nodes/experimental_detectron_priorgridgenerator.cpp b/src/plugins/intel_cpu/src/nodes/experimental_detectron_priorgridgenerator.cpp index 2fc0b9da05ff25..65446f0f602b20 100644 --- a/src/plugins/intel_cpu/src/nodes/experimental_detectron_priorgridgenerator.cpp +++ b/src/plugins/intel_cpu/src/nodes/experimental_detectron_priorgridgenerator.cpp @@ -14,7 +14,7 @@ namespace ov { namespace intel_cpu { namespace node { -bool ExperimentalDetectronPriorGridGenerator::isSupportedOperation(const std::shared_ptr& op, +bool ExperimentalDetectronPriorGridGenerator::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const auto priorGridGen = std::dynamic_pointer_cast(op); @@ -29,7 +29,7 @@ bool ExperimentalDetectronPriorGridGenerator::isSupportedOperation(const std::sh } ExperimentalDetectronPriorGridGenerator::ExperimentalDetectronPriorGridGenerator( - const std::shared_ptr& op, + const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; diff --git a/src/plugins/intel_cpu/src/nodes/experimental_detectron_priorgridgenerator.h b/src/plugins/intel_cpu/src/nodes/experimental_detectron_priorgridgenerator.h index c7b635dba90448..dd5d0a7e831979 100644 --- a/src/plugins/intel_cpu/src/nodes/experimental_detectron_priorgridgenerator.h +++ b/src/plugins/intel_cpu/src/nodes/experimental_detectron_priorgridgenerator.h @@ -13,7 +13,7 @@ namespace node { class ExperimentalDetectronPriorGridGenerator : public Node { public: - ExperimentalDetectronPriorGridGenerator(const std::shared_ptr& op, const GraphContext::CPtr context); + ExperimentalDetectronPriorGridGenerator(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -22,7 +22,7 @@ class ExperimentalDetectronPriorGridGenerator : public Node { bool needPrepareParams() const override; void executeDynamicImpl(dnnl::stream strm) override { execute(strm); } - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: // Inputs: diff --git a/src/plugins/intel_cpu/src/nodes/experimental_detectron_roifeatureextractor.cpp b/src/plugins/intel_cpu/src/nodes/experimental_detectron_roifeatureextractor.cpp index 1c163afc8db095..5996850b642f5a 100644 --- a/src/plugins/intel_cpu/src/nodes/experimental_detectron_roifeatureextractor.cpp +++ b/src/plugins/intel_cpu/src/nodes/experimental_detectron_roifeatureextractor.cpp @@ -281,7 +281,7 @@ void split_points(const std::vector& ids, std::vector& rois_per_level, } // namespace -bool ExperimentalDetectronROIFeatureExtractor::isSupportedOperation(const std::shared_ptr& op, +bool ExperimentalDetectronROIFeatureExtractor::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const auto roiFeatureExtractor = std::dynamic_pointer_cast(op); @@ -296,7 +296,7 @@ bool ExperimentalDetectronROIFeatureExtractor::isSupportedOperation(const std::s } ExperimentalDetectronROIFeatureExtractor::ExperimentalDetectronROIFeatureExtractor( - const std::shared_ptr& op, + const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; diff --git a/src/plugins/intel_cpu/src/nodes/experimental_detectron_roifeatureextractor.h b/src/plugins/intel_cpu/src/nodes/experimental_detectron_roifeatureextractor.h index 6c6d662a2c51a4..bfeeed8b0089b2 100644 --- a/src/plugins/intel_cpu/src/nodes/experimental_detectron_roifeatureextractor.h +++ b/src/plugins/intel_cpu/src/nodes/experimental_detectron_roifeatureextractor.h @@ -13,7 +13,7 @@ namespace node { class ExperimentalDetectronROIFeatureExtractor : public Node { public: - ExperimentalDetectronROIFeatureExtractor(const std::shared_ptr& op, const GraphContext::CPtr context); + ExperimentalDetectronROIFeatureExtractor(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -23,7 +23,7 @@ class ExperimentalDetectronROIFeatureExtractor : public Node { bool needPrepareParams() const override { return false; }; void executeDynamicImpl(dnnl::stream strm) override { execute(strm); }; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: const int INPUT_ROIS {0}; diff --git a/src/plugins/intel_cpu/src/nodes/experimental_detectron_topkrois.cpp b/src/plugins/intel_cpu/src/nodes/experimental_detectron_topkrois.cpp index 7db4ef752001a6..6227715e67c73f 100644 --- a/src/plugins/intel_cpu/src/nodes/experimental_detectron_topkrois.cpp +++ b/src/plugins/intel_cpu/src/nodes/experimental_detectron_topkrois.cpp @@ -17,7 +17,7 @@ namespace ov { namespace intel_cpu { namespace node { -bool ExperimentalDetectronTopKROIs::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool ExperimentalDetectronTopKROIs::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const auto topKROI = std::dynamic_pointer_cast(op); if (!topKROI) { @@ -30,7 +30,7 @@ bool ExperimentalDetectronTopKROIs::isSupportedOperation(const std::shared_ptr& op, +ExperimentalDetectronTopKROIs::ExperimentalDetectronTopKROIs(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; diff --git a/src/plugins/intel_cpu/src/nodes/experimental_detectron_topkrois.h b/src/plugins/intel_cpu/src/nodes/experimental_detectron_topkrois.h index 4cf13ae0cf4b35..3385cfdc29d4b2 100644 --- a/src/plugins/intel_cpu/src/nodes/experimental_detectron_topkrois.h +++ b/src/plugins/intel_cpu/src/nodes/experimental_detectron_topkrois.h @@ -13,7 +13,7 @@ namespace node { class ExperimentalDetectronTopKROIs : public Node { public: - ExperimentalDetectronTopKROIs(const std::shared_ptr& op, const GraphContext::CPtr context); + ExperimentalDetectronTopKROIs(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -24,7 +24,7 @@ class ExperimentalDetectronTopKROIs : public Node { bool needPrepareParams() const override { return false; }; void executeDynamicImpl(dnnl::stream strm) override { execute(strm); }; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: // Inputs: diff --git a/src/plugins/intel_cpu/src/nodes/extract_image_patches.cpp b/src/plugins/intel_cpu/src/nodes/extract_image_patches.cpp index 6f2cb1f613e25d..f4504bf2336563 100644 --- a/src/plugins/intel_cpu/src/nodes/extract_image_patches.cpp +++ b/src/plugins/intel_cpu/src/nodes/extract_image_patches.cpp @@ -277,16 +277,16 @@ struct jit_extract_image_patches_kernel : public jit_uni_extract_image_patches_k }; #endif // OPENVINO_ARCH_X86_64 -bool ExtractImagePatches::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool ExtractImagePatches::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { - auto extImgPatcher = ngraph::as_type_ptr(op); + auto extImgPatcher = ov::as_type_ptr(op); if (!extImgPatcher) { errorMessage = "Only opset3 ExtractImagePatches operation is supported"; return false; } const auto padValue = extImgPatcher->get_auto_pad(); if (!one_of(padValue, ngraph::op::PadType::VALID, ngraph::op::PadType::SAME_LOWER, ngraph::op::PadType::SAME_UPPER)) { - errorMessage = "Does not support pad type: " + ngraph::as_string(padValue); + errorMessage = "Does not support pad type: " + ov::as_string(padValue); return false; } if (!everyone_is(2u, extImgPatcher->get_sizes().size(), extImgPatcher->get_strides().size(), extImgPatcher->get_rates().size())) { @@ -333,7 +333,7 @@ bool ExtractImagePatchesKey::operator==(const ExtractImagePatchesKey& rhs) const } } // namespace -ExtractImagePatches::ExtractImagePatches(const std::shared_ptr& op, const GraphContext::CPtr context) +ExtractImagePatches::ExtractImagePatches(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { @@ -341,7 +341,7 @@ ExtractImagePatches::ExtractImagePatches(const std::shared_ptr& op } errorPrefix = "ExtractImagePatches layer with name '" + op->get_friendly_name() + "' "; - auto extImgPatcher = ngraph::as_type_ptr(op); + auto extImgPatcher = ov::as_type_ptr(op); if (inputShapes.size() != 1 || outputShapes.size() != 1) OPENVINO_THROW(errorPrefix, diff --git a/src/plugins/intel_cpu/src/nodes/extract_image_patches.h b/src/plugins/intel_cpu/src/nodes/extract_image_patches.h index 9e9b708e348e7e..5d9c4c3b71cd7e 100644 --- a/src/plugins/intel_cpu/src/nodes/extract_image_patches.h +++ b/src/plugins/intel_cpu/src/nodes/extract_image_patches.h @@ -44,7 +44,7 @@ struct jit_uni_extract_image_patches_kernel { class ExtractImagePatches : public Node { public: - ExtractImagePatches(const std::shared_ptr& op, const GraphContext::CPtr context); + ExtractImagePatches(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -54,7 +54,7 @@ class ExtractImagePatches : public Node { void executeDynamicImpl(dnnl::stream strm) override; void prepareParams() override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; enum class ExtImgPatcherPadType { VALID, SAME_LOWER, diff --git a/src/plugins/intel_cpu/src/nodes/eye.cpp b/src/plugins/intel_cpu/src/nodes/eye.cpp index 8534035277b99f..9edf2480ee4e6e 100644 --- a/src/plugins/intel_cpu/src/nodes/eye.cpp +++ b/src/plugins/intel_cpu/src/nodes/eye.cpp @@ -55,8 +55,8 @@ Eye::Eye(const std::shared_ptr& op, const GraphContext::CPtr context) } outType = op->get_output_element_type(0); withBatchShape = (op->get_input_size() == 4); - if (!one_of(outType, ngraph::element::f32, ngraph::element::bf16, - ngraph::element::i32, ngraph::element::i8, ngraph::element::u8)) { + if (!one_of(outType, ov::element::f32, ov::element::bf16, + ov::element::i32, ov::element::i8, ov::element::u8)) { THROW_ERROR(errorPrefix, "doesn't support demanded output precision"); } } diff --git a/src/plugins/intel_cpu/src/nodes/eye.h b/src/plugins/intel_cpu/src/nodes/eye.h index 40bd290a4c5a19..cfd8698c38dd2a 100644 --- a/src/plugins/intel_cpu/src/nodes/eye.h +++ b/src/plugins/intel_cpu/src/nodes/eye.h @@ -22,7 +22,7 @@ class Eye : public Node { static constexpr size_t BATCH_SHAPE = 3lu; public: - Eye(const std::shared_ptr& op, const GraphContext::CPtr context); + Eye(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; @@ -32,7 +32,7 @@ class Eye : public Node { bool needShapeInfer() const override {return true;}; void executeDynamicImpl(dnnl::stream strm) override { execute(strm); } - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: std::string errorPrefix = ""; diff --git a/src/plugins/intel_cpu/src/nodes/fake_quantize.cpp b/src/plugins/intel_cpu/src/nodes/fake_quantize.cpp index be967d2d55d8a4..ef8b6c335a1acc 100644 --- a/src/plugins/intel_cpu/src/nodes/fake_quantize.cpp +++ b/src/plugins/intel_cpu/src/nodes/fake_quantize.cpp @@ -864,7 +864,7 @@ struct jit_uni_quantization_kernel : public jit_uni_quantize_kernel, public jit_ } }; #endif -bool FakeQuantize::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool FakeQuantize::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const auto fq = std::dynamic_pointer_cast(op); if (!fq) { @@ -892,7 +892,7 @@ bool FakeQuantize::isSupportedOperation(const std::shared_ptrget_input_shape(i), dataRank); - if (ngraph::shape_size(shape) != 1) { + if (ov::shape_size(shape) != 1) { size_t not_unit_axis = 0; for (size_t i = 0; i < shape.size(); i++) { if (shape[i] > 1) { @@ -916,7 +916,7 @@ bool FakeQuantize::isSupportedOperation(const std::shared_ptrget_auto_broadcast().m_type != ngraph::op::AutoBroadcastType::NONE && fq->get_auto_broadcast().m_type != ngraph::op::AutoBroadcastType::NUMPY) { - errorMessage = "Doesn't support broadcast type: " + ngraph::as_string(fq->get_auto_broadcast().m_type); + errorMessage = "Doesn't support broadcast type: " + ov::as_string(fq->get_auto_broadcast().m_type); return false; } } catch (...) { @@ -960,7 +960,7 @@ struct FakeQuantKey { }; } // namespace -FakeQuantize::FakeQuantize(const std::shared_ptr& op, const GraphContext::CPtr context) : +FakeQuantize::FakeQuantize(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, PassThroughShapeInferFactory()) { std::string errorMessage; if (isSupportedOperation(op, errorMessage)) { @@ -994,7 +994,7 @@ FakeQuantize::FakeQuantize(const std::shared_ptr& op, const GraphC const auto ilShape = getNormalizedDimsBySize(fq->get_input_shape(1), dataRank); auto inputLowAxis = initAxisIdx(ilShape); - isInputLowBroadcasted = (ngraph::is_scalar(ilShape) || ilShape[inputLowAxis] == 1); + isInputLowBroadcasted = (ov::is_scalar(ilShape) || ilShape[inputLowAxis] == 1); if (!isInputLowBroadcasted) { axis = inputLowAxis; axisSize = ilShape[inputLowAxis]; @@ -1002,7 +1002,7 @@ FakeQuantize::FakeQuantize(const std::shared_ptr& op, const GraphC const auto ihShape = getNormalizedDimsBySize(fq->get_input_shape(2), dataRank); auto inputHighAxis = initAxisIdx(ihShape); - isInputHighBroadcasted = (ngraph::is_scalar(ihShape) || ihShape[inputHighAxis] == 1); + isInputHighBroadcasted = (ov::is_scalar(ihShape) || ihShape[inputHighAxis] == 1); if (!isInputHighBroadcasted) { axis = inputHighAxis; axisSize = ihShape[inputHighAxis]; @@ -1010,7 +1010,7 @@ FakeQuantize::FakeQuantize(const std::shared_ptr& op, const GraphC const auto olShape = getNormalizedDimsBySize(fq->get_input_shape(3), dataRank); auto outputLowAxis = initAxisIdx(olShape); - isOutputLowBroadcasted = (ngraph::is_scalar(olShape) || olShape[outputLowAxis] == 1); + isOutputLowBroadcasted = (ov::is_scalar(olShape) || olShape[outputLowAxis] == 1); if (!isOutputLowBroadcasted) { axis = outputLowAxis; axisSize = olShape[outputLowAxis]; @@ -1018,16 +1018,16 @@ FakeQuantize::FakeQuantize(const std::shared_ptr& op, const GraphC const auto ohShape = getNormalizedDimsBySize(fq->get_input_shape(4), dataRank); auto outputHighAxis = initAxisIdx(ohShape); - isOutputHighBroadcasted = (ngraph::is_scalar(ohShape) || ohShape[outputHighAxis] == 1); + isOutputHighBroadcasted = (ov::is_scalar(ohShape) || ohShape[outputHighAxis] == 1); if (!isOutputHighBroadcasted) { axis = outputHighAxis; axisSize = ohShape[outputHighAxis]; } - auto inputLowAxisSize = ngraph::is_scalar(ilShape) ? 1 : ilShape[inputLowAxis]; - auto inputHighAxisSize = ngraph::is_scalar(ihShape) ? 1 : ihShape[inputHighAxis]; - auto outputLowAxisSize = ngraph::is_scalar(olShape) ? 1 : olShape[outputLowAxis]; - auto outputHighAxisSize = ngraph::is_scalar(ohShape) ? 1 : ohShape[outputHighAxis]; + auto inputLowAxisSize = ov::is_scalar(ilShape) ? 1 : ilShape[inputLowAxis]; + auto inputHighAxisSize = ov::is_scalar(ihShape) ? 1 : ihShape[inputHighAxis]; + auto outputLowAxisSize = ov::is_scalar(olShape) ? 1 : olShape[outputLowAxis]; + auto outputHighAxisSize = ov::is_scalar(ohShape) ? 1 : ohShape[outputHighAxis]; if (axisSize != -1 && !dimsEqualWeak(axisSize, getInputShapeAtPort(0).getDims()[axis])) { OPENVINO_THROW(errorPrefix, "has different quantization axis size on 'data' and 'range' inputs"); diff --git a/src/plugins/intel_cpu/src/nodes/fake_quantize.h b/src/plugins/intel_cpu/src/nodes/fake_quantize.h index d791457bec8272..23e8c03008a1d8 100644 --- a/src/plugins/intel_cpu/src/nodes/fake_quantize.h +++ b/src/plugins/intel_cpu/src/nodes/fake_quantize.h @@ -77,7 +77,7 @@ struct jit_uni_quantize_kernel { class FakeQuantize : public Node { public: - FakeQuantize(const std::shared_ptr& op, const GraphContext::CPtr context); + FakeQuantize(const std::shared_ptr& op, const GraphContext::CPtr context); void initSupportedPrimitiveDescriptors() override; void getSupportedDescriptors() override; @@ -142,7 +142,7 @@ class FakeQuantize : public Node { bool allowBinary = true, bool do_rounding = true); - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; enum BroadcastingPolicy { PerChannel, // all FQ operations are per channel diff --git a/src/plugins/intel_cpu/src/nodes/fullyconnected.cpp b/src/plugins/intel_cpu/src/nodes/fullyconnected.cpp index 4f31353e3bad76..0b48a766cf3c03 100644 --- a/src/plugins/intel_cpu/src/nodes/fullyconnected.cpp +++ b/src/plugins/intel_cpu/src/nodes/fullyconnected.cpp @@ -98,7 +98,7 @@ bool FCKey::operator==(const FCKey &rhs) const { } // namespace -bool FullyConnected::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool FullyConnected::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const auto fc = std::dynamic_pointer_cast(op); if (!fc) { @@ -126,7 +126,7 @@ bool FullyConnected::isSupportedOperation(const std::shared_ptr& op, const GraphContext::CPtr context) +FullyConnected::FullyConnected(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, FCShapeInferFactory(op)), withBiases(false) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) diff --git a/src/plugins/intel_cpu/src/nodes/fullyconnected.h b/src/plugins/intel_cpu/src/nodes/fullyconnected.h index 956767bcea1219..328fd68811278f 100644 --- a/src/plugins/intel_cpu/src/nodes/fullyconnected.h +++ b/src/plugins/intel_cpu/src/nodes/fullyconnected.h @@ -18,7 +18,7 @@ namespace node { class FullyConnected : public Node { public: - FullyConnected(const std::shared_ptr& op, const GraphContext::CPtr context); + FullyConnected(const std::shared_ptr& op, const GraphContext::CPtr context); std::vector getAvailableFormatsForDims(const Shape &dims) const override; void getSupportedDescriptors() override; @@ -51,7 +51,7 @@ class FullyConnected : public Node { bool canFuse(const NodePtr& node) const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; void prepareParams() override; void executeDynamicImpl(dnnl::stream strm) override; diff --git a/src/plugins/intel_cpu/src/nodes/gather.h b/src/plugins/intel_cpu/src/nodes/gather.h index f03a08832a66f5..bc91b106cf573a 100644 --- a/src/plugins/intel_cpu/src/nodes/gather.h +++ b/src/plugins/intel_cpu/src/nodes/gather.h @@ -17,7 +17,7 @@ namespace node { class Gather : public Node { public: - Gather(const std::shared_ptr& op, const GraphContext::CPtr context); + Gather(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -27,7 +27,7 @@ class Gather : public Node { bool isExecutable() const override; void resolveInPlaceEdges(Edge::LOOK look) override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; struct threadExecParams { std::vector specIdxInBytes; diff --git a/src/plugins/intel_cpu/src/nodes/gather_elements.cpp b/src/plugins/intel_cpu/src/nodes/gather_elements.cpp index 1eb4a76a4b458c..b6f4f6988514d3 100644 --- a/src/plugins/intel_cpu/src/nodes/gather_elements.cpp +++ b/src/plugins/intel_cpu/src/nodes/gather_elements.cpp @@ -32,7 +32,7 @@ bool GatherElements::isSupportedOperation(const std::shared_ptr& return true; } -GatherElements::GatherElements(const std::shared_ptr& op, const GraphContext::CPtr context) +GatherElements::GatherElements(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/gather_elements.h b/src/plugins/intel_cpu/src/nodes/gather_elements.h index 47a678c6245cef..0a31cb33dfaee9 100644 --- a/src/plugins/intel_cpu/src/nodes/gather_elements.h +++ b/src/plugins/intel_cpu/src/nodes/gather_elements.h @@ -16,7 +16,7 @@ namespace node { class GatherElements : public Node { public: - GatherElements(const std::shared_ptr& op, const GraphContext::CPtr context); + GatherElements(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; diff --git a/src/plugins/intel_cpu/src/nodes/gather_nd.cpp b/src/plugins/intel_cpu/src/nodes/gather_nd.cpp index 24cd6edcb20d0d..f2956a2b1cd862 100644 --- a/src/plugins/intel_cpu/src/nodes/gather_nd.cpp +++ b/src/plugins/intel_cpu/src/nodes/gather_nd.cpp @@ -21,7 +21,7 @@ namespace ov { namespace intel_cpu { namespace node { -bool GatherND::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool GatherND::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { if (!one_of(op->get_type_info(), ngraph::op::v5::GatherND::get_type_info_static(), ngraph::op::v8::GatherND::get_type_info_static())) { errorMessage = "Node is not an instance of the GatherND operation from operation set v5 and v8."; @@ -34,7 +34,7 @@ bool GatherND::isSupportedOperation(const std::shared_ptr& o return true; } -GatherND::GatherND(const std::shared_ptr& op, const GraphContext::CPtr context) +GatherND::GatherND(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { @@ -47,9 +47,9 @@ GatherND::GatherND(const std::shared_ptr& op, const GraphContext:: const size_t dataInputRank = getInputShapeAtPort(GATHERND_DATA).getRank(); const size_t indicesInputRank = getInputShapeAtPort(GATHERND_INDEXES).getRank(); - if (auto gatherNdOp = ngraph::as_type_ptr(op)) { + if (auto gatherNdOp = ov::as_type_ptr(op)) { attrs.batchDims = gatherNdOp->get_batch_dims(); - } else if (auto gatherNdOp = ngraph::as_type_ptr(op)) { + } else if (auto gatherNdOp = ov::as_type_ptr(op)) { attrs.batchDims = gatherNdOp->get_batch_dims(); } else { THROW_ERROR("has support only opset5."); diff --git a/src/plugins/intel_cpu/src/nodes/gather_nd.h b/src/plugins/intel_cpu/src/nodes/gather_nd.h index 0fec5e23337354..998652d4cc27cd 100644 --- a/src/plugins/intel_cpu/src/nodes/gather_nd.h +++ b/src/plugins/intel_cpu/src/nodes/gather_nd.h @@ -16,14 +16,14 @@ namespace node { class GatherND : public Node { public: - GatherND(const std::shared_ptr& op, const GraphContext::CPtr context); + GatherND(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; void execute(dnnl::stream strm) override; bool created() const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; protected: void executeDynamicImpl(dnnl::stream strm) override; diff --git a/src/plugins/intel_cpu/src/nodes/gather_tree.cpp b/src/plugins/intel_cpu/src/nodes/gather_tree.cpp index aaef5c7d29a089..5eb1ab5d66c897 100644 --- a/src/plugins/intel_cpu/src/nodes/gather_tree.cpp +++ b/src/plugins/intel_cpu/src/nodes/gather_tree.cpp @@ -17,9 +17,9 @@ namespace ov { namespace intel_cpu { namespace node { -bool GatherTree::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool GatherTree::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { - const auto gatherElementsOp = ngraph::as_type_ptr(op); + const auto gatherElementsOp = ov::as_type_ptr(op); if (!gatherElementsOp) { errorMessage = "Node is not an instance of the GatherTree operation from operation set v1."; return false; @@ -30,7 +30,7 @@ bool GatherTree::isSupportedOperation(const std::shared_ptr& return true; } -GatherTree::GatherTree(const std::shared_ptr& op, const GraphContext::CPtr context) +GatherTree::GatherTree(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/gather_tree.h b/src/plugins/intel_cpu/src/nodes/gather_tree.h index d67dc088f9242e..8ad82a22b777e5 100644 --- a/src/plugins/intel_cpu/src/nodes/gather_tree.h +++ b/src/plugins/intel_cpu/src/nodes/gather_tree.h @@ -13,7 +13,7 @@ namespace node { class GatherTree : public Node { public: - GatherTree(const std::shared_ptr& op, const GraphContext::CPtr context); + GatherTree(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -23,7 +23,7 @@ class GatherTree : public Node { void prepareParams() override; void executeDynamicImpl(dnnl::stream strm) override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: struct GatherTreeExecutor { diff --git a/src/plugins/intel_cpu/src/nodes/generate_proposals.cpp b/src/plugins/intel_cpu/src/nodes/generate_proposals.cpp index 842e1f0d61b37b..37ebaac5dfe3e4 100644 --- a/src/plugins/intel_cpu/src/nodes/generate_proposals.cpp +++ b/src/plugins/intel_cpu/src/nodes/generate_proposals.cpp @@ -277,9 +277,9 @@ void fill_output_blobs(const float* proposals, const int* roi_indices, } // namespace bool GenerateProposals::isSupportedOperation - (const std::shared_ptr& op, std::string& errorMessage) noexcept { + (const std::shared_ptr& op, std::string& errorMessage) noexcept { try { - if (!ngraph::as_type_ptr(op)) { + if (!ov::as_type_ptr(op)) { errorMessage = "Node is not an instance of the Proposal from the operations set v0."; return false; } @@ -289,14 +289,14 @@ bool GenerateProposals::isSupportedOperation return true; } -GenerateProposals::GenerateProposals(const std::shared_ptr& op, const GraphContext::CPtr context) +GenerateProposals::GenerateProposals(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, InternalDynShapeInferFactory()) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { OPENVINO_THROW_NOT_IMPLEMENTED(errorMessage); } - auto proposalOp = ngraph::as_type_ptr(op); + auto proposalOp = ov::as_type_ptr(op); auto proposalAttrs = proposalOp->get_attrs(); min_size_ = proposalAttrs.min_size; diff --git a/src/plugins/intel_cpu/src/nodes/generate_proposals.h b/src/plugins/intel_cpu/src/nodes/generate_proposals.h index d8dd2c306074aa..efa5d8936903d0 100644 --- a/src/plugins/intel_cpu/src/nodes/generate_proposals.h +++ b/src/plugins/intel_cpu/src/nodes/generate_proposals.h @@ -13,7 +13,7 @@ namespace node { class GenerateProposals : public Node { public: - GenerateProposals(const std::shared_ptr& op, const GraphContext::CPtr context); + GenerateProposals(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -23,7 +23,7 @@ class GenerateProposals : public Node { bool needShapeInfer() const override; bool needPrepareParams() const override; void executeDynamicImpl(dnnl::stream strm) override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: // Inputs: diff --git a/src/plugins/intel_cpu/src/nodes/grn.cpp b/src/plugins/intel_cpu/src/nodes/grn.cpp index baa58ba5b40fcc..3c51afa4717baa 100644 --- a/src/plugins/intel_cpu/src/nodes/grn.cpp +++ b/src/plugins/intel_cpu/src/nodes/grn.cpp @@ -14,7 +14,7 @@ namespace ov { namespace intel_cpu { namespace node { -bool GRN::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool GRN::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const auto grn = std::dynamic_pointer_cast(op); if (!grn) { @@ -27,7 +27,7 @@ bool GRN::isSupportedOperation(const std::shared_ptr& op, st return true; } -GRN::GRN(const std::shared_ptr& op, const GraphContext::CPtr context) +GRN::GRN(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/grn.h b/src/plugins/intel_cpu/src/nodes/grn.h index fabf87138ba676..5ca539d3ee2523 100644 --- a/src/plugins/intel_cpu/src/nodes/grn.h +++ b/src/plugins/intel_cpu/src/nodes/grn.h @@ -13,7 +13,7 @@ namespace node { class GRN : public Node { public: - GRN(const std::shared_ptr& op, const GraphContext::CPtr context); + GRN(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -23,7 +23,7 @@ class GRN : public Node { void prepareParams() override; void executeDynamicImpl(dnnl::stream strm) override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: float bias = 1.0f; diff --git a/src/plugins/intel_cpu/src/nodes/input.cpp b/src/plugins/intel_cpu/src/nodes/input.cpp index 7d97e3d6b466a4..1db2f9e011862c 100644 --- a/src/plugins/intel_cpu/src/nodes/input.cpp +++ b/src/plugins/intel_cpu/src/nodes/input.cpp @@ -233,7 +233,7 @@ jit_has_subnormals_base::fn_t jit_has_subnormals_function() { } // namespace #endif -Input::Input(const std::shared_ptr& op, const GraphContext::CPtr context) +Input::Input(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, PassThroughShapeInferFactory()) { if (!one_of(op->get_type_info(), v0::Parameter::get_type_info_static(), @@ -248,7 +248,7 @@ Input::Input(const std::shared_ptr& op, const GraphContext::CPtr c constant = ConstantType::NoConst; - constOp = ngraph::as_type_ptr(op); + constOp = ov::as_type_ptr(op); if (constOp) { constant = ConstantType::Const; cloneBlobIfRequired(); @@ -256,7 +256,7 @@ Input::Input(const std::shared_ptr& op, const GraphContext::CPtr c } void Input::cloneBlobIfRequired() { - Shape shape(constOp->get_shape().empty() ? ngraph::Shape(1, 1) : constOp->get_shape()); + Shape shape(constOp->get_shape().empty() ? ov::Shape(1, 1) : constOp->get_shape()); const auto prec = convertPrecision(constOp->get_element_type()); const size_t size = shape.getElementsCount(); CpuBlockedMemoryDesc memDesc(prec, shape); diff --git a/src/plugins/intel_cpu/src/nodes/input.h b/src/plugins/intel_cpu/src/nodes/input.h index 71ae6b91e7660c..32b3347fbfced7 100644 --- a/src/plugins/intel_cpu/src/nodes/input.h +++ b/src/plugins/intel_cpu/src/nodes/input.h @@ -15,7 +15,7 @@ namespace node { class Input : public Node { public: - Input(const std::shared_ptr& op, const GraphContext::CPtr context); + Input(const std::shared_ptr& op, const GraphContext::CPtr context); Input(const Shape& shape, const InferenceEngine::Precision& prc, const std::string& name, diff --git a/src/plugins/intel_cpu/src/nodes/interaction.cpp b/src/plugins/intel_cpu/src/nodes/interaction.cpp index e1635f2c799a96..077722ef051fd8 100644 --- a/src/plugins/intel_cpu/src/nodes/interaction.cpp +++ b/src/plugins/intel_cpu/src/nodes/interaction.cpp @@ -164,7 +164,7 @@ struct jit_move_scale_kernel : public jit_uni_move_scale_kernel, public jit_gene #endif // OPENVINO_ARCH_X86_64 -Interaction::Interaction(const std::shared_ptr& op, const GraphContext::CPtr context) +Interaction::Interaction(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { @@ -361,7 +361,7 @@ bool Interaction::isExecutable() const { return true; } -bool Interaction::isSupportedOperation(const std::shared_ptr& op, +bool Interaction::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const auto interaction = std::dynamic_pointer_cast(op); diff --git a/src/plugins/intel_cpu/src/nodes/interaction.h b/src/plugins/intel_cpu/src/nodes/interaction.h index 122ae3b2addc8c..2531b67c50f859 100644 --- a/src/plugins/intel_cpu/src/nodes/interaction.h +++ b/src/plugins/intel_cpu/src/nodes/interaction.h @@ -46,13 +46,13 @@ struct jit_uni_move_scale_kernel { class Interaction : public Node { public: - Interaction(const std::shared_ptr& op, const GraphContext::CPtr context); + Interaction(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; void execute(dnnl::stream strm) override; bool created() const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; bool isExecutable() const override; void executeDynamicImpl(dnnl::stream strm) override; diff --git a/src/plugins/intel_cpu/src/nodes/interpolate.cpp b/src/plugins/intel_cpu/src/nodes/interpolate.cpp index 83cffd6ab47c40..6a76c61e1d85ff 100644 --- a/src/plugins/intel_cpu/src/nodes/interpolate.cpp +++ b/src/plugins/intel_cpu/src/nodes/interpolate.cpp @@ -1663,20 +1663,20 @@ using ngInterpCoordTransf = ngraph::opset4::Interpolate::CoordinateTransformMode using ngInterpNearMode = ngraph::opset4::Interpolate::NearestMode; using ngInterpShapeCalcMode = ngraph::opset4::Interpolate::ShapeCalcMode; -bool Interpolate::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool Interpolate::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { if (const auto interp = std::dynamic_pointer_cast(op)) { const auto &interpAttr = interp->get_attrs(); const auto &interpMode = interpAttr.mode; if (!one_of(interpMode, ngInterpMode::NEAREST, ngInterpMode::LINEAR, ngInterpMode::LINEAR_ONNX, ngInterpMode::CUBIC)) { - errorMessage = "Interpolate-4 does not support interpolate mode: " + ngraph::as_string(interpMode); + errorMessage = "Interpolate-4 does not support interpolate mode: " + ov::as_string(interpMode); return false; } const auto &interpCoordTransMode = interpAttr.coordinate_transformation_mode; if (!one_of(interpCoordTransMode, ngInterpCoordTransf::HALF_PIXEL, ngInterpCoordTransf::PYTORCH_HALF_PIXEL, ngInterpCoordTransf::ASYMMETRIC, ngInterpCoordTransf::TF_HALF_PIXEL_FOR_NN, ngInterpCoordTransf::ALIGN_CORNERS)) { - errorMessage = "Interpolate-4 does not support coordinate transformation mode: " + ngraph::as_string(interpCoordTransMode); + errorMessage = "Interpolate-4 does not support coordinate transformation mode: " + ov::as_string(interpCoordTransMode); return false; } @@ -1684,14 +1684,14 @@ bool Interpolate::isSupportedOperation(const std::shared_ptr const auto &interpNearestMode = interpAttr.nearest_mode; if (!one_of(interpNearestMode, ngInterpNearMode::ROUND_PREFER_FLOOR, ngInterpNearMode::ROUND_PREFER_CEIL, ngInterpNearMode::FLOOR, ngInterpNearMode::CEIL, ngInterpNearMode::SIMPLE)) { - errorMessage = "Interpolate-4 does not support nearest round mode: " + ngraph::as_string(interpNearestMode); + errorMessage = "Interpolate-4 does not support nearest round mode: " + ov::as_string(interpNearestMode); return false; } } const auto &interpShapeCalcMode = interpAttr.shape_calculation_mode; if (!one_of(interpShapeCalcMode, ngInterpShapeCalcMode::SCALES, ngInterpShapeCalcMode::SIZES)) { - errorMessage = "Interpolate-4 does not support shape_calculation_mode: " + ngraph::as_string(interpShapeCalcMode); + errorMessage = "Interpolate-4 does not support shape_calculation_mode: " + ov::as_string(interpShapeCalcMode); return false; } @@ -1707,7 +1707,7 @@ bool Interpolate::isSupportedOperation(const std::shared_ptr } if (!isDynamicNgraphNode(op) && interpShapeCalcMode == ngInterpShapeCalcMode::SCALES && - !ngraph::is_type(op->get_input_node_ptr(SCALES_ID))) { + !ov::is_type(op->get_input_node_ptr(SCALES_ID))) { errorMessage = "Only const 'scales' input is supported for static shapes in Interpolate-4"; return false; } @@ -1721,12 +1721,12 @@ bool Interpolate::isSupportedOperation(const std::shared_ptr const auto &interpAttr = interp->get_attrs(); const auto &interpMode = interpAttr.mode; if (!one_of(interpMode, ngInterpMode::BILINEAR_PILLOW, ngInterpMode::BICUBIC_PILLOW)) { - errorMessage = "Interpolate-11 does not support interpolate mode: " + ngraph::as_string(interpMode); + errorMessage = "Interpolate-11 does not support interpolate mode: " + ov::as_string(interpMode); return false; } const auto &interpShapeCalcMode = interpAttr.shape_calculation_mode; if (!one_of(interpShapeCalcMode, ngInterpShapeCalcMode::SCALES, ngInterpShapeCalcMode::SIZES)) { - errorMessage = "Interpolate-11 does not support shape_calculation_mode: " + ngraph::as_string(interpShapeCalcMode); + errorMessage = "Interpolate-11 does not support shape_calculation_mode: " + ov::as_string(interpShapeCalcMode); return false; } const size_t dataRank = interp->get_input_partial_shape(DATA_ID).rank().get_length(); @@ -1736,7 +1736,7 @@ bool Interpolate::isSupportedOperation(const std::shared_ptr return false; } if (!isDynamicNgraphNode(op) && - !ngraph::is_type(op->get_input_node_ptr(SIZE_OR_SCALE_ID_V11))) { + !ov::is_type(op->get_input_node_ptr(SIZE_OR_SCALE_ID_V11))) { errorMessage = "Only const 'scales_or_sizes' input is supported for static shapes in Interpolate-11"; return false; } @@ -1762,7 +1762,7 @@ namespace { */ class InterpolateShapeInferFactory : public ShapeInferFactory { public: - InterpolateShapeInferFactory(std::shared_ptr op) : m_op(op) {} + InterpolateShapeInferFactory(std::shared_ptr op) : m_op(op) {} ShapeInferPtr makeShapeInfer() const override { IShapeInfer::port_mask_t port_mask = 0x00; if (auto interp4 = ov::as_type_ptr(m_op)) { @@ -1788,11 +1788,11 @@ class InterpolateShapeInferFactory : public ShapeInferFactory { } private: - std::shared_ptr m_op; + std::shared_ptr m_op; }; } // namespace -Interpolate::Interpolate(const std::shared_ptr& op, const GraphContext::CPtr context) +Interpolate::Interpolate(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, InterpolateShapeInferFactory(op)) { std::string errorMessage; if (isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/interpolate.h b/src/plugins/intel_cpu/src/nodes/interpolate.h index cfa3ca80f0e294..35dcb27d463a0d 100644 --- a/src/plugins/intel_cpu/src/nodes/interpolate.h +++ b/src/plugins/intel_cpu/src/nodes/interpolate.h @@ -78,7 +78,7 @@ class Interpolate : public Node { static constexpr float PILLOW_BICUBIC_WINDOW_SCALE = 2.0f; public: - Interpolate(const std::shared_ptr& op, const GraphContext::CPtr context); + Interpolate(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; @@ -91,7 +91,7 @@ class Interpolate : public Node { } bool canFuse(const NodePtr& node) const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; bool needShapeInfer() const override; bool needPrepareParams() const override; diff --git a/src/plugins/intel_cpu/src/nodes/log_softmax.cpp b/src/plugins/intel_cpu/src/nodes/log_softmax.cpp index 8d625042557727..8de8546647bb9a 100644 --- a/src/plugins/intel_cpu/src/nodes/log_softmax.cpp +++ b/src/plugins/intel_cpu/src/nodes/log_softmax.cpp @@ -14,7 +14,7 @@ namespace ov { namespace intel_cpu { namespace node { -bool LogSoftmax::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool LogSoftmax::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const auto logSoftMax = std::dynamic_pointer_cast(op); if (!logSoftMax) { @@ -27,7 +27,7 @@ bool LogSoftmax::isSupportedOperation(const std::shared_ptr& return true; } -LogSoftmax::LogSoftmax(const std::shared_ptr& op, const GraphContext::CPtr context) +LogSoftmax::LogSoftmax(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/log_softmax.h b/src/plugins/intel_cpu/src/nodes/log_softmax.h index 7adf1a3961166a..c6018c412d2ad8 100644 --- a/src/plugins/intel_cpu/src/nodes/log_softmax.h +++ b/src/plugins/intel_cpu/src/nodes/log_softmax.h @@ -13,7 +13,7 @@ namespace node { class LogSoftmax : public Node { public: - LogSoftmax(const std::shared_ptr& op, const GraphContext::CPtr context); + LogSoftmax(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -23,7 +23,7 @@ class LogSoftmax : public Node { void prepareParams() override; void executeDynamicImpl(dnnl::stream strm) override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: int axis; diff --git a/src/plugins/intel_cpu/src/nodes/lrn.cpp b/src/plugins/intel_cpu/src/nodes/lrn.cpp index 7f1fe1ba019e03..2e4905d954ab2f 100644 --- a/src/plugins/intel_cpu/src/nodes/lrn.cpp +++ b/src/plugins/intel_cpu/src/nodes/lrn.cpp @@ -64,9 +64,9 @@ bool LrnKey::operator==(const LrnKey &rhs) const { } } // namespace -bool Lrn::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool Lrn::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { - auto lrn = ngraph::as_type_ptr(op); + auto lrn = ov::as_type_ptr(op); if (!lrn) { errorMessage = "Only opset1 LRN operation is supported"; return false; @@ -77,7 +77,7 @@ bool Lrn::isSupportedOperation(const std::shared_ptr& op, st errorMessage = "Doesn't support 'data' input with rank: " + std::to_string(dataDims.size()); return false; } - auto axesNode = ngraph::as_type_ptr(lrn->get_input_node_shared_ptr(1)); + auto axesNode = ov::as_type_ptr(lrn->get_input_node_shared_ptr(1)); if (!axesNode) { errorMessage = "Only Constant operation on 'axis' input is supported"; return false; @@ -110,14 +110,14 @@ bool Lrn::isSupportedOperation(const std::shared_ptr& op, st return true; } -Lrn::Lrn(const std::shared_ptr& op, const GraphContext::CPtr context) : +Lrn::Lrn(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, PassThroughShapeInferFactory()) { std::string errorMessage; if (isSupportedOperation(op, errorMessage)) { errorPrefix = "LRN node with name '" + getName() + "'"; - auto lrn = ngraph::as_type_ptr(op); - auto axes = ngraph::as_type_ptr(lrn->get_input_node_shared_ptr(1))->cast_vector(); + auto lrn = ov::as_type_ptr(op); + auto axes = ov::as_type_ptr(lrn->get_input_node_shared_ptr(1))->cast_vector(); bool isAcrossMaps = (axes.size() == 1 && axes[0] == 1); alg = isAcrossMaps ? dnnl::algorithm::lrn_across_channels : dnnl::algorithm::lrn_within_channel; alpha = static_cast(lrn->get_alpha()); diff --git a/src/plugins/intel_cpu/src/nodes/lrn.h b/src/plugins/intel_cpu/src/nodes/lrn.h index 84492cb53efed7..e90b632bdf49a8 100644 --- a/src/plugins/intel_cpu/src/nodes/lrn.h +++ b/src/plugins/intel_cpu/src/nodes/lrn.h @@ -17,7 +17,7 @@ namespace node { class Lrn : public Node { public: - Lrn(const std::shared_ptr& op, const GraphContext::CPtr context); + Lrn(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override; void createDescriptor(const std::vector& inputDesc, @@ -35,7 +35,7 @@ class Lrn : public Node { void execute(dnnl::stream strm) override; void executeDynamicImpl(dnnl::stream strm) override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: using executorPtr = std::shared_ptr; diff --git a/src/plugins/intel_cpu/src/nodes/mathematics.cpp b/src/plugins/intel_cpu/src/nodes/mathematics.cpp index 1e73a20b279a79..8aabef675f0d69 100644 --- a/src/plugins/intel_cpu/src/nodes/mathematics.cpp +++ b/src/plugins/intel_cpu/src/nodes/mathematics.cpp @@ -18,7 +18,7 @@ namespace ov { namespace intel_cpu { namespace node { -bool Math::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool Math::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { if (getInitializers().find(op->get_type_info()) == getInitializers().end()) { errorMessage = "Unsupported Math layer type."; @@ -26,8 +26,8 @@ bool Math::isSupportedOperation(const std::shared_ptr& op, s } if (one_of(op->get_type_info(), ngraph::op::v0::HardSigmoid::get_type_info_static(), ngraph::op::v0::Selu::get_type_info_static())) { - auto firstConst = ngraph::as_type_ptr(op->get_input_node_shared_ptr(1)); - auto secondConst = ngraph::as_type_ptr(op->get_input_node_shared_ptr(2)); + auto firstConst = ov::as_type_ptr(op->get_input_node_shared_ptr(1)); + auto secondConst = ov::as_type_ptr(op->get_input_node_shared_ptr(2)); if (!firstConst || !secondConst) { errorMessage = "Constant expected as the second and third inputs."; return false; @@ -39,7 +39,7 @@ bool Math::isSupportedOperation(const std::shared_ptr& op, s return true; } -Math::Math(const std::shared_ptr& op, const GraphContext::CPtr context) +Math::Math(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, PassThroughShapeInferFactory()), alpha(0.f), beta(0.f), @@ -201,67 +201,67 @@ bool Math::created() const { return getType() == Type::Math; } -std::map&, Math& node)>>& Math::getInitializers() { - static std::map&, Math& node)>> initializers { - {ngraph::op::v0::Abs::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { +std::map&, Math& node)>>& Math::getInitializers() { + static std::map&, Math& node)>> initializers { + {ngraph::op::v0::Abs::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { node.algorithm = Algorithm::MathAbs; }}, - {ngraph::op::v0::Acos::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { + {ngraph::op::v0::Acos::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { node.algorithm = Algorithm::MathAcos; }}, - {ngraph::op::v3::Acosh::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { + {ngraph::op::v3::Acosh::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { node.algorithm = Algorithm::MathAcosh; }}, - {ngraph::op::v0::Asin::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { + {ngraph::op::v0::Asin::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { node.algorithm = Algorithm::MathAsin; }}, - {ngraph::op::v3::Asinh::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { + {ngraph::op::v3::Asinh::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { node.algorithm = Algorithm::MathAsinh; }}, - {ngraph::op::v0::Atan::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { + {ngraph::op::v0::Atan::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { node.algorithm = Algorithm::MathAtan; }}, - {ngraph::op::v0::Ceiling::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { + {ngraph::op::v0::Ceiling::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { node.algorithm = Algorithm::MathCeiling; }}, - {ngraph::op::v0::Cos::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { + {ngraph::op::v0::Cos::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { node.algorithm = Algorithm::MathCos; }}, - {ngraph::op::v0::Cosh::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { + {ngraph::op::v0::Cosh::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { node.algorithm = Algorithm::MathCosh; }}, - {ngraph::op::v0::Floor::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { + {ngraph::op::v0::Floor::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { node.algorithm = Algorithm::MathFloor; }}, - {ngraph::op::v0::HardSigmoid::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { + {ngraph::op::v0::HardSigmoid::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { node.algorithm = Algorithm::MathHardSigmoid; - node.alpha = ngraph::as_type_ptr(op->get_input_node_shared_ptr(1))->cast_vector()[0]; - node.beta = ngraph::as_type_ptr(op->get_input_node_shared_ptr(2))->cast_vector()[0]; + node.alpha = ov::as_type_ptr(op->get_input_node_shared_ptr(1))->cast_vector()[0]; + node.beta = ov::as_type_ptr(op->get_input_node_shared_ptr(2))->cast_vector()[0]; }}, - {ngraph::op::v0::Negative::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { + {ngraph::op::v0::Negative::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { node.algorithm = Algorithm::MathNegative; }}, - {ngraph::op::v0::Selu::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { + {ngraph::op::v0::Selu::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { node.algorithm = Algorithm::MathSelu; - node.alpha = ngraph::as_type_ptr(op->get_input_node_shared_ptr(1))->cast_vector()[0]; - node.gamma = ngraph::as_type_ptr(op->get_input_node_shared_ptr(2))->cast_vector()[0]; + node.alpha = ov::as_type_ptr(op->get_input_node_shared_ptr(1))->cast_vector()[0]; + node.gamma = ov::as_type_ptr(op->get_input_node_shared_ptr(2))->cast_vector()[0]; }}, - {ngraph::op::v0::Sign::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { + {ngraph::op::v0::Sign::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { node.algorithm = Algorithm::MathSign; }}, - {ngraph::op::v0::Sin::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { + {ngraph::op::v0::Sin::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { node.algorithm = Algorithm::MathSin; }}, - {ngraph::op::v0::Sinh::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { + {ngraph::op::v0::Sinh::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { node.algorithm = Algorithm::MathSinh; }}, - {ngraph::op::v4::SoftPlus::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { + {ngraph::op::v4::SoftPlus::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { node.algorithm = Algorithm::MathSoftPlus; }}, - {ngraph::op::v0::Tan::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { + {ngraph::op::v0::Tan::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { node.algorithm = Algorithm::MathTan; }}, - {ngraph::op::v3::Atanh::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { + {ngraph::op::v3::Atanh::get_type_info_static(), [](const std::shared_ptr& op, Math& node) { node.algorithm = Algorithm::MathAtanh; }} }; diff --git a/src/plugins/intel_cpu/src/nodes/mathematics.h b/src/plugins/intel_cpu/src/nodes/mathematics.h index 63d1d1b70aa968..cc595ce9495e7f 100644 --- a/src/plugins/intel_cpu/src/nodes/mathematics.h +++ b/src/plugins/intel_cpu/src/nodes/mathematics.h @@ -13,7 +13,7 @@ namespace node { class Math : public Node { public: - Math(const std::shared_ptr& op, const GraphContext::CPtr context); + Math(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -23,10 +23,10 @@ class Math : public Node { bool needPrepareParams() const override { return false; }; void executeDynamicImpl(dnnl::stream strm) override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: - static std::map&, Math& node)>>& getInitializers(); + static std::map&, Math& node)>>& getInitializers(); float alpha = 0.0f; float beta = 0.0f; diff --git a/src/plugins/intel_cpu/src/nodes/matmul.cpp b/src/plugins/intel_cpu/src/nodes/matmul.cpp index a8fdebda21c15f..f0ae74b312fff8 100644 --- a/src/plugins/intel_cpu/src/nodes/matmul.cpp +++ b/src/plugins/intel_cpu/src/nodes/matmul.cpp @@ -87,7 +87,7 @@ bool MatMul::canBeExecutedInInt8() const { return one_of(firstInputPrecision, Precision::U8, Precision::I8) && secondInputPrecision == Precision::I8; } -bool MatMul::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool MatMul::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const auto matMul = std::dynamic_pointer_cast(op); if (!matMul) { @@ -114,7 +114,7 @@ bool MatMul::isSupportedOperation(const std::shared_ptr& op, return true; } -MatMul::MatMul(const std::shared_ptr& op, const GraphContext::CPtr context) : +MatMul::MatMul(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, MMShapeInferFactory(op)), withBiases(false) { std::string errorMessage; errorPrefix = "MatMul node with name '" + getName() + "'"; diff --git a/src/plugins/intel_cpu/src/nodes/matmul.h b/src/plugins/intel_cpu/src/nodes/matmul.h index 92794c785e733a..d0c3ac855a0ce3 100644 --- a/src/plugins/intel_cpu/src/nodes/matmul.h +++ b/src/plugins/intel_cpu/src/nodes/matmul.h @@ -18,7 +18,7 @@ namespace node { class MatMul : public Node { public: - MatMul(const std::shared_ptr& op, const GraphContext::CPtr context); + MatMul(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override; void createDescriptor(const std::vector& inputDesc, @@ -41,7 +41,7 @@ class MatMul : public Node { void execute(dnnl::stream strm) override; void executeDynamicImpl(dnnl::stream strm) override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; const std::vector& getDefaultImplPriority() override; bool canBeExecutedInInt8() const override; diff --git a/src/plugins/intel_cpu/src/nodes/matrix_nms.cpp b/src/plugins/intel_cpu/src/nodes/matrix_nms.cpp index 3fbb8a945e0d77..dc0ff4927bb32f 100644 --- a/src/plugins/intel_cpu/src/nodes/matrix_nms.cpp +++ b/src/plugins/intel_cpu/src/nodes/matrix_nms.cpp @@ -25,7 +25,7 @@ namespace node { using ngNmsSortResultType = ngraph::op::v8::MatrixNms::SortResultType; using ngNmseDcayFunction = ngraph::op::v8::MatrixNms::DecayFunction; -bool MatrixNms::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool MatrixNms::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const auto nms = std::dynamic_pointer_cast(op); if (!nms) { @@ -35,12 +35,12 @@ bool MatrixNms::isSupportedOperation(const std::shared_ptr& const auto& attrs = nms->get_attrs(); const auto& sortType = attrs.sort_result_type; if (!one_of(sortType, ngNmsSortResultType::NONE, ngNmsSortResultType::SCORE, ngNmsSortResultType::CLASSID)) { - errorMessage = "Does not support SortResultType mode: " + ngraph::as_string(sortType); + errorMessage = "Does not support SortResultType mode: " + ov::as_string(sortType); return false; } const auto& decayType = attrs.decay_function; if (!one_of(decayType, ngNmseDcayFunction::LINEAR, ngNmseDcayFunction::GAUSSIAN)) { - errorMessage = "Does not support DcayFunction " + ngraph::as_string(decayType); + errorMessage = "Does not support DcayFunction " + ov::as_string(decayType); return false; } } catch (...) { @@ -49,7 +49,7 @@ bool MatrixNms::isSupportedOperation(const std::shared_ptr& return true; } -MatrixNms::MatrixNms(const std::shared_ptr& op, const GraphContext::CPtr context) +MatrixNms::MatrixNms(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, InternalDynShapeInferFactory()) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { @@ -195,7 +195,7 @@ size_t MatrixNms::nmsMatrix(const float* boxesData, const float* scoresData, Box std::vector iouMax(originalSize); iouMax[0] = 0.; - InferenceEngine::parallel_for(originalSize - 1, [&](size_t i) { + ov::parallel_for(originalSize - 1, [&](size_t i) { float max_iou = 0.; size_t actual_index = i + 1; auto idx_a = candidateIndex[actual_index]; @@ -305,7 +305,7 @@ void MatrixNms::execute(dnnl::stream strm) { const float* boxes = reinterpret_cast(getParentEdgeAt(NMS_BOXES)->getMemoryPtr()->getData()); const float* scores = reinterpret_cast(getParentEdgeAt(NMS_SCORES)->getMemoryPtr()->getData()); - InferenceEngine::parallel_for2d(m_numBatches, m_numClasses, [&](size_t batchIdx, size_t classIdx) { + ov::parallel_for2d(m_numBatches, m_numClasses, [&](size_t batchIdx, size_t classIdx) { if (classIdx == static_cast(m_backgroundClass)) { m_numPerBatchClass[batchIdx][classIdx] = 0; return; @@ -318,7 +318,7 @@ void MatrixNms::execute(dnnl::stream strm) { m_numPerBatchClass[batchIdx][classIdx] = classNumDet; }); - InferenceEngine::parallel_for(m_numBatches, [&](size_t batchIdx) { + ov::parallel_for(m_numBatches, [&](size_t batchIdx) { size_t batchOffset = batchIdx * m_realNumClasses * m_realNumBoxes; BoxInfo* batchFilteredBox = m_filteredBoxes.data() + batchOffset; auto& numPerClass = m_numPerBatchClass[batchIdx]; diff --git a/src/plugins/intel_cpu/src/nodes/matrix_nms.h b/src/plugins/intel_cpu/src/nodes/matrix_nms.h index bcb0bcac6ebaa0..61b1d0188c6fab 100644 --- a/src/plugins/intel_cpu/src/nodes/matrix_nms.h +++ b/src/plugins/intel_cpu/src/nodes/matrix_nms.h @@ -25,14 +25,14 @@ enum MatrixNmsDecayFunction { GAUSSIAN, LINEAR }; class MatrixNms : public Node { public: - MatrixNms(const std::shared_ptr& op, const GraphContext::CPtr context); + MatrixNms(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; void execute(dnnl::stream strm) override; bool created() const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; bool isExecutable() const override; void executeDynamicImpl(dnnl::stream strm) override; diff --git a/src/plugins/intel_cpu/src/nodes/memory.cpp b/src/plugins/intel_cpu/src/nodes/memory.cpp index 42416a21f83ef1..b4cb551406fd53 100644 --- a/src/plugins/intel_cpu/src/nodes/memory.cpp +++ b/src/plugins/intel_cpu/src/nodes/memory.cpp @@ -21,7 +21,7 @@ namespace node { std::mutex MemoryNodeVirtualEdge::holderMutex; -MemoryNode::MemoryNode(const std::shared_ptr& op) { +MemoryNode::MemoryNode(const std::shared_ptr& op) { if (auto assignOp = std::dynamic_pointer_cast(op)) { _id = assignOp->get_variable_id(); } else if (auto readValueOp = std::dynamic_pointer_cast(op)) { @@ -29,7 +29,7 @@ MemoryNode::MemoryNode(const std::shared_ptr& op) { } } -bool MemoryOutput::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool MemoryOutput::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { if (isDynamicNgraphNode(op)) { errorMessage = "Doesn't support op with dynamic shapes"; @@ -48,7 +48,7 @@ bool MemoryOutput::isSupportedOperation(const std::shared_ptr& op, const GraphContext::CPtr context) +MemoryOutput::MemoryOutput(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) , MemoryNode(op) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { @@ -86,7 +86,7 @@ void MemoryOutput::execute(dnnl::stream strm) { inputMemoryNode->storeState(srcMemory); } -bool MemoryInput::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool MemoryInput::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { if (isDynamicNgraphNode(op)) { errorMessage = "Doesn't support op with dynamic shapes"; @@ -105,7 +105,7 @@ bool MemoryInput::isSupportedOperation(const std::shared_ptr return true; } -MemoryInput::MemoryInput(const std::shared_ptr& op, const GraphContext::CPtr ctx) +MemoryInput::MemoryInput(const std::shared_ptr& op, const GraphContext::CPtr ctx) : Input(op, ctx), MemoryNode(op) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/memory.hpp b/src/plugins/intel_cpu/src/nodes/memory.hpp index 2035f3e8651064..54ca9d24253e57 100644 --- a/src/plugins/intel_cpu/src/nodes/memory.hpp +++ b/src/plugins/intel_cpu/src/nodes/memory.hpp @@ -21,7 +21,7 @@ class MemoryNode { std::string _id; public: explicit MemoryNode(std::string id) : _id(id) {} - explicit MemoryNode(const std::shared_ptr& op); + explicit MemoryNode(const std::shared_ptr& op); virtual ~MemoryNode() = default; std::string getId() { return _id; @@ -61,9 +61,9 @@ class MemoryNodeVirtualEdge { class MemoryOutput : public Node, public MemoryNode { public: - MemoryOutput(const std::shared_ptr& op, const GraphContext::CPtr context); + MemoryOutput(const std::shared_ptr& op, const GraphContext::CPtr context); ~MemoryOutput() override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; void createPrimitive() override {} @@ -86,10 +86,10 @@ class MemoryOutput : public Node, public MemoryNode { class MemoryInput : public Input, public MemoryNode { public: - MemoryInput(const std::shared_ptr& op, const GraphContext::CPtr context); + MemoryInput(const std::shared_ptr& op, const GraphContext::CPtr context); ~MemoryInput() override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; bool created() const override { return getType() == Type::MemoryInput; } diff --git a/src/plugins/intel_cpu/src/nodes/mha.h b/src/plugins/intel_cpu/src/nodes/mha.h index 906bc36beee4e7..7a3a3ec471a9fe 100644 --- a/src/plugins/intel_cpu/src/nodes/mha.h +++ b/src/plugins/intel_cpu/src/nodes/mha.h @@ -127,14 +127,14 @@ struct jit_uni_convert_transpose_kernel { class MHA : public Node { public: - MHA(const std::shared_ptr& op, const GraphContext::CPtr context); + MHA(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; void execute(dnnl::stream strm) override; bool created() const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; protected: void executeDynamicImpl(dnnl::stream strm) override; diff --git a/src/plugins/intel_cpu/src/nodes/multiclass_nms.hpp b/src/plugins/intel_cpu/src/nodes/multiclass_nms.hpp index 6383cf29986df6..0c9380ad618d7e 100644 --- a/src/plugins/intel_cpu/src/nodes/multiclass_nms.hpp +++ b/src/plugins/intel_cpu/src/nodes/multiclass_nms.hpp @@ -21,14 +21,14 @@ enum class MulticlassNmsSortResultType { class MultiClassNms : public Node { public: - MultiClassNms(const std::shared_ptr& op, const GraphContext::CPtr context); + MultiClassNms(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; void execute(dnnl::stream strm) override; bool created() const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; bool isExecutable() const override; void executeDynamicImpl(dnnl::stream strm) override; @@ -96,19 +96,19 @@ class MultiClassNms : public Node { float intersectionOverUnion(const float* boxesI, const float* boxesJ, const bool normalized); - void nmsWithEta(const float* boxes, const float* scores, const int* roisnum, const InferenceEngine::SizeVector& boxesStrides, - const InferenceEngine::SizeVector& scoresStrides, const InferenceEngine::SizeVector& roisnumStrides, const bool shared); + void nmsWithEta(const float* boxes, const float* scores, const int* roisnum, const VectorDims& boxesStrides, + const VectorDims& scoresStrides, const VectorDims& roisnumStrides, const bool shared); - void nmsWithoutEta(const float* boxes, const float* scores, const int* roisnum, const InferenceEngine::SizeVector& boxesStrides, - const InferenceEngine::SizeVector& scoresStrides, const InferenceEngine::SizeVector& roisnumStrides, const bool shared); + void nmsWithoutEta(const float* boxes, const float* scores, const int* roisnum, const VectorDims& boxesStrides, + const VectorDims& scoresStrides, const VectorDims& roisnumStrides, const bool shared); const float* slice_class(const int batch_idx, const int class_idx, const float* dataPtr, - const InferenceEngine::SizeVector& dataStrides, + const VectorDims& dataStrides, const bool is_boxes, const int* roisnum, - const InferenceEngine::SizeVector& roisnumStrides, + const VectorDims& roisnumStrides, const bool shared); }; diff --git a/src/plugins/intel_cpu/src/nodes/mvn.cpp b/src/plugins/intel_cpu/src/nodes/mvn.cpp index d0c7952a31552e..e850ebcb1fcf04 100644 --- a/src/plugins/intel_cpu/src/nodes/mvn.cpp +++ b/src/plugins/intel_cpu/src/nodes/mvn.cpp @@ -1706,7 +1706,7 @@ struct jit_uni_mvn_kernel_f32 : public jit_uni_mvn_kernel, public jit_generator ////////////////////////////////////////////////////////////////////////////////// -bool MVN::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool MVN::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { if (op->get_output_partial_shape(0).rank().is_dynamic()) { errorMessage = "Unsupported dynamic input rank."; @@ -1718,8 +1718,8 @@ bool MVN::isSupportedOperation(const std::shared_ptr& op, st return false; } - if (auto mvnOp = ngraph::as_type_ptr(op)) { - auto axesOp = ngraph::as_type_ptr(mvnOp->get_input_node_shared_ptr(1)); + if (auto mvnOp = ov::as_type_ptr(op)) { + auto axesOp = ov::as_type_ptr(mvnOp->get_input_node_shared_ptr(1)); if (!axesOp) { errorMessage = "Constant expected as the second input."; return false; @@ -1762,7 +1762,7 @@ bool MVN::isSupportedOperation(const std::shared_ptr& op, st } } } - } else if (auto mvnOp = ngraph::as_type_ptr(op)) { + } else if (auto mvnOp = ov::as_type_ptr(op)) { } else { errorMessage = "Node is not an instance of the MVN operation."; return false; @@ -1773,7 +1773,7 @@ bool MVN::isSupportedOperation(const std::shared_ptr& op, st return true; } -MVN::MVN(const std::shared_ptr& op, const GraphContext::CPtr context) +MVN::MVN(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { @@ -1781,7 +1781,7 @@ MVN::MVN(const std::shared_ptr& op, const GraphContext::CPtr conte } mvnAttrs.epsMode_ = INSIDE_SQRT; - if (auto mvnOp = ngraph::as_type_ptr(op)) { + if (auto mvnOp = ov::as_type_ptr(op)) { mvnAttrs.normalizeVariance_ = mvnOp->get_normalize_variance(); mvnAttrs.epsValue_ = mvnOp->get_eps(); if (mvnOp->get_eps_mode() == ngraph::op::MVNEpsMode::OUTSIDE_SQRT) { @@ -1792,7 +1792,7 @@ MVN::MVN(const std::shared_ptr& op, const GraphContext::CPtr conte const auto& inDataShapeSize = getInputShapeAtPort(0).getRank(); if (inDataShapeSize == mvnOp->input_value(1).get_shape()[0] + 1 || inDataShapeSize == 1) mvnAttrs.initAcrossChannels_ = true; - } else if (auto mvnOp = ngraph::as_type_ptr(op)) { + } else if (auto mvnOp = ov::as_type_ptr(op)) { mvnAttrs.normalizeVariance_ = mvnOp->get_normalize_variance(); mvnAttrs.epsValue_ = mvnOp->get_eps(); mvnAttrs.initAcrossChannels_ = mvnOp->get_across_channels(); diff --git a/src/plugins/intel_cpu/src/nodes/mvn.h b/src/plugins/intel_cpu/src/nodes/mvn.h index 20668784c76559..f9340d0f605e98 100644 --- a/src/plugins/intel_cpu/src/nodes/mvn.h +++ b/src/plugins/intel_cpu/src/nodes/mvn.h @@ -75,9 +75,9 @@ struct jit_uni_mvn_kernel { class MVN : public Node { public: - MVN(const std::shared_ptr& op, const GraphContext::CPtr context); + MVN(const std::shared_ptr& op, const GraphContext::CPtr context); - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; bool created() const override; diff --git a/src/plugins/intel_cpu/src/nodes/non_max_suppression.cpp b/src/plugins/intel_cpu/src/nodes/non_max_suppression.cpp index db873a7578b890..55312fbf302409 100644 --- a/src/plugins/intel_cpu/src/nodes/non_max_suppression.cpp +++ b/src/plugins/intel_cpu/src/nodes/non_max_suppression.cpp @@ -556,7 +556,7 @@ struct jit_uni_nms_kernel_f32 : public jit_uni_nms_kernel, public jit_generator }; #endif -bool NonMaxSuppression::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool NonMaxSuppression::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { using NonMaxSuppressionV9 = ngraph::op::v9::NonMaxSuppression; if (!one_of(op->get_type_info(), NonMaxSuppressionV9::get_type_info_static(), @@ -578,7 +578,7 @@ bool NonMaxSuppression::isSupportedOperation(const std::shared_ptr& op, const GraphContext::CPtr context) +NonMaxSuppression::NonMaxSuppression(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, InternalDynShapeInferFactory()), isSoftSuppressedByIOU(false) { std::string errorMessage; diff --git a/src/plugins/intel_cpu/src/nodes/non_max_suppression.h b/src/plugins/intel_cpu/src/nodes/non_max_suppression.h index 2599fa3843ff06..d01025f84a6230 100644 --- a/src/plugins/intel_cpu/src/nodes/non_max_suppression.h +++ b/src/plugins/intel_cpu/src/nodes/non_max_suppression.h @@ -64,14 +64,14 @@ struct jit_uni_nms_kernel { class NonMaxSuppression : public Node { public: - NonMaxSuppression(const std::shared_ptr& op, const GraphContext::CPtr context); + NonMaxSuppression(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; void execute(dnnl::stream strm) override; bool created() const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; struct filteredBoxes { float score; diff --git a/src/plugins/intel_cpu/src/nodes/non_zero.cpp b/src/plugins/intel_cpu/src/nodes/non_zero.cpp index 562b8e7f5d9ae9..bdc58f38af4e9b 100644 --- a/src/plugins/intel_cpu/src/nodes/non_zero.cpp +++ b/src/plugins/intel_cpu/src/nodes/non_zero.cpp @@ -20,7 +20,7 @@ namespace node { static constexpr int blockSize = dnnl::impl::cpu::platform::get_cache_line_size() * 2; static constexpr int elementsStride = blockSize / sizeof(int); -bool NonZero::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool NonZero::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { if (op->get_type_info() != ngraph::op::v3::NonZero::get_type_info_static()) { errorMessage = "Node is not an instance of NonZero from the operation set v3."; @@ -32,7 +32,7 @@ bool NonZero::isSupportedOperation(const std::shared_ptr& op return true; } -NonZero::NonZero(const std::shared_ptr& op, const GraphContext::CPtr context) +NonZero::NonZero(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, InternalDynShapeInferFactory()) { std::string errorMessage; if (isSupportedOperation(op, errorMessage)) { @@ -40,7 +40,7 @@ NonZero::NonZero(const std::shared_ptr& op, const GraphContext::CP } else { OPENVINO_THROW_NOT_IMPLEMENTED(errorMessage); } - if (op->get_output_element_type(0) != ngraph::element::i32) { + if (op->get_output_element_type(0) != ov::element::i32) { OPENVINO_THROW(errorPrefix, "doesn't support demanded output precision"); } } diff --git a/src/plugins/intel_cpu/src/nodes/non_zero.h b/src/plugins/intel_cpu/src/nodes/non_zero.h index 57f2683cd56eff..bac1c849f08cf4 100644 --- a/src/plugins/intel_cpu/src/nodes/non_zero.h +++ b/src/plugins/intel_cpu/src/nodes/non_zero.h @@ -18,7 +18,7 @@ namespace node { class NonZero : public Node { public: - NonZero(const std::shared_ptr& op, const GraphContext::CPtr context); + NonZero(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; @@ -27,7 +27,7 @@ class NonZero : public Node { bool needShapeInfer() const override {return false;}; bool needPrepareParams() const override {return false;}; void executeDynamicImpl(dnnl::stream strm) override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; bool isExecutable() const override { return true; } diff --git a/src/plugins/intel_cpu/src/nodes/normalize.cpp b/src/plugins/intel_cpu/src/nodes/normalize.cpp index 1713f6873829a8..7c488fec8f011a 100644 --- a/src/plugins/intel_cpu/src/nodes/normalize.cpp +++ b/src/plugins/intel_cpu/src/nodes/normalize.cpp @@ -697,7 +697,7 @@ struct jit_uni_normalize_kernel_f32 : public jit_uni_normalize_kernel, public ji } }; #endif -bool NormalizeL2::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool NormalizeL2::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { auto norm = ov::as_type_ptr(op); if (!norm) { @@ -739,14 +739,14 @@ bool NormalizeL2::isSupportedOperation(const std::shared_ptr }; const auto axes = axesNode->cast_vector(); - if (!isSupportedAxes(axes, inputRank) && ngraph::shape_size(axesNode->get_shape()) != 0) { + if (!isSupportedAxes(axes, inputRank) && ov::shape_size(axesNode->get_shape()) != 0) { errorMessage = "Doesn't support reduction axes: " + vec2str(axes); return false; } const auto mode = norm->get_eps_mode(); if (!one_of(mode, ngraph::op::EpsMode::ADD, ngraph::op::EpsMode::MAX)) { - errorMessage = "Doesn't support eps_mode: " + ngraph::as_string(mode); + errorMessage = "Doesn't support eps_mode: " + ov::as_string(mode); return false; } } catch (...) { @@ -755,7 +755,7 @@ bool NormalizeL2::isSupportedOperation(const std::shared_ptr return true; } -NormalizeL2::NormalizeL2(const std::shared_ptr& op, const GraphContext::CPtr context) : +NormalizeL2::NormalizeL2(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, PassThroughShapeInferFactory()) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { @@ -772,10 +772,10 @@ NormalizeL2::NormalizeL2(const std::shared_ptr& op, const GraphCon auto norm = ov::as_type_ptr(op); attrs.eps = norm->get_eps(); attrs.epsMode = norm->get_eps_mode() == ngraph::op::EpsMode::MAX ? NormEpsMode::MAX : NormEpsMode::ADD; - attrs.across_spatial = ngraph::shape_size(op->get_input_shape(AXES)) != 1; + attrs.across_spatial = ov::shape_size(op->get_input_shape(AXES)) != 1; // One of the corner cases is when axes is an empty list, // then we divide each input element by itself resulting value 1 for all non-zero elements - attrs.cornerCase = ngraph::shape_size(op->get_input_shape(AXES)) == 0; + attrs.cornerCase = ov::shape_size(op->get_input_shape(AXES)) == 0; } void NormalizeL2::initSupportedPrimitiveDescriptors() { diff --git a/src/plugins/intel_cpu/src/nodes/normalize.h b/src/plugins/intel_cpu/src/nodes/normalize.h index 3b6c99bde4272c..a0cb7d53c254d2 100644 --- a/src/plugins/intel_cpu/src/nodes/normalize.h +++ b/src/plugins/intel_cpu/src/nodes/normalize.h @@ -78,9 +78,9 @@ struct jit_uni_normalize_kernel { #endif class NormalizeL2 : public Node { public: - NormalizeL2(const std::shared_ptr& op, const GraphContext::CPtr context); + NormalizeL2(const std::shared_ptr& op, const GraphContext::CPtr context); - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; void createPrimitive() override; diff --git a/src/plugins/intel_cpu/src/nodes/one_hot.cpp b/src/plugins/intel_cpu/src/nodes/one_hot.cpp index 8a9babd3f578b7..8702c9802d3b07 100644 --- a/src/plugins/intel_cpu/src/nodes/one_hot.cpp +++ b/src/plugins/intel_cpu/src/nodes/one_hot.cpp @@ -20,7 +20,7 @@ namespace ov { namespace intel_cpu { namespace node { -bool OneHot::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool OneHot::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const auto oneHot = std::dynamic_pointer_cast(op); if (!oneHot) { @@ -41,7 +41,7 @@ bool OneHot::isSupportedOperation(const std::shared_ptr& op, return true; } -OneHot::OneHot(const std::shared_ptr& op, const GraphContext::CPtr context) +OneHot::OneHot(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, OneHotShapeInferFactory(op)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { @@ -57,11 +57,11 @@ OneHot::OneHot(const std::shared_ptr& op, const GraphContext::CPtr axis = oneHot->get_axis(); VectorDims srcDims = getInputShapeAtPort(INDICES_ID).getDims(); - if (ngraph::is_scalar(srcDims)) { + if (ov::is_scalar(srcDims)) { srcDims = SizeVector{1}; } VectorDims dstDims = getOutputShapeAtPort(0).getDims(); - if (ngraph::is_scalar(dstDims)) { + if (ov::is_scalar(dstDims)) { dstDims = SizeVector{1}; } diff --git a/src/plugins/intel_cpu/src/nodes/one_hot.h b/src/plugins/intel_cpu/src/nodes/one_hot.h index 9db0a066c76f8c..6e10e2b9d18046 100644 --- a/src/plugins/intel_cpu/src/nodes/one_hot.h +++ b/src/plugins/intel_cpu/src/nodes/one_hot.h @@ -17,7 +17,7 @@ namespace node { class OneHot : public Node { public: - OneHot(const std::shared_ptr& op, const GraphContext::CPtr context); + OneHot(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -29,7 +29,7 @@ class OneHot : public Node { bool needPrepareParams() const override { return false; }; void executeDynamicImpl(dnnl::stream strm) override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: typedef InferenceEngine::PrecisionTrait::value_type in_type; diff --git a/src/plugins/intel_cpu/src/nodes/priorbox.cpp b/src/plugins/intel_cpu/src/nodes/priorbox.cpp index ce72fc38ee0d80..323dfbbcd6c3cd 100644 --- a/src/plugins/intel_cpu/src/nodes/priorbox.cpp +++ b/src/plugins/intel_cpu/src/nodes/priorbox.cpp @@ -33,7 +33,7 @@ float clip_less(float x, float threshold) { } // namespace -bool PriorBox::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool PriorBox::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const auto priorBox = std::dynamic_pointer_cast(op); if (!priorBox) { @@ -46,7 +46,7 @@ bool PriorBox::isSupportedOperation(const std::shared_ptr& o return true; } -PriorBox::PriorBox(const std::shared_ptr& op, const GraphContext::CPtr context) +PriorBox::PriorBox(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, PriorBoxShapeInferFactory(op)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/priorbox.h b/src/plugins/intel_cpu/src/nodes/priorbox.h index 1b58087c8ba016..7d7c1f4fa7fd45 100644 --- a/src/plugins/intel_cpu/src/nodes/priorbox.h +++ b/src/plugins/intel_cpu/src/nodes/priorbox.h @@ -16,7 +16,7 @@ namespace node { class PriorBox : public Node { public: - PriorBox(const std::shared_ptr& op, const GraphContext::CPtr context); + PriorBox(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -29,7 +29,7 @@ class PriorBox : public Node { void executeDynamicImpl(dnnl::stream strm) override { execute(strm); } - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: float offset; diff --git a/src/plugins/intel_cpu/src/nodes/priorbox_clustered.cpp b/src/plugins/intel_cpu/src/nodes/priorbox_clustered.cpp index 00b71f14a17e43..fbd2b5ca0814d2 100644 --- a/src/plugins/intel_cpu/src/nodes/priorbox_clustered.cpp +++ b/src/plugins/intel_cpu/src/nodes/priorbox_clustered.cpp @@ -20,7 +20,7 @@ using namespace InferenceEngine; namespace ov { namespace intel_cpu { namespace node { -bool PriorBoxClustered::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool PriorBoxClustered::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const auto priorBox = std::dynamic_pointer_cast(op); if (!priorBox) { @@ -33,7 +33,7 @@ bool PriorBoxClustered::isSupportedOperation(const std::shared_ptr& op, const GraphContext::CPtr context) +PriorBoxClustered::PriorBoxClustered(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, PriorBoxClusteredShapeInferFactory(op)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/priorbox_clustered.h b/src/plugins/intel_cpu/src/nodes/priorbox_clustered.h index bb5509ccf535ec..9813e9cc8f5493 100644 --- a/src/plugins/intel_cpu/src/nodes/priorbox_clustered.h +++ b/src/plugins/intel_cpu/src/nodes/priorbox_clustered.h @@ -16,7 +16,7 @@ namespace node { class PriorBoxClustered : public Node { public: - PriorBoxClustered(const std::shared_ptr& op, const GraphContext::CPtr context); + PriorBoxClustered(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -29,7 +29,7 @@ class PriorBoxClustered : public Node { void executeDynamicImpl(dnnl::stream strm) override { execute(strm); } - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: std::vector widths; diff --git a/src/plugins/intel_cpu/src/nodes/proposal.cpp b/src/plugins/intel_cpu/src/nodes/proposal.cpp index 8c531025d89fba..8d526786a8a04d 100644 --- a/src/plugins/intel_cpu/src/nodes/proposal.cpp +++ b/src/plugins/intel_cpu/src/nodes/proposal.cpp @@ -74,10 +74,10 @@ static std::vector generate_anchors(proposal_conf &conf) { return anchors; } -bool Proposal::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool Proposal::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { - const auto proposal0Op = ngraph::as_type_ptr(op); - const auto proposal4Op = ngraph::as_type_ptr(op); + const auto proposal0Op = ov::as_type_ptr(op); + const auto proposal4Op = ov::as_type_ptr(op); if (!proposal0Op && !proposal4Op) { errorMessage = "Node is not an instance of the Proposal from the operations set v0 or v4."; return false; @@ -93,7 +93,7 @@ bool Proposal::isSupportedOperation(const std::shared_ptr& o return true; } -Proposal::Proposal(const std::shared_ptr& op, const GraphContext::CPtr context) +Proposal::Proposal(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/proposal.h b/src/plugins/intel_cpu/src/nodes/proposal.h index 3c25c6d86b0540..5977845354bec8 100644 --- a/src/plugins/intel_cpu/src/nodes/proposal.h +++ b/src/plugins/intel_cpu/src/nodes/proposal.h @@ -16,7 +16,7 @@ namespace node { class Proposal : public Node { public: - Proposal(const std::shared_ptr& op, const GraphContext::CPtr context); + Proposal(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -26,7 +26,7 @@ class Proposal : public Node { bool needPrepareParams() const override { return false; }; void executeDynamicImpl(dnnl::stream strm) override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: const size_t PROBABILITIES_IN_IDX = 0lu; diff --git a/src/plugins/intel_cpu/src/nodes/psroi_pooling.cpp b/src/plugins/intel_cpu/src/nodes/psroi_pooling.cpp index 4e4fd57e3b3280..de47fe0404cbbc 100644 --- a/src/plugins/intel_cpu/src/nodes/psroi_pooling.cpp +++ b/src/plugins/intel_cpu/src/nodes/psroi_pooling.cpp @@ -24,7 +24,7 @@ namespace ov { namespace intel_cpu { namespace node { -bool PSROIPooling::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool PSROIPooling::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { if (isDynamicNgraphNode(op)) { errorMessage = "Doesn't support op with dynamic shapes"; @@ -57,7 +57,7 @@ bool PSROIPooling::isSupportedOperation(const std::shared_ptr& op, const GraphContext::CPtr context) +PSROIPooling::PSROIPooling(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { @@ -119,12 +119,12 @@ PSROIPooling::PSROIPooling(const std::shared_ptr& op, const GraphC pooledWidth = groupSize; } - ngraph::Shape inDims = op->get_input_shape(0); + ov::Shape inDims = op->get_input_shape(0); channels = static_cast(inDims[1]); height = static_cast(inDims[2]); width = static_cast(inDims[3]); - ngraph::Shape outDims = op->get_shape(); + ov::Shape outDims = op->get_shape(); nn = static_cast(outDims[0]); nc = static_cast(outDims[1]); nh = static_cast(outDims[2]); diff --git a/src/plugins/intel_cpu/src/nodes/psroi_pooling.h b/src/plugins/intel_cpu/src/nodes/psroi_pooling.h index 033d32c6bcbecd..47924d53d6b053 100644 --- a/src/plugins/intel_cpu/src/nodes/psroi_pooling.h +++ b/src/plugins/intel_cpu/src/nodes/psroi_pooling.h @@ -16,7 +16,7 @@ namespace node { class PSROIPooling : public Node { public: - PSROIPooling(const std::shared_ptr& op, const GraphContext::CPtr context); + PSROIPooling(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -24,7 +24,7 @@ class PSROIPooling : public Node { void execute(dnnl::stream strm) override; bool created() const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: size_t outputDim = 0; diff --git a/src/plugins/intel_cpu/src/nodes/range.cpp b/src/plugins/intel_cpu/src/nodes/range.cpp index dbfe5b32ea541f..ba7ee74c5f7fad 100644 --- a/src/plugins/intel_cpu/src/nodes/range.cpp +++ b/src/plugins/intel_cpu/src/nodes/range.cpp @@ -15,7 +15,7 @@ namespace ov { namespace intel_cpu { namespace node { -bool Range::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool Range::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { if (!one_of(op->get_type_info(), ngraph::op::v0::Range::get_type_info_static(), ngraph::op::v4::Range::get_type_info_static())) { errorMessage = "Only opset1 and opset4 Range operation is supported"; @@ -27,7 +27,7 @@ bool Range::isSupportedOperation(const std::shared_ptr& op, return true; } -Range::Range(const std::shared_ptr& op, const GraphContext::CPtr context) +Range::Range(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, InternalDynShapeInferFactory()) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { @@ -40,15 +40,15 @@ Range::Range(const std::shared_ptr& op, const GraphContext::CPtr c OPENVINO_THROW(errorPrefix, " has incorrect number of input/output edges!"); SizeVector start_dims = op->get_input_shape(RANGE_START); - if (ngraph::shape_size(start_dims) != 1) + if (ov::shape_size(start_dims) != 1) OPENVINO_THROW(errorPrefix, " has start scalar with more than 1 value"); SizeVector limit_dims = op->get_input_shape(RANGE_LIMIT); - if (ngraph::shape_size(limit_dims) != 1) + if (ov::shape_size(limit_dims) != 1) OPENVINO_THROW(errorPrefix, " has limit scalar with more than 1 value"); SizeVector delta_dims = op->get_input_shape(RANGE_DELTA); - if (ngraph::shape_size(delta_dims) != 1) + if (ov::shape_size(delta_dims) != 1) OPENVINO_THROW(errorPrefix, " has delta scalar with more than 1 value"); size_t dstRank = op->get_output_partial_shape(0).size(); diff --git a/src/plugins/intel_cpu/src/nodes/range.h b/src/plugins/intel_cpu/src/nodes/range.h index e0b424e0e06ae9..9a6dc6789c634f 100644 --- a/src/plugins/intel_cpu/src/nodes/range.h +++ b/src/plugins/intel_cpu/src/nodes/range.h @@ -13,7 +13,7 @@ namespace node { class Range : public Node { public: - Range(const std::shared_ptr& op, const GraphContext::CPtr context); + Range(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -22,7 +22,7 @@ class Range : public Node { bool needPrepareParams() const override {return false;}; bool needShapeInfer() const override {return false;}; void executeDynamicImpl(dnnl::stream strm) override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: template diff --git a/src/plugins/intel_cpu/src/nodes/rdft.cpp b/src/plugins/intel_cpu/src/nodes/rdft.cpp index bcada573273b46..1bf790194390e9 100644 --- a/src/plugins/intel_cpu/src/nodes/rdft.cpp +++ b/src/plugins/intel_cpu/src/nodes/rdft.cpp @@ -36,7 +36,7 @@ static constexpr size_t SIGNAL_SIZE_INDEX = 2; static constexpr double PI = 3.14159265358979323846; -bool RDFT::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool RDFT::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const bool isRDFT = is_type(op); const bool isIRDFT = is_type(op); @@ -76,7 +76,7 @@ static std::vector getDefaultSignalSizes(const VectorDims& inputShape, cons return signalSizes; } -RDFT::RDFT(const std::shared_ptr& op, const GraphContext::CPtr context) : +RDFT::RDFT(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, PortMask(1, 2))) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/rdft.h b/src/plugins/intel_cpu/src/nodes/rdft.h index acba5d03115121..4591c1948e3560 100644 --- a/src/plugins/intel_cpu/src/nodes/rdft.h +++ b/src/plugins/intel_cpu/src/nodes/rdft.h @@ -75,7 +75,7 @@ struct RDFTExecutor { class RDFT : public Node { public: - RDFT(const std::shared_ptr& op, const GraphContext::CPtr context); + RDFT(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; @@ -85,7 +85,7 @@ class RDFT : public Node { bool created() const override; void createPrimitive() override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: bool axesChanged() const; diff --git a/src/plugins/intel_cpu/src/nodes/reduce.cpp b/src/plugins/intel_cpu/src/nodes/reduce.cpp index 098afd2d068a63..a39612fbe615bf 100644 --- a/src/plugins/intel_cpu/src/nodes/reduce.cpp +++ b/src/plugins/intel_cpu/src/nodes/reduce.cpp @@ -1768,40 +1768,40 @@ struct jit_uni_reduce_post_kernel_f32 : public jit_uni_reduce_post_kernel, publi #endif // OPENVINO_ARCH_X86_64 -const std::map& op, Reduce& node)>>& Reduce::getInitializers() { - static const std::map&, Reduce&)>> initializers = { - {ngraph::opset4::ReduceL1::get_type_info_static(), [](const std::shared_ptr& op, Reduce& node) { +const std::map& op, Reduce& node)>>& Reduce::getInitializers() { + static const std::map&, Reduce&)>> initializers = { + {ngraph::opset4::ReduceL1::get_type_info_static(), [](const std::shared_ptr& op, Reduce& node) { node.algorithm = Algorithm::ReduceL1; }}, - {ngraph::opset4::ReduceL2::get_type_info_static(), [](const std::shared_ptr& op, Reduce& node) { + {ngraph::opset4::ReduceL2::get_type_info_static(), [](const std::shared_ptr& op, Reduce& node) { node.algorithm = Algorithm::ReduceL2; }}, - {ngraph::opset1::ReduceLogicalAnd::get_type_info_static(), [](const std::shared_ptr& op, Reduce& node) { + {ngraph::opset1::ReduceLogicalAnd::get_type_info_static(), [](const std::shared_ptr& op, Reduce& node) { node.algorithm = Algorithm::ReduceAnd; }}, - {ngraph::opset1::ReduceLogicalOr::get_type_info_static(), [](const std::shared_ptr& op, Reduce& node) { + {ngraph::opset1::ReduceLogicalOr::get_type_info_static(), [](const std::shared_ptr& op, Reduce& node) { node.algorithm = Algorithm::ReduceOr; }}, - {ngraph::opset1::ReduceMax::get_type_info_static(), [](const std::shared_ptr& op, Reduce& node) { + {ngraph::opset1::ReduceMax::get_type_info_static(), [](const std::shared_ptr& op, Reduce& node) { node.algorithm = Algorithm::ReduceMax; }}, - {ngraph::opset1::ReduceMean::get_type_info_static(), [](const std::shared_ptr& op, Reduce& node) { + {ngraph::opset1::ReduceMean::get_type_info_static(), [](const std::shared_ptr& op, Reduce& node) { node.algorithm = Algorithm::ReduceMean; }}, - {ngraph::opset1::ReduceMin::get_type_info_static(), [](const std::shared_ptr& op, Reduce& node) { + {ngraph::opset1::ReduceMin::get_type_info_static(), [](const std::shared_ptr& op, Reduce& node) { node.algorithm = Algorithm::ReduceMin; }}, - {ngraph::opset1::ReduceProd::get_type_info_static(), [](const std::shared_ptr& op, Reduce& node) { + {ngraph::opset1::ReduceProd::get_type_info_static(), [](const std::shared_ptr& op, Reduce& node) { node.algorithm = Algorithm::ReduceProd; }}, - {ngraph::opset1::ReduceSum::get_type_info_static(), [](const std::shared_ptr& op, Reduce& node) { + {ngraph::opset1::ReduceSum::get_type_info_static(), [](const std::shared_ptr& op, Reduce& node) { node.algorithm = Algorithm::ReduceSum; }} }; return initializers; } -bool Reduce::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool Reduce::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { if (std::dynamic_pointer_cast(op) == nullptr && std::dynamic_pointer_cast(op) == nullptr) { @@ -1836,7 +1836,7 @@ bool Reduce::isSupportedOperation(const std::shared_ptr& op, return true; } -Reduce::Reduce(const std::shared_ptr& op, const GraphContext::CPtr context) +Reduce::Reduce(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, PortMask(REDUCE_INDEXES))) { std::string errorMessage; if (isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/reduce.h b/src/plugins/intel_cpu/src/nodes/reduce.h index 9b92419319027c..9c8d680c32315e 100644 --- a/src/plugins/intel_cpu/src/nodes/reduce.h +++ b/src/plugins/intel_cpu/src/nodes/reduce.h @@ -89,7 +89,7 @@ struct jit_uni_reduce_post_kernel { class Reduce : public Node { public: - Reduce(const std::shared_ptr& op, const GraphContext::CPtr context); + Reduce(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; @@ -105,7 +105,7 @@ class Reduce : public Node { } bool isExecutable() const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: void reduce_type(const uint8_t *in_ptr, uint8_t *out_ptr); @@ -122,7 +122,7 @@ class Reduce : public Node { inline void init_dst_data(uint8_t *out_ptr, size_t dst_size); inline void create_hybrid_working_memory(); inline void create_opt_working_memory(); - inline void calc_process_dst_dims(std::vector &reduce_axes, const InferenceEngine::SizeVector &dst_dim); + inline void calc_process_dst_dims(std::vector &reduce_axes, const VectorDims &dst_dim); inline void set_reduce_dim_flags(); inline void reduce_ref(const float *in_ptr, float *out_ptr); void reduce_ref_process(const float *in_ptr, float *out_ptr, float init_value, std::function func); @@ -163,9 +163,9 @@ class Reduce : public Node { uint8_t *tmp_ptr; ReduceLayoutType layout; InferenceEngine::Precision input_prec, output_prec, intermediate_prec, tmp_prec; - InferenceEngine::SizeVector src_dims; - InferenceEngine::SizeVector process_dst_dims; - InferenceEngine::SizeVector axes_for_reduction; + VectorDims src_dims; + VectorDims process_dst_dims; + VectorDims axes_for_reduction; std::vector raw_axes; std::vector intermediate_buf; @@ -185,7 +185,7 @@ class Reduce : public Node { std::shared_ptr reduce_tmp_kernel; std::shared_ptr reduce_post_kernel; - static const std::map& op, Reduce& node)>>& getInitializers(); + static const std::map& op, Reduce& node)>>& getInitializers(); std::string errorPrefix; diff --git a/src/plugins/intel_cpu/src/nodes/reference.cpp b/src/plugins/intel_cpu/src/nodes/reference.cpp index 3c849693fd0b17..5b63208dd24f76 100644 --- a/src/plugins/intel_cpu/src/nodes/reference.cpp +++ b/src/plugins/intel_cpu/src/nodes/reference.cpp @@ -21,7 +21,7 @@ namespace ov { namespace intel_cpu { namespace node { -Reference::Reference(const std::shared_ptr& op, const GraphContext::CPtr context, +Reference::Reference(const std::shared_ptr& op, const GraphContext::CPtr context, const std::string& errorMessage) : Node(op, context, NgraphShapeInferFactory(op, FULL_PORT_MASK)), ngraphOp(op), additionalErrorMessage(errorMessage) { if (!op->has_evaluate()) { diff --git a/src/plugins/intel_cpu/src/nodes/reference.h b/src/plugins/intel_cpu/src/nodes/reference.h index 4c2a8a1310806f..a5add4d436b4bd 100644 --- a/src/plugins/intel_cpu/src/nodes/reference.h +++ b/src/plugins/intel_cpu/src/nodes/reference.h @@ -12,7 +12,7 @@ namespace node { class Reference : public Node { public: - Reference(const std::shared_ptr& op, const GraphContext::CPtr context, const std::string& errorMessage); + Reference(const std::shared_ptr& op, const GraphContext::CPtr context, const std::string& errorMessage); void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; @@ -29,7 +29,7 @@ class Reference : public Node { ov::TensorVector prepareOutputs() const; private: - const std::shared_ptr ngraphOp; + const std::shared_ptr ngraphOp; const std::string additionalErrorMessage; }; diff --git a/src/plugins/intel_cpu/src/nodes/region_yolo.cpp b/src/plugins/intel_cpu/src/nodes/region_yolo.cpp index 9f0d078c95ba46..e6926f0c538a26 100644 --- a/src/plugins/intel_cpu/src/nodes/region_yolo.cpp +++ b/src/plugins/intel_cpu/src/nodes/region_yolo.cpp @@ -230,7 +230,7 @@ struct jit_uni_logistic_kernel_f32 : public jit_uni_logistic_kernel, public jit_ }; #endif -bool RegionYolo::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool RegionYolo::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const auto regionYolo = std::dynamic_pointer_cast(op); if (!regionYolo) { @@ -247,7 +247,7 @@ bool RegionYolo::needPrepareParams() const { return false; } -RegionYolo::RegionYolo(const std::shared_ptr& op, const GraphContext::CPtr context) +RegionYolo::RegionYolo(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/region_yolo.h b/src/plugins/intel_cpu/src/nodes/region_yolo.h index da1a252eddaef0..257edb862a8897 100644 --- a/src/plugins/intel_cpu/src/nodes/region_yolo.h +++ b/src/plugins/intel_cpu/src/nodes/region_yolo.h @@ -41,7 +41,7 @@ struct jit_uni_logistic_kernel { class RegionYolo : public Node { public: - RegionYolo(const std::shared_ptr& op, const GraphContext::CPtr context); + RegionYolo(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -49,7 +49,7 @@ class RegionYolo : public Node { void execute(dnnl::stream strm) override; bool created() const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; protected: bool needPrepareParams() const override; diff --git a/src/plugins/intel_cpu/src/nodes/reorder.cpp b/src/plugins/intel_cpu/src/nodes/reorder.cpp index 870d8f9449e26b..29471189496cd6 100644 --- a/src/plugins/intel_cpu/src/nodes/reorder.cpp +++ b/src/plugins/intel_cpu/src/nodes/reorder.cpp @@ -30,7 +30,7 @@ bool Reorder::isExecutable() const { return Node::isExecutable() && !isOptimized; } -Reorder::Reorder(const std::shared_ptr& op, const GraphContext::CPtr context) : +Reorder::Reorder(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, PassThroughShapeInferFactory()) { OPENVINO_THROW("Can't create reorder node from ngraph node"); } diff --git a/src/plugins/intel_cpu/src/nodes/reorder.h b/src/plugins/intel_cpu/src/nodes/reorder.h index 5e6a125ca94346..0ba4d5acf44d15 100644 --- a/src/plugins/intel_cpu/src/nodes/reorder.h +++ b/src/plugins/intel_cpu/src/nodes/reorder.h @@ -18,7 +18,7 @@ namespace node { class Reorder : public Node { public: - Reorder(const std::shared_ptr& op, const GraphContext::CPtr context); + Reorder(const std::shared_ptr& op, const GraphContext::CPtr context); Reorder(const std::string& name, const GraphContext::CPtr context); void getSupportedDescriptors() override; diff --git a/src/plugins/intel_cpu/src/nodes/reorg_yolo.cpp b/src/plugins/intel_cpu/src/nodes/reorg_yolo.cpp index 34c8bd83cd0b31..3404754940ee59 100644 --- a/src/plugins/intel_cpu/src/nodes/reorg_yolo.cpp +++ b/src/plugins/intel_cpu/src/nodes/reorg_yolo.cpp @@ -14,7 +14,7 @@ namespace ov { namespace intel_cpu { namespace node { -bool ReorgYolo::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool ReorgYolo::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const auto reorgYolo = std::dynamic_pointer_cast(op); if (!reorgYolo) { @@ -27,7 +27,7 @@ bool ReorgYolo::isSupportedOperation(const std::shared_ptr& return true; } -ReorgYolo::ReorgYolo(const std::shared_ptr& op, const GraphContext::CPtr context) +ReorgYolo::ReorgYolo(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/reorg_yolo.h b/src/plugins/intel_cpu/src/nodes/reorg_yolo.h index c5f6c8d4cae799..aaac41ba606c79 100644 --- a/src/plugins/intel_cpu/src/nodes/reorg_yolo.h +++ b/src/plugins/intel_cpu/src/nodes/reorg_yolo.h @@ -13,7 +13,7 @@ namespace node { class ReorgYolo : public Node { public: - ReorgYolo(const std::shared_ptr& op, const GraphContext::CPtr context); + ReorgYolo(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -22,7 +22,7 @@ class ReorgYolo : public Node { bool needPrepareParams() const override { return false; } void executeDynamicImpl(dnnl::stream strm) override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: int stride; diff --git a/src/plugins/intel_cpu/src/nodes/reshape.cpp b/src/plugins/intel_cpu/src/nodes/reshape.cpp index e54ee5b6e0b94f..4b4e50f1c7b4d8 100644 --- a/src/plugins/intel_cpu/src/nodes/reshape.cpp +++ b/src/plugins/intel_cpu/src/nodes/reshape.cpp @@ -20,7 +20,7 @@ namespace ov { namespace intel_cpu { namespace node { -bool Reshape::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool Reshape::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { if (!std::dynamic_pointer_cast(op) && !std::dynamic_pointer_cast(op) && @@ -34,7 +34,7 @@ bool Reshape::isSupportedOperation(const std::shared_ptr& op return true; } -Reshape::Reshape(const std::shared_ptr& op, const GraphContext::CPtr context) : +Reshape::Reshape(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, ReshapeShapeInferFactory(op)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { @@ -44,7 +44,7 @@ Reshape::Reshape(const std::shared_ptr& op, const GraphContext::CP errorPrefix = std::string(op->get_type_name()) + " node with name '" + getName() + "'"; if (isDynamicNode()) { - auto checkSecondInput = [](const std::shared_ptr& op, const std::string opType) { + auto checkSecondInput = [](const std::shared_ptr& op, const std::string opType) { if (op->get_input_partial_shape(1).is_dynamic()) { OPENVINO_THROW("CPU plug-in doesn't support ", opType, " node with non static second input"); } diff --git a/src/plugins/intel_cpu/src/nodes/reshape.h b/src/plugins/intel_cpu/src/nodes/reshape.h index e62253e99fa8a3..3877596fb8d9ec 100644 --- a/src/plugins/intel_cpu/src/nodes/reshape.h +++ b/src/plugins/intel_cpu/src/nodes/reshape.h @@ -17,7 +17,7 @@ namespace node { class Reshape : public Node { public: - Reshape(const std::shared_ptr& op, const GraphContext::CPtr context); + Reshape(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; @@ -29,7 +29,7 @@ class Reshape : public Node { void executeDynamicImpl(dnnl::stream strm) override; void execute(dnnl::stream strm) override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: mutable std::vector lastSecondInputValues; diff --git a/src/plugins/intel_cpu/src/nodes/reverse_sequence.cpp b/src/plugins/intel_cpu/src/nodes/reverse_sequence.cpp index 520dc3b6c859ee..d5368eac5ed745 100644 --- a/src/plugins/intel_cpu/src/nodes/reverse_sequence.cpp +++ b/src/plugins/intel_cpu/src/nodes/reverse_sequence.cpp @@ -15,7 +15,7 @@ namespace ov { namespace intel_cpu { namespace node { -bool ReverseSequence::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool ReverseSequence::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const auto revSeq = std::dynamic_pointer_cast(op); if (!revSeq) { @@ -28,7 +28,7 @@ bool ReverseSequence::isSupportedOperation(const std::shared_ptr& op, const GraphContext::CPtr context) +ReverseSequence::ReverseSequence(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/reverse_sequence.h b/src/plugins/intel_cpu/src/nodes/reverse_sequence.h index 55fd457c0a688e..ba997fbb557cf9 100644 --- a/src/plugins/intel_cpu/src/nodes/reverse_sequence.h +++ b/src/plugins/intel_cpu/src/nodes/reverse_sequence.h @@ -13,7 +13,7 @@ namespace node { class ReverseSequence : public Node { public: - ReverseSequence(const std::shared_ptr& op, const GraphContext::CPtr context); + ReverseSequence(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; @@ -23,7 +23,7 @@ class ReverseSequence : public Node { void prepareParams() override; void executeDynamicImpl(dnnl::stream strm) override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: struct ReverseSequenceExecutor { @@ -39,7 +39,7 @@ class ReverseSequence : public Node { private: const int batchAxis; const int seqAxis; - InferenceEngine::SizeVector srcStrides; + VectorDims srcStrides; size_t workAmountDst; }; diff --git a/src/plugins/intel_cpu/src/nodes/rnn.cpp b/src/plugins/intel_cpu/src/nodes/rnn.cpp index 5c53f4eef7d1ea..d9b41acca0dfbe 100644 --- a/src/plugins/intel_cpu/src/nodes/rnn.cpp +++ b/src/plugins/intel_cpu/src/nodes/rnn.cpp @@ -333,7 +333,7 @@ bool RNN::isSupportedOperation(const std::shared_ptr& op, std::s return true; } -bool RNN::isCell(const std::shared_ptr& op) { +bool RNN::isCell(const std::shared_ptr& op) { return one_of(op->get_type_info(), ov::op::v0::RNNCell::get_type_info_static(), ov::op::v3::GRUCell::get_type_info_static(), @@ -342,7 +342,7 @@ bool RNN::isCell(const std::shared_ptr& op) { ov::op::v4::LSTMCell::get_type_info_static()); } -bool RNN::testNativeOrder(const std::shared_ptr& op) { +bool RNN::testNativeOrder(const std::shared_ptr& op) { if (isCell(op)) { return true; } diff --git a/src/plugins/intel_cpu/src/nodes/rnn.h b/src/plugins/intel_cpu/src/nodes/rnn.h index d16bcd10c5078f..83784d7682d66f 100644 --- a/src/plugins/intel_cpu/src/nodes/rnn.h +++ b/src/plugins/intel_cpu/src/nodes/rnn.h @@ -19,11 +19,11 @@ namespace node { class RNN : public Node { public: - RNN(const std::shared_ptr& op, const GraphContext::CPtr context); + RNN(const std::shared_ptr& op, const GraphContext::CPtr context); - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; - static bool isCell(const std::shared_ptr& op); - static bool testNativeOrder(const std::shared_ptr& op); + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isCell(const std::shared_ptr& op); + static bool testNativeOrder(const std::shared_ptr& op); void getSupportedDescriptors() override; std::shared_ptr getSrcMemDesc(const dnnl::primitive_desc& prim_desc, size_t idx) const override; std::shared_ptr getDstMemDesc(const dnnl::primitive_desc& prim_desc, size_t idx) const override; diff --git a/src/plugins/intel_cpu/src/nodes/roi_align.cpp b/src/plugins/intel_cpu/src/nodes/roi_align.cpp index 1bfd3d0818b1d6..496eb823c01a9b 100644 --- a/src/plugins/intel_cpu/src/nodes/roi_align.cpp +++ b/src/plugins/intel_cpu/src/nodes/roi_align.cpp @@ -649,9 +649,9 @@ struct jit_uni_roi_align_kernel_f32 : public jit_uni_roi_align_kernel, public ji } }; #endif -bool ROIAlign::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool ROIAlign::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { - auto roiAlign = ngraph::as_type_ptr(op); + auto roiAlign = ov::as_type_ptr(op); if (!roiAlign) { errorMessage = "Only opset9 ROIAlign operation is supported"; return false; @@ -659,13 +659,13 @@ bool ROIAlign::isSupportedOperation(const std::shared_ptr& o const ngPoolingMode mode = roiAlign->get_mode(); if (mode != ngPoolingMode::AVG && mode != ngPoolingMode::MAX) { - errorMessage = "Doesn't support mode: " + ngraph::as_string(mode); + errorMessage = "Doesn't support mode: " + ov::as_string(mode); return false; } const ngAlignedMode alignedMode = roiAlign->get_aligned_mode(); if (alignedMode != ngAlignedMode::ASYMMETRIC && alignedMode != ngAlignedMode::HALF_PIXEL_FOR_NN && alignedMode != ngAlignedMode::HALF_PIXEL) { - errorMessage = "Doesn't support mode: " + ngraph::as_string(alignedMode); + errorMessage = "Doesn't support mode: " + ov::as_string(alignedMode); return false; } } catch (...) { @@ -674,13 +674,13 @@ bool ROIAlign::isSupportedOperation(const std::shared_ptr& o return true; } -ROIAlign::ROIAlign(const std::shared_ptr& op, const GraphContext::CPtr context) +ROIAlign::ROIAlign(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (isSupportedOperation(op, errorMessage)) { errorPrefix = "ROIPooling layer with name '" + getName() + "' "; - auto roiAlign = ngraph::as_type_ptr(op); + auto roiAlign = ov::as_type_ptr(op); pooledH = roiAlign->get_pooled_h(); pooledW = roiAlign->get_pooled_w(); spatialScale = roiAlign->get_spatial_scale(); diff --git a/src/plugins/intel_cpu/src/nodes/roi_align.h b/src/plugins/intel_cpu/src/nodes/roi_align.h index 42f8d2eeaf121e..eead89ddf4f36f 100644 --- a/src/plugins/intel_cpu/src/nodes/roi_align.h +++ b/src/plugins/intel_cpu/src/nodes/roi_align.h @@ -67,7 +67,7 @@ struct jit_uni_roi_align_kernel { class ROIAlign : public Node { public: - ROIAlign(const std::shared_ptr& op, const GraphContext::CPtr context); + ROIAlign(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; @@ -78,7 +78,7 @@ class ROIAlign : public Node { bool needPrepareParams() const override; void executeDynamicImpl(dnnl::stream strm) override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: int pooledH = 7; diff --git a/src/plugins/intel_cpu/src/nodes/roi_pooling.cpp b/src/plugins/intel_cpu/src/nodes/roi_pooling.cpp index a71b1105e131bd..012183d5b70e17 100644 --- a/src/plugins/intel_cpu/src/nodes/roi_pooling.cpp +++ b/src/plugins/intel_cpu/src/nodes/roi_pooling.cpp @@ -367,9 +367,9 @@ bool jit_roi_pooling_params::operator==(const jit_roi_pooling_params &rhs) const alg == rhs.alg; } -bool ROIPooling::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool ROIPooling::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { - auto roiPooling = ngraph::as_type_ptr(op); + auto roiPooling = ov::as_type_ptr(op); if (!roiPooling) { errorMessage = "Only opset2 ROIPooling operation is supported"; return false; @@ -385,7 +385,7 @@ bool ROIPooling::isSupportedOperation(const std::shared_ptr& return true; } -ROIPooling::ROIPooling(const std::shared_ptr& op, const GraphContext::CPtr context) +ROIPooling::ROIPooling(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { @@ -394,7 +394,7 @@ ROIPooling::ROIPooling(const std::shared_ptr& op, const GraphConte std::string errorPrefix = "ROIPooling layer with name '" + getName() + "' "; - auto roiPooling = ngraph::as_type_ptr(op); + auto roiPooling = ov::as_type_ptr(op); refParams.pooled_h = roiPooling->get_output_roi()[0]; refParams.pooled_w = roiPooling->get_output_roi()[1]; refParams.spatial_scale = roiPooling->get_spatial_scale(); diff --git a/src/plugins/intel_cpu/src/nodes/roi_pooling.h b/src/plugins/intel_cpu/src/nodes/roi_pooling.h index ee3d3b9852ddde..8be0a0477cb35b 100644 --- a/src/plugins/intel_cpu/src/nodes/roi_pooling.h +++ b/src/plugins/intel_cpu/src/nodes/roi_pooling.h @@ -68,7 +68,7 @@ struct jit_uni_roi_pooling_kernel { class ROIPooling : public Node { public: - ROIPooling(const std::shared_ptr& op, const GraphContext::CPtr context); + ROIPooling(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; @@ -80,7 +80,7 @@ class ROIPooling : public Node { void prepareParams() override; private: - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; template void execute(); template struct ROIPoolingExecute; diff --git a/src/plugins/intel_cpu/src/nodes/roll.cpp b/src/plugins/intel_cpu/src/nodes/roll.cpp index 4c5a3f2bd7103e..02144d3e861786 100644 --- a/src/plugins/intel_cpu/src/nodes/roll.cpp +++ b/src/plugins/intel_cpu/src/nodes/roll.cpp @@ -22,7 +22,7 @@ namespace ov { namespace intel_cpu { namespace node { -bool Roll::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool Roll::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const auto interp = std::dynamic_pointer_cast(op); if (!interp) { @@ -35,7 +35,7 @@ bool Roll::isSupportedOperation(const std::shared_ptr& op, s return true; } -Roll::Roll(const std::shared_ptr& op, const GraphContext::CPtr context) : +Roll::Roll(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/roll.h b/src/plugins/intel_cpu/src/nodes/roll.h index dcaf32c144eecd..3e770a1c43fd45 100644 --- a/src/plugins/intel_cpu/src/nodes/roll.h +++ b/src/plugins/intel_cpu/src/nodes/roll.h @@ -14,7 +14,7 @@ namespace node { class Roll : public Node { public: - Roll(const std::shared_ptr& op, const GraphContext::CPtr context); + Roll(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; @@ -24,7 +24,7 @@ class Roll : public Node { void prepareParams() override; void executeDynamicImpl(dnnl::stream strm) override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: struct RollExecutor { diff --git a/src/plugins/intel_cpu/src/nodes/scatter_update.cpp b/src/plugins/intel_cpu/src/nodes/scatter_update.cpp index 6890ecda0c2cf7..17d8047d75e420 100644 --- a/src/plugins/intel_cpu/src/nodes/scatter_update.cpp +++ b/src/plugins/intel_cpu/src/nodes/scatter_update.cpp @@ -21,11 +21,11 @@ namespace ov { namespace intel_cpu { namespace node { -bool ScatterUpdate::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool ScatterUpdate::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { - auto scatterElemUpd = ngraph::as_type_ptr(op); - auto scatterUpd = ngraph::as_type_ptr(op); - auto scatterNdUpd = ngraph::as_type_ptr(op); + auto scatterElemUpd = ov::as_type_ptr(op); + auto scatterUpd = ov::as_type_ptr(op); + auto scatterNdUpd = ov::as_type_ptr(op); if (!scatterElemUpd && !scatterUpd && !scatterNdUpd) { const std::string opType = op->get_type_name(); errorMessage = "Only opset" + opType == "ScatterNDUpdate" ? "4 " : "3 " + opType + " operation is supported"; @@ -41,7 +41,7 @@ bool ScatterUpdate::isExecutable() const { return !isInputTensorAtPortEmpty(DATA_ID); } -ScatterUpdate::ScatterUpdate(const std::shared_ptr& op, const GraphContext::CPtr context) +ScatterUpdate::ScatterUpdate(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)), dataSize(0lu), indicesSize(0lu), axisSize(0lu), dataPrec(Precision::UNSPECIFIED), diff --git a/src/plugins/intel_cpu/src/nodes/scatter_update.h b/src/plugins/intel_cpu/src/nodes/scatter_update.h index 835077b89778b5..512110ef2dc646 100644 --- a/src/plugins/intel_cpu/src/nodes/scatter_update.h +++ b/src/plugins/intel_cpu/src/nodes/scatter_update.h @@ -22,7 +22,7 @@ enum class ScatterUpdateMode { class ScatterUpdate : public Node { public: - ScatterUpdate(const std::shared_ptr& op, const GraphContext::CPtr context); + ScatterUpdate(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; @@ -36,7 +36,7 @@ class ScatterUpdate : public Node { void executeDynamicImpl(dnnl::stream strm) override; bool isExecutable() const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: void scatterUpdate(uint8_t *indicesPtr, uint8_t *updatePtr, int axis, uint8_t *dstDataPtr); diff --git a/src/plugins/intel_cpu/src/nodes/shapeof.cpp b/src/plugins/intel_cpu/src/nodes/shapeof.cpp index 6fe2c5ff1988e9..f4b1dba3316642 100644 --- a/src/plugins/intel_cpu/src/nodes/shapeof.cpp +++ b/src/plugins/intel_cpu/src/nodes/shapeof.cpp @@ -12,7 +12,7 @@ namespace ov { namespace intel_cpu { namespace node { -bool ShapeOf::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool ShapeOf::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { if (!one_of(op->get_type_info(), ngraph::op::v0::ShapeOf::get_type_info_static(), @@ -26,7 +26,7 @@ bool ShapeOf::isSupportedOperation(const std::shared_ptr& op return true; } -ShapeOf::ShapeOf(const std::shared_ptr& op, const GraphContext::CPtr context) +ShapeOf::ShapeOf(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, ShapeOfShapeInferFactory()) { std::string errorMessage; if (isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/shapeof.h b/src/plugins/intel_cpu/src/nodes/shapeof.h index e313d3449e5f98..0955e6f172d15b 100644 --- a/src/plugins/intel_cpu/src/nodes/shapeof.h +++ b/src/plugins/intel_cpu/src/nodes/shapeof.h @@ -16,7 +16,7 @@ namespace node { class ShapeOf : public Node { public: - ShapeOf(const std::shared_ptr& op, const GraphContext::CPtr context); + ShapeOf(const std::shared_ptr& op, const GraphContext::CPtr context); void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; @@ -27,7 +27,7 @@ class ShapeOf : public Node { bool isExecutable() const override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: std::string errorPrefix; diff --git a/src/plugins/intel_cpu/src/nodes/shuffle_channels.cpp b/src/plugins/intel_cpu/src/nodes/shuffle_channels.cpp index b6b7ac95e019c4..0114c6c89af178 100644 --- a/src/plugins/intel_cpu/src/nodes/shuffle_channels.cpp +++ b/src/plugins/intel_cpu/src/nodes/shuffle_channels.cpp @@ -52,7 +52,7 @@ bool ShuffleChannels::ShuffleChannelsAttributes::operator==(const ShuffleChannel return result; } -bool ShuffleChannels::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool ShuffleChannels::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { auto shuffleChannels = ov::as_type_ptr(op); if (!shuffleChannels) { @@ -65,7 +65,7 @@ bool ShuffleChannels::isSupportedOperation(const std::shared_ptr& op, const GraphContext::CPtr context) +ShuffleChannels::ShuffleChannels(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { diff --git a/src/plugins/intel_cpu/src/nodes/shuffle_channels.h b/src/plugins/intel_cpu/src/nodes/shuffle_channels.h index 27f26242e5443c..0aba7944760c64 100644 --- a/src/plugins/intel_cpu/src/nodes/shuffle_channels.h +++ b/src/plugins/intel_cpu/src/nodes/shuffle_channels.h @@ -17,10 +17,10 @@ namespace node { class ShuffleChannels : public Node { public: - ShuffleChannels(const std::shared_ptr& op, const GraphContext::CPtr context); + ShuffleChannels(const std::shared_ptr& op, const GraphContext::CPtr context); ~ShuffleChannels() override = default; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; void getSupportedDescriptors() override {}; void initSupportedPrimitiveDescriptors() override; void createPrimitive() override; diff --git a/src/plugins/intel_cpu/src/nodes/softmax.cpp b/src/plugins/intel_cpu/src/nodes/softmax.cpp index 503159328e48b6..159a19b46b80ef 100644 --- a/src/plugins/intel_cpu/src/nodes/softmax.cpp +++ b/src/plugins/intel_cpu/src/nodes/softmax.cpp @@ -55,7 +55,7 @@ bool SoftmaxKey::operator==(const SoftmaxKey& rhs) const { } // namespace -bool SoftMax::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool SoftMax::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { if (!std::dynamic_pointer_cast(op)) { errorMessage = "Only opset1 Softmax operation is supported"; @@ -67,13 +67,13 @@ bool SoftMax::isSupportedOperation(const std::shared_ptr& op return true; } -SoftMax::SoftMax(const std::shared_ptr& op, const GraphContext::CPtr context) : +SoftMax::SoftMax(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, PassThroughShapeInferFactory()) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { OPENVINO_THROW_NOT_IMPLEMENTED(errorMessage); } - axis = ngraph::as_type_ptr(op)->get_axis(); + axis = ov::as_type_ptr(op)->get_axis(); } void SoftMax::getSupportedDescriptors() { diff --git a/src/plugins/intel_cpu/src/nodes/softmax.h b/src/plugins/intel_cpu/src/nodes/softmax.h index 1a472075168406..aef492ded34cbe 100644 --- a/src/plugins/intel_cpu/src/nodes/softmax.h +++ b/src/plugins/intel_cpu/src/nodes/softmax.h @@ -19,7 +19,7 @@ namespace node { class SoftMax : public Node { public: - SoftMax(const std::shared_ptr& op, const GraphContext::CPtr context); + SoftMax(const std::shared_ptr& op, const GraphContext::CPtr context); void initOptimalPrimitiveDescriptor() override; void createDescriptor(const std::vector& inputDesc, @@ -31,7 +31,7 @@ class SoftMax : public Node { void execute(dnnl::stream strm) override; void executeDynamicImpl(dnnl::stream strm) override; - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; private: using executorPtr = std::shared_ptr; diff --git a/src/plugins/intel_cpu/src/nodes/space_to_depth.cpp b/src/plugins/intel_cpu/src/nodes/space_to_depth.cpp index 624837f9de7ff6..0a03502d213b21 100644 --- a/src/plugins/intel_cpu/src/nodes/space_to_depth.cpp +++ b/src/plugins/intel_cpu/src/nodes/space_to_depth.cpp @@ -51,7 +51,7 @@ bool SpaceToDepth::SpaceToDepthAttrs::operator==(const SpaceToDepthAttrs& rhs) c return result; } -bool SpaceToDepth::isSupportedOperation(const std::shared_ptr& op, +bool SpaceToDepth::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { const auto spaceToDepth = ov::as_type_ptr(op); @@ -63,7 +63,7 @@ bool SpaceToDepth::isSupportedOperation(const std::shared_ptr& op, const GraphContext::CPtr context) +SpaceToDepth::SpaceToDepth(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, EMPTY_PORT_MASK)) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { @@ -91,7 +91,7 @@ SpaceToDepth::SpaceToDepth(const std::shared_ptr& op, const GraphC } else if (modeNgraph == ngraph::op::v0::SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST) { attrs.mode = Mode::DEPTH_FIRST; } else { - THROW_ERROR("doesn't support mode: ", ngraph::as_string(modeNgraph)); + THROW_ERROR("doesn't support mode: ", ov::as_string(modeNgraph)); } attrs.blockSize = spaceToDepth->get_block_size(); diff --git a/src/plugins/intel_cpu/src/nodes/space_to_depth.h b/src/plugins/intel_cpu/src/nodes/space_to_depth.h index 541a6a0eada52b..9cd03b875d5b25 100644 --- a/src/plugins/intel_cpu/src/nodes/space_to_depth.h +++ b/src/plugins/intel_cpu/src/nodes/space_to_depth.h @@ -15,9 +15,9 @@ namespace node { class SpaceToDepth : public Node { public: - SpaceToDepth(const std::shared_ptr& op, const GraphContext::CPtr context); + SpaceToDepth(const std::shared_ptr& op, const GraphContext::CPtr context); - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; void createPrimitive() override; diff --git a/src/plugins/intel_cpu/src/nodes/split.cpp b/src/plugins/intel_cpu/src/nodes/split.cpp index 4023ab78f7dad7..9c5ab3fe77fc0b 100644 --- a/src/plugins/intel_cpu/src/nodes/split.cpp +++ b/src/plugins/intel_cpu/src/nodes/split.cpp @@ -23,13 +23,13 @@ namespace ov { namespace intel_cpu { namespace node { -bool Split::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { +bool Split::isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept { try { if (!one_of(op->get_type_info(), ngraph::op::v1::Split::get_type_info_static(), ngraph::op::v1::VariadicSplit::get_type_info_static())) { errorMessage = "Only opset1 Split and VariadicSplit operations are supported"; return false; } - auto axisOp = ngraph::as_type_ptr(op->get_input_node_shared_ptr(1)); + auto axisOp = ov::as_type_ptr(op->get_input_node_shared_ptr(1)); if (!axisOp) { errorMessage = "Constant expected as the axis input."; return false; @@ -44,25 +44,25 @@ bool Split::isSupportedOperation(const std::shared_ptr& op, return true; } -Split::Split(const std::shared_ptr& op, const GraphContext::CPtr context) : +Split::Split(const std::shared_ptr& op, const GraphContext::CPtr context) : Node(op, context, NgraphShapeInferFactory(op, PortMask(1, 2))) { std::string errorMessage; if (!isSupportedOperation(op, errorMessage)) { OPENVINO_THROW_NOT_IMPLEMENTED(errorMessage); } - if (ngraph::as_type_ptr(op)) { + if (ov::as_type_ptr(op)) { INPUTS_NUM = 2; - } else if (ngraph::as_type_ptr(op)) { + } else if (ov::as_type_ptr(op)) { INPUTS_NUM = 3; - if (!ngraph::is_type(op->get_input_node_shared_ptr(2))) { + if (!ov::is_type(op->get_input_node_shared_ptr(2))) { this->splitLengths.resize(op->get_input_shape(2)[0]); this->constSplitLengths = false; } } const auto inRank = getInputShapeAtPort(0).getRank(); - auto axisOp = ngraph::as_type_ptr(op->get_input_node_shared_ptr(1)); + auto axisOp = ov::as_type_ptr(op->get_input_node_shared_ptr(1)); auto axis = axisOp->cast_vector()[0]; if (axis < 0) { axis += inRank; diff --git a/src/plugins/intel_cpu/src/nodes/split.h b/src/plugins/intel_cpu/src/nodes/split.h index 5402d748832d7d..58750dde65fdb2 100644 --- a/src/plugins/intel_cpu/src/nodes/split.h +++ b/src/plugins/intel_cpu/src/nodes/split.h @@ -14,9 +14,9 @@ namespace node { class Split : public Node { public: - Split(const std::shared_ptr& op, const GraphContext::CPtr context); + Split(const std::shared_ptr& op, const GraphContext::CPtr context); - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; void selectOptimalPrimitiveDescriptor() override; diff --git a/src/plugins/intel_cpu/src/nodes/subgraph.h b/src/plugins/intel_cpu/src/nodes/subgraph.h index 086e84e15ba631..f7cfa9a7258810 100644 --- a/src/plugins/intel_cpu/src/nodes/subgraph.h +++ b/src/plugins/intel_cpu/src/nodes/subgraph.h @@ -24,7 +24,7 @@ namespace node { /// precision: fp32 class Snippet : public Node { public: - Snippet(const std::shared_ptr& op, const GraphContext::CPtr& context); + Snippet(const std::shared_ptr& op, const GraphContext::CPtr& context); ~Snippet() override = default; void getSupportedDescriptors() override {}; diff --git a/src/plugins/intel_cpu/src/nodes/tensoriterator.cpp b/src/plugins/intel_cpu/src/nodes/tensoriterator.cpp index bf5cdb0bf2f930..88d6521736963f 100644 --- a/src/plugins/intel_cpu/src/nodes/tensoriterator.cpp +++ b/src/plugins/intel_cpu/src/nodes/tensoriterator.cpp @@ -183,7 +183,7 @@ class asBoolCheck : public PortChecker { public: asBoolCheck(const MemoryPtr &mem) { OPENVINO_ASSERT(mem->getDataType() == memory::data_type::u8); - OPENVINO_ASSERT(mem->getShape() == Shape(InferenceEngine::SizeVector{1})); + OPENVINO_ASSERT(mem->getShape() == Shape(VectorDims{1})); mem_holder = mem->getPrimitive(); } @@ -200,7 +200,7 @@ class asIntCheck : public PortChecker { public: asIntCheck(const MemoryPtr &mem) { OPENVINO_ASSERT(mem->getDataType() == memory::data_type::s32); - OPENVINO_ASSERT(mem->getShape() == Shape(InferenceEngine::SizeVector{1})); + OPENVINO_ASSERT(mem->getShape() == Shape(VectorDims{1})); mem_holder = mem->getPrimitive(); } diff --git a/src/plugins/intel_cpu/src/nodes/topk.cpp b/src/plugins/intel_cpu/src/nodes/topk.cpp index d91a4a46881d00..ca5bd29c2a0928 100644 --- a/src/plugins/intel_cpu/src/nodes/topk.cpp +++ b/src/plugins/intel_cpu/src/nodes/topk.cpp @@ -1851,7 +1851,7 @@ TopK::TopK(const std::shared_ptr& op, const GraphContext::CPtr context stable = false; if (!sort_index) { - const auto topKOpV11 = ngraph::as_type_ptr(op); + const auto topKOpV11 = ov::as_type_ptr(op); if (topKOpV11) { stable = topKOpV11->get_stable(); } diff --git a/src/plugins/intel_cpu/src/nodes/topk.h b/src/plugins/intel_cpu/src/nodes/topk.h index f737857073c8fd..fcb98fbdcf260b 100644 --- a/src/plugins/intel_cpu/src/nodes/topk.h +++ b/src/plugins/intel_cpu/src/nodes/topk.h @@ -80,7 +80,7 @@ struct jit_uni_topk_kernel { class TopK : public Node { public: - TopK(const std::shared_ptr& op, const GraphContext::CPtr context); + TopK(const std::shared_ptr& op, const GraphContext::CPtr context); ~TopK() override = default; void getSupportedDescriptors() override; @@ -96,7 +96,7 @@ class TopK : public Node { return false; } - static bool isSupportedOperation(const std::shared_ptr &op, std::string &errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr &op, std::string &errorMessage) noexcept; private: void topk_process(const uint8_t *in_ptr, uint8_t *out_ptr, uint8_t *dst_idx); diff --git a/src/plugins/intel_cpu/src/nodes/transpose.h b/src/plugins/intel_cpu/src/nodes/transpose.h index 0712e48c65d33e..61f95048729709 100644 --- a/src/plugins/intel_cpu/src/nodes/transpose.h +++ b/src/plugins/intel_cpu/src/nodes/transpose.h @@ -18,9 +18,9 @@ namespace node { class Transpose : public Node { public: - Transpose(const std::shared_ptr& op, const GraphContext::CPtr context); + Transpose(const std::shared_ptr& op, const GraphContext::CPtr context); - static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; + static bool isSupportedOperation(const std::shared_ptr& op, std::string& errorMessage) noexcept; void getSupportedDescriptors() override; void initSupportedPrimitiveDescriptors() override; void createPrimitive() override; @@ -30,7 +30,7 @@ class Transpose : public Node { return false; } - const InferenceEngine::SizeVector& getOrder() const { + const VectorDims& getOrder() const { return order; } @@ -49,7 +49,7 @@ class Transpose : public Node { private: TransposeExecutorPtr execPtr = nullptr; dnnl::primitive prim; - InferenceEngine::SizeVector order; + VectorDims order; InferenceEngine::Precision prec; TransposeParams transposeParams; diff --git a/src/plugins/intel_cpu/src/shape_inference/custom/fullyconnected.hpp b/src/plugins/intel_cpu/src/shape_inference/custom/fullyconnected.hpp index d950f6b8f7ada6..9fa8adac845fd5 100644 --- a/src/plugins/intel_cpu/src/shape_inference/custom/fullyconnected.hpp +++ b/src/plugins/intel_cpu/src/shape_inference/custom/fullyconnected.hpp @@ -34,7 +34,7 @@ class FCShapeInferFactory : public ShapeInferFactory { } private: - std::shared_ptr m_op; + std::shared_ptr m_op; }; } // namespace node } // namespace intel_cpu diff --git a/src/plugins/intel_cpu/src/shape_inference/custom/matmul.hpp b/src/plugins/intel_cpu/src/shape_inference/custom/matmul.hpp index 25263cfa6fcb67..ac27853efe79e4 100644 --- a/src/plugins/intel_cpu/src/shape_inference/custom/matmul.hpp +++ b/src/plugins/intel_cpu/src/shape_inference/custom/matmul.hpp @@ -34,10 +34,10 @@ class MMShapeInfer : public ShapeInferEmptyPads { class MMShapeInferFactory : public ShapeInferFactory { public: - MMShapeInferFactory(const std::shared_ptr& op) : m_op(op) {} + MMShapeInferFactory(const std::shared_ptr& op) : m_op(op) {} ShapeInferPtr makeShapeInfer() const override; private: - std::shared_ptr m_op; + std::shared_ptr m_op; }; } // namespace node } // namespace intel_cpu diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/convert_group_conv.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/convert_group_conv.cpp index b4c8738b6e9f10..a156c197d9b5b5 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/convert_group_conv.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/convert_group_conv.cpp @@ -11,9 +11,9 @@ #include ov::intel_cpu::ConvertGroupConvolution::ConvertGroupConvolution() { - auto gconv = ngraph::pattern::wrap_type(); + auto gconv = ov::pass::pattern::wrap_type(); - ngraph::matcher_pass_callback callback = [](ngraph::pattern::Matcher& m) { + ov::matcher_pass_callback callback = [](ov::pass::pattern::Matcher& m) { enum Inputs {Data, Weights}; auto gconv = std::dynamic_pointer_cast(m.get_match_root()); if (!gconv) { @@ -36,21 +36,21 @@ ov::intel_cpu::ConvertGroupConvolution::ConvertGroupConvolution() { return false; } - ngraph::NodeVector replace_nodes; + ov::NodeVector replace_nodes; auto split_weights = std::make_shared(gconv->input_value(Inputs::Weights), - ov::opset8::Constant::create(ngraph::element::i64, ngraph::Shape{}, {0}), + ov::opset8::Constant::create(ov::element::i64, ov::Shape{}, {0}), groups); replace_nodes.push_back(split_weights); - auto axis = ov::opset8::Constant::create(ngraph::element::i64, ngraph::Shape{}, {channel_axis}); + auto axis = ov::opset8::Constant::create(ov::element::i64, ov::Shape{}, {channel_axis}); auto split = std::make_shared(gconv->input_value(Inputs::Data), axis, groups); replace_nodes.push_back(split); - ngraph::NodeVector concat_inputs; + ov::NodeVector concat_inputs; for (int64_t g = 0; g < groups; g++) { auto out = split->output(g); auto filter = std::make_shared(split_weights->output(g), - ov::opset8::Constant::create(ngraph::element::i64, ngraph::Shape{}, {0})); + ov::opset8::Constant::create(ov::element::i64, ov::Shape{}, {0})); auto conv = std::make_shared(out, filter, gconv->get_strides(), @@ -65,10 +65,10 @@ ov::intel_cpu::ConvertGroupConvolution::ConvertGroupConvolution() { replace_nodes.push_back(concat); concat->set_friendly_name(gconv->get_friendly_name()); - ngraph::copy_runtime_info(gconv, replace_nodes); - ngraph::replace_node(gconv, concat); + ov::copy_runtime_info(gconv, replace_nodes); + ov::replace_node(gconv, concat); return true; }; - auto m = std::make_shared(gconv, "ConvertGroupConvolution"); + auto m = std::make_shared(gconv, "ConvertGroupConvolution"); register_matcher(m, callback); } diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/convert_group_conv1d.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/convert_group_conv1d.cpp index bf89620604c326..eed970dde53923 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/convert_group_conv1d.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/convert_group_conv1d.cpp @@ -12,8 +12,8 @@ #include template -ngraph::matcher_pass_callback ov::intel_cpu::ConvertConv1DBase::convert_conv1d_to_conv2d() { - return [&](ngraph::pattern::Matcher& m) { +ov::matcher_pass_callback ov::intel_cpu::ConvertConv1DBase::convert_conv1d_to_conv2d() { + return [&](ov::pass::pattern::Matcher& m) { auto conv = std::dynamic_pointer_cast(m.get_match_root()); if (!conv) { return false; @@ -31,12 +31,12 @@ ngraph::matcher_pass_callback ov::intel_cpu::ConvertConv1DBase::convert_conv1d_t auto weights2d_shape = weights.get_shape(); weights2d_shape.push_back(1); - auto w_shape = std::make_shared(ngraph::element::i64, ngraph::Shape{weights2d_shape.size()}, weights2d_shape); + auto w_shape = std::make_shared(ov::element::i64, ov::Shape{weights2d_shape.size()}, weights2d_shape); - auto getUnsqueeze = [&](const ngraph::Output& node) { + auto getUnsqueeze = [&](const ov::Output& node) { auto rank = node.get_partial_shape().rank().get_length(); return std::make_shared(node, - ov::opset1::Constant::create(ngraph::element::i64, ngraph::Shape{1}, {rank})); + ov::opset1::Constant::create(ov::element::i64, ov::Shape{1}, {rank})); }; auto input2d = getUnsqueeze(input); @@ -52,27 +52,27 @@ ngraph::matcher_pass_callback ov::intel_cpu::ConvertConv1DBase::convert_conv1d_t auto reshape = std::make_shared( conv2d, - ov::opset1::Constant::create(ngraph::element::i64, ngraph::Shape{1}, {input_shape.rank().get_length()})); + ov::opset1::Constant::create(ov::element::i64, ov::Shape{1}, {input_shape.rank().get_length()})); reshape->set_friendly_name(conv->get_friendly_name()); - ngraph::copy_runtime_info(conv, {input2d, weights2d, conv2d, reshape}); - ngraph::replace_node(conv, reshape); + ov::copy_runtime_info(conv, {input2d, weights2d, conv2d, reshape}); + ov::replace_node(conv, reshape); return true; }; } ov::intel_cpu::ConvertConv1D::ConvertConv1D() { - auto m = std::make_shared( - ngraph::pattern::wrap_type({ngraph::pattern::any_input(), - ngraph::pattern::any_input()}), + auto m = std::make_shared( + ov::pass::pattern::wrap_type({ov::pass::pattern::any_input(), + ov::pass::pattern::any_input()}), "ConvertConvolutionToArm"); register_matcher(m, convert_conv1d_to_conv2d()); } ov::intel_cpu::ConvertGroupConv1D::ConvertGroupConv1D() { - auto m = std::make_shared( - ngraph::pattern::wrap_type({ngraph::pattern::any_input(), - ngraph::pattern::any_input()}), + auto m = std::make_shared( + ov::pass::pattern::wrap_type({ov::pass::pattern::any_input(), + ov::pass::pattern::any_input()}), "ConvertGroupConvolutionToArm"); register_matcher(m, convert_conv1d_to_conv2d()); } \ No newline at end of file diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/convert_group_conv1d.hpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/convert_group_conv1d.hpp index 2759a97818e9e9..a17969ecb76760 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/convert_group_conv1d.hpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/convert_group_conv1d.hpp @@ -56,7 +56,7 @@ class ConvertConv1DBase: public ov::pass::MatcherPass { protected: OPENVINO_RTTI("ConvertConv1DBase", "0"); template - ngraph::matcher_pass_callback convert_conv1d_to_conv2d(); + ov::matcher_pass_callback convert_conv1d_to_conv2d(); }; class ConvertConv1D: public ConvertConv1DBase { diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/convert_reduce_multi_axis.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/convert_reduce_multi_axis.cpp index 09fc9fc0f276ef..5bf26a81554846 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/convert_reduce_multi_axis.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/convert_reduce_multi_axis.cpp @@ -10,8 +10,8 @@ #include template -ngraph::matcher_pass_callback ov::intel_cpu::ConvertReduceMultiAxisBase::convert_reduce() { - return [&](ngraph::pattern::Matcher& m) { +ov::matcher_pass_callback ov::intel_cpu::ConvertReduceMultiAxisBase::convert_reduce() { + return [&](ov::pass::pattern::Matcher& m) { auto reduce = std::dynamic_pointer_cast(m.get_match_root()); if (!reduce) { return false; @@ -24,7 +24,7 @@ ngraph::matcher_pass_callback ov::intel_cpu::ConvertReduceMultiAxisBase::convert if (!reduction_axes) { return false; } - if (ngraph::shape_size(input1.get_shape()) <= 1) { + if (ov::shape_size(input1.get_shape()) <= 1) { return false; } @@ -35,50 +35,50 @@ ngraph::matcher_pass_callback ov::intel_cpu::ConvertReduceMultiAxisBase::convert } } - ngraph::NodeVector new_ops; - std::shared_ptr node = input0.get_node_shared_ptr(); + ov::NodeVector new_ops; + std::shared_ptr node = input0.get_node_shared_ptr(); bool keepDims = reduce->get_keep_dims(); //axes should be sorted in descending order if keepDims is false to be keep axis within data shape if (!keepDims) { sort(axes.begin(), axes.end(), std::greater()); } for (auto axis : axes) { - auto reduction_axis = ov::opset8::Constant::create(ngraph::element::i64, ngraph::Shape{}, {axis}); + auto reduction_axis = ov::opset8::Constant::create(ov::element::i64, ov::Shape{}, {axis}); node = std::make_shared(node, reduction_axis, keepDims); new_ops.push_back(node); } node->set_friendly_name(reduce->get_friendly_name()); - ngraph::copy_runtime_info(reduce, new_ops); - ngraph::replace_node(reduce, node); + ov::copy_runtime_info(reduce, new_ops); + ov::replace_node(reduce, node); return true; }; } ov::intel_cpu::ConvertReduceProd::ConvertReduceProd() { - auto m = std::make_shared( - ngraph::pattern::wrap_type({ngraph::pattern::any_input(), - ngraph::pattern::wrap_type()}), "ConvertReduceProd"); + auto m = std::make_shared( + ov::pass::pattern::wrap_type({ov::pass::pattern::any_input(), + ov::pass::pattern::wrap_type()}), "ConvertReduceProd"); register_matcher(m, convert_reduce()); } ov::intel_cpu::ConvertReduceMin::ConvertReduceMin() { - auto m = std::make_shared( - ngraph::pattern::wrap_type({ngraph::pattern::any_input(), - ngraph::pattern::wrap_type()}), "ConvertReduceMin"); + auto m = std::make_shared( + ov::pass::pattern::wrap_type({ov::pass::pattern::any_input(), + ov::pass::pattern::wrap_type()}), "ConvertReduceMin"); register_matcher(m, convert_reduce()); } ov::intel_cpu::ConvertReduceMax::ConvertReduceMax() { - auto m = std::make_shared( - ngraph::pattern::wrap_type({ngraph::pattern::any_input(), - ngraph::pattern::wrap_type()}), "ConvertReduceMax"); + auto m = std::make_shared( + ov::pass::pattern::wrap_type({ov::pass::pattern::any_input(), + ov::pass::pattern::wrap_type()}), "ConvertReduceMax"); register_matcher(m, convert_reduce()); } ov::intel_cpu::ConvertReduceSum::ConvertReduceSum() { - auto m = std::make_shared( - ngraph::pattern::wrap_type({ngraph::pattern::any_input(), - ngraph::pattern::wrap_type()}), "ConvertReduceSum"); + auto m = std::make_shared( + ov::pass::pattern::wrap_type({ov::pass::pattern::any_input(), + ov::pass::pattern::wrap_type()}), "ConvertReduceSum"); register_matcher(m, convert_reduce()); } diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/convert_reduce_multi_axis.hpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/convert_reduce_multi_axis.hpp index f4a90a9e27512a..5946f547c447d0 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/convert_reduce_multi_axis.hpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/convert_reduce_multi_axis.hpp @@ -53,7 +53,7 @@ class ConvertReduceMultiAxisBase: public ov::pass::MatcherPass { public: OPENVINO_RTTI("ConvertReduceMultiAxisBase", "0"); template - ngraph::matcher_pass_callback convert_reduce(); + ov::matcher_pass_callback convert_reduce(); }; class ConvertReduceProd: public ConvertReduceMultiAxisBase { diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/mish_decomposition.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/mish_decomposition.cpp index ad7d17682feae5..9777a553642e3c 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/mish_decomposition.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/mish_decomposition.cpp @@ -8,26 +8,26 @@ #include ov::intel_cpu::MishDecomposition::MishDecomposition() { - auto mish = ngraph::pattern::wrap_type(); + auto mish = ov::pass::pattern::wrap_type(); - ngraph::matcher_pass_callback callback = [](ngraph::pattern::Matcher& m) { + ov::matcher_pass_callback callback = [](ov::pass::pattern::Matcher& m) { auto mish = std::dynamic_pointer_cast(m.get_match_root()); if (!mish) { return false; } auto exp = std::make_shared(mish->input_value(0)); - auto add = std::make_shared(exp, opset4::Constant::create(mish->get_output_element_type(0), ngraph::Shape{}, {1.0f})); + auto add = std::make_shared(exp, opset4::Constant::create(mish->get_output_element_type(0), ov::Shape{}, {1.0f})); auto log = std::make_shared(add); auto tanh = std::make_shared(log); auto mul = std::make_shared(mish->input_value(0), tanh); mul->set_friendly_name(mish->get_friendly_name()); - ngraph::copy_runtime_info(mish, {exp, add, log, tanh, mul}); - ngraph::replace_node(mish, mul); + ov::copy_runtime_info(mish, {exp, add, log, tanh, mul}); + ov::replace_node(mish, mul); return true; }; - auto m = std::make_shared(mish, "MishDecomposition"); + auto m = std::make_shared(mish, "MishDecomposition"); register_matcher(m, callback); } \ No newline at end of file diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/fully_connected.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/fully_connected.cpp index 5ab69c5cb963b0..556a8b2a8a2b1a 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/fully_connected.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/fully_connected.cpp @@ -5,15 +5,15 @@ #include "fully_connected.hpp" #include "transformations/itt.hpp" -ov::intel_cpu::FullyConnectedNode::FullyConnectedNode(const ngraph::Output& A, - const ngraph::Output& B, - const ngraph::Rank& output_rank, - const ngraph::element::Type output_type) +ov::intel_cpu::FullyConnectedNode::FullyConnectedNode(const ov::Output& A, + const ov::Output& B, + const ov::Rank& output_rank, + const ov::element::Type output_type) : Op({A, B}), m_output_rank(output_rank), m_output_type(output_type) { validate_and_infer_types(); } -std::shared_ptr ov::intel_cpu::FullyConnectedNode::clone_with_new_inputs(const ngraph::OutputVector& new_args) const { +std::shared_ptr ov::intel_cpu::FullyConnectedNode::clone_with_new_inputs(const ov::OutputVector& new_args) const { INTERNAL_OP_SCOPE(FullyConnectedNode_clone_with_new_inputs); check_new_args_count(this, new_args); @@ -67,11 +67,11 @@ void ov::intel_cpu::FullyConnectedNode::validate_and_infer_types() { output_pshape = ngraph::PartialShape::dynamic(); } - auto output_type = m_output_type == ngraph::element::undefined ? get_input_element_type(0) : m_output_type; + auto output_type = m_output_type == ov::element::undefined ? get_input_element_type(0) : m_output_type; set_output_type(0, output_type, output_pshape); } -bool ov::intel_cpu::FullyConnectedNode::visit_attributes(ngraph::AttributeVisitor &visitor) { +bool ov::intel_cpu::FullyConnectedNode::visit_attributes(ov::AttributeVisitor &visitor) { INTERNAL_OP_SCOPE(FullyConnectedNode_visit_attributes); visitor.on_attribute("out-rank", m_output_rank); visitor.on_attribute("out-type", m_output_type); diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/fully_connected.hpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/fully_connected.hpp index 32285c24d1fffc..09c8eca3a8b754 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/fully_connected.hpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/fully_connected.hpp @@ -16,23 +16,23 @@ class FullyConnectedNode : public ngraph::op::Op { FullyConnectedNode() = default; - FullyConnectedNode(const ngraph::Output &A, - const ngraph::Output &B, - const ngraph::Rank& output_rank, - const ngraph::element::Type output_type = ngraph::element::undefined); + FullyConnectedNode(const ov::Output &A, + const ov::Output &B, + const ov::Rank& output_rank, + const ov::element::Type output_type = ov::element::undefined); - bool visit_attributes(ngraph::AttributeVisitor &visitor) override; + bool visit_attributes(ov::AttributeVisitor &visitor) override; void validate_and_infer_types() override; - std::shared_ptr clone_with_new_inputs(const ngraph::OutputVector& new_args) const override; + std::shared_ptr clone_with_new_inputs(const ov::OutputVector& new_args) const override; - ngraph::Rank get_output_rank() const { return m_output_rank; } - ngraph::element::Type get_output_type() const { return m_output_type; } + ov::Rank get_output_rank() const { return m_output_rank; } + ov::element::Type get_output_type() const { return m_output_type; } private: - ngraph::Rank m_output_rank; - ngraph::element::Type m_output_type; + ov::Rank m_output_rank; + ov::element::Type m_output_type; }; } // namespace intel_cpu diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/leaky_relu.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/leaky_relu.cpp index a4859da189b041..480677af1be2b8 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/leaky_relu.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/leaky_relu.cpp @@ -5,14 +5,14 @@ #include "leaky_relu.hpp" #include "transformations/itt.hpp" -ov::intel_cpu::LeakyReluNode::LeakyReluNode(const ngraph::Output &data, +ov::intel_cpu::LeakyReluNode::LeakyReluNode(const ov::Output &data, const float &negative_slope, - const ngraph::element::Type output_type) + const ov::element::Type output_type) : Op({data}), m_negative_slope(negative_slope), m_output_type(output_type) { validate_and_infer_types(); } -std::shared_ptr ov::intel_cpu::LeakyReluNode::clone_with_new_inputs(const ngraph::OutputVector& new_args) const { +std::shared_ptr ov::intel_cpu::LeakyReluNode::clone_with_new_inputs(const ov::OutputVector& new_args) const { INTERNAL_OP_SCOPE(LeakyReluNode_clone_with_new_inputs); check_new_args_count(this, new_args); return std::make_shared(new_args.at(0), m_negative_slope, m_output_type); @@ -22,11 +22,11 @@ void ov::intel_cpu::LeakyReluNode::validate_and_infer_types() { INTERNAL_OP_SCOPE(LeakyReluNode_validate_and_infer_types); set_output_type( 0, - m_output_type == ngraph::element::undefined ? get_input_element_type(0) : m_output_type, + m_output_type == ov::element::undefined ? get_input_element_type(0) : m_output_type, get_input_partial_shape(0)); } -bool ov::intel_cpu::LeakyReluNode::visit_attributes(ngraph::AttributeVisitor &visitor) { +bool ov::intel_cpu::LeakyReluNode::visit_attributes(ov::AttributeVisitor &visitor) { INTERNAL_OP_SCOPE(LeakyReluNode_visit_attributes); visitor.on_attribute("negative_slope", m_negative_slope); visitor.on_attribute("out-type", m_output_type); diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/leaky_relu.hpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/leaky_relu.hpp index 25b6d7c93b6c0f..d17902fafea96e 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/leaky_relu.hpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/leaky_relu.hpp @@ -15,21 +15,21 @@ class LeakyReluNode : public ngraph::op::Op { LeakyReluNode() = default; - LeakyReluNode(const ngraph::Output &data, const float &negative_slope, const ngraph::element::Type output_type); + LeakyReluNode(const ov::Output &data, const float &negative_slope, const ov::element::Type output_type); void validate_and_infer_types() override; - bool visit_attributes(ngraph::AttributeVisitor &visitor) override; + bool visit_attributes(ov::AttributeVisitor &visitor) override; - std::shared_ptr clone_with_new_inputs(const ngraph::OutputVector &new_args) const override; + std::shared_ptr clone_with_new_inputs(const ov::OutputVector &new_args) const override; float get_slope() { return m_negative_slope; } - ngraph::element::Type get_output_type() const { return m_output_type; } + ov::element::Type get_output_type() const { return m_output_type; } private: float m_negative_slope = 0.f; - ngraph::element::Type m_output_type; + ov::element::Type m_output_type; }; } // namespace intel_cpu diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/power_static.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/power_static.cpp index eacb0b53ee81b7..786785d5296d6c 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/power_static.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/power_static.cpp @@ -5,16 +5,16 @@ #include "power_static.hpp" #include "transformations/itt.hpp" -ov::intel_cpu::PowerStaticNode::PowerStaticNode(const ngraph::Output &data, +ov::intel_cpu::PowerStaticNode::PowerStaticNode(const ov::Output &data, const float &power, const float &scale, const float &shift, - const ngraph::element::Type output_type) + const ov::element::Type output_type) : Op({data}), scale(scale), power(power), shift(shift), m_output_type(output_type) { validate_and_infer_types(); } -std::shared_ptr ov::intel_cpu::PowerStaticNode::clone_with_new_inputs(const ngraph::OutputVector &new_args) const { +std::shared_ptr ov::intel_cpu::PowerStaticNode::clone_with_new_inputs(const ov::OutputVector &new_args) const { INTERNAL_OP_SCOPE(PowerStaticNode_clone_with_new_inputs); if (new_args.size() != 1) { OPENVINO_THROW("Incorrect number of new arguments"); @@ -25,10 +25,10 @@ std::shared_ptr ov::intel_cpu::PowerStaticNode::clone_with_new_inp void ov::intel_cpu::PowerStaticNode::validate_and_infer_types() { INTERNAL_OP_SCOPE(PowerStaticNode_validate_and_infer_types); - set_output_type(0, m_output_type == ngraph::element::undefined ? get_input_element_type(0) : m_output_type, get_input_partial_shape(0)); + set_output_type(0, m_output_type == ov::element::undefined ? get_input_element_type(0) : m_output_type, get_input_partial_shape(0)); } -bool ov::intel_cpu::PowerStaticNode::visit_attributes(ngraph::AttributeVisitor &visitor) { +bool ov::intel_cpu::PowerStaticNode::visit_attributes(ov::AttributeVisitor &visitor) { INTERNAL_OP_SCOPE(PowerStaticNode_visit_attributes); visitor.on_attribute("scale", scale); visitor.on_attribute("power", power); diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/power_static.hpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/power_static.hpp index 630d8566c82baf..b32ac5ba538097 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/power_static.hpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/power_static.hpp @@ -15,14 +15,14 @@ class PowerStaticNode : public ngraph::op::Op { PowerStaticNode() = default; - PowerStaticNode(const ngraph::Output &data, const float &power, const float &scale, const float &shift, - const ngraph::element::Type output_type = ngraph::element::undefined); + PowerStaticNode(const ov::Output &data, const float &power, const float &scale, const float &shift, + const ov::element::Type output_type = ov::element::undefined); void validate_and_infer_types() override; - bool visit_attributes(ngraph::AttributeVisitor &visitor) override; + bool visit_attributes(ov::AttributeVisitor &visitor) override; - std::shared_ptr clone_with_new_inputs(const ngraph::OutputVector &new_args) const override; + std::shared_ptr clone_with_new_inputs(const ov::OutputVector &new_args) const override; float get_power() const { return power; } float get_scale() const { return scale; } @@ -30,7 +30,7 @@ class PowerStaticNode : public ngraph::op::Op { private: float scale, power, shift; - ngraph::element::Type m_output_type; + ov::element::Type m_output_type; }; } // namespace intel_cpu diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/swish_cpu.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/swish_cpu.cpp index c398181b0f181d..4e56b8c0886331 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/swish_cpu.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/swish_cpu.cpp @@ -5,18 +5,18 @@ #include "swish_cpu.hpp" #include "transformations/itt.hpp" -ov::intel_cpu::SwishNode::SwishNode(const ngraph::Output & input, const float alpha) +ov::intel_cpu::SwishNode::SwishNode(const ov::Output & input, const float alpha) : Op({input}), m_alpha(alpha) { validate_and_infer_types(); } -std::shared_ptr ov::intel_cpu::SwishNode::clone_with_new_inputs(const ngraph::OutputVector& new_args) const { +std::shared_ptr ov::intel_cpu::SwishNode::clone_with_new_inputs(const ov::OutputVector& new_args) const { INTERNAL_OP_SCOPE(SwishNode_clone_with_new_inputs); check_new_args_count(this, new_args); return std::make_shared(new_args.at(0), m_alpha); } -bool ov::intel_cpu::SwishNode::visit_attributes(ngraph::AttributeVisitor& visitor) { +bool ov::intel_cpu::SwishNode::visit_attributes(ov::AttributeVisitor& visitor) { INTERNAL_OP_SCOPE(SwishNode_visit_attributes); visitor.on_attribute("alpha", m_alpha); return true; diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/swish_cpu.hpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/swish_cpu.hpp index 506bbf263d0a9e..edc8602f0256ac 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/swish_cpu.hpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/op/swish_cpu.hpp @@ -15,11 +15,11 @@ class SwishNode : public ngraph::op::Op { SwishNode() = default; - explicit SwishNode(const ngraph::Output &input, float alpha = 1.0); + explicit SwishNode(const ov::Output &input, float alpha = 1.0); void validate_and_infer_types() override; - bool visit_attributes(ngraph::AttributeVisitor& visitor) override; - std::shared_ptr clone_with_new_inputs(const ngraph::OutputVector &new_args) const override; + bool visit_attributes(ov::AttributeVisitor& visitor) override; + std::shared_ptr clone_with_new_inputs(const ov::OutputVector &new_args) const override; float get_alpha() const; diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/align_matmul_input_ranks.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/align_matmul_input_ranks.cpp index 0ad94336caea1d..4b0d8613e0549a 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/align_matmul_input_ranks.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/align_matmul_input_ranks.cpp @@ -16,14 +16,14 @@ ov::intel_cpu::AlignMatMulInputRanks::AlignMatMulInputRanks() { MATCHER_SCOPE(AlignMatMulInputRanks); - ngraph::OutputVector twoInputs = { - ngraph::pattern::any_input(ngraph::pattern::has_static_rank()), - ngraph::pattern::any_input(ngraph::pattern::has_static_rank()) + ov::OutputVector twoInputs = { + ov::pass::pattern::any_input(ov::pass::pattern::has_static_rank()), + ov::pass::pattern::any_input(ov::pass::pattern::has_static_rank()) }; - auto matmulPattern = ngraph::pattern::wrap_type(twoInputs); + auto matmulPattern = ov::pass::pattern::wrap_type(twoInputs); - ngraph::matcher_pass_callback callback = [this](ngraph::pattern::Matcher& m) { + ov::matcher_pass_callback callback = [this](ov::pass::pattern::Matcher& m) { auto matmul = std::dynamic_pointer_cast (m.get_match_root()); if (!matmul || transformation_callback(matmul)) @@ -44,7 +44,7 @@ ov::intel_cpu::AlignMatMulInputRanks::AlignMatMulInputRanks() { input0shape.size() != 1) return false; // nothing to do - auto getUnsqueeze = [&](const ngraph::Output& nodeFrom, const ngraph::Output& nodeTo) { + auto getUnsqueeze = [&](const ov::Output& nodeFrom, const ov::Output& nodeTo) { auto rankFrom = nodeFrom.get_partial_shape().size(); auto rankTo = nodeTo.get_partial_shape().size(); @@ -57,7 +57,7 @@ ov::intel_cpu::AlignMatMulInputRanks::AlignMatMulInputRanks() { auto unsqueeze = std::make_shared( nodeFrom, - ngraph::opset1::Constant::create(ngraph::element::i64, ngraph::Shape{unsqueeze_axes.size()}, unsqueeze_axes)); + ngraph::opset1::Constant::create(ov::element::i64, ov::Shape{unsqueeze_axes.size()}, unsqueeze_axes)); unsqueeze->set_friendly_name(nodeFrom.get_node()->get_friendly_name() + "/Unsqueeze"); @@ -65,7 +65,7 @@ ov::intel_cpu::AlignMatMulInputRanks::AlignMatMulInputRanks() { }; auto matmul_new_inputs = matmul->input_values(); - ngraph::NodeVector new_ops; + ov::NodeVector new_ops; if (input0shape.size() == 1 && input1shape.size() == 1) { // If the input is 1D tensor, it is unsqueezed to 2D tensor (row vector) @@ -75,10 +75,10 @@ ov::intel_cpu::AlignMatMulInputRanks::AlignMatMulInputRanks() { // to the right of the shape {S} -> {S, 1} const auto unsqueezeInput0 = std::make_shared( input0, - ngraph::opset1::Constant::create(ngraph::element::i64, ngraph::Shape{1}, {0})); + ngraph::opset1::Constant::create(ov::element::i64, ov::Shape{1}, {0})); const auto unsqueezeInput1 = std::make_shared( input1, - ngraph::opset1::Constant::create(ngraph::element::i64, ngraph::Shape{1}, {1})); + ngraph::opset1::Constant::create(ov::element::i64, ov::Shape{1}, {1})); matmul_new_inputs[0] = unsqueezeInput0; new_ops.push_back(unsqueezeInput0); @@ -88,14 +88,14 @@ ov::intel_cpu::AlignMatMulInputRanks::AlignMatMulInputRanks() { matmul->set_transpose_a(false); matmul->set_transpose_b(false); } else if (input0shape.size() < input1shape.size()) { - std::shared_ptr unsqueezeInput0 = getUnsqueeze(input0, input1); + std::shared_ptr unsqueezeInput0 = getUnsqueeze(input0, input1); matmul_new_inputs[0] = unsqueezeInput0; new_ops.push_back(unsqueezeInput0); if (input0shape.size() == 1) matmul->set_transpose_a(false); } else if (input0shape.size() > input1shape.size()) { - std::shared_ptr unsqueezeInput1 = getUnsqueeze(input1, input0); + std::shared_ptr unsqueezeInput1 = getUnsqueeze(input1, input0); matmul_new_inputs[1] = unsqueezeInput1; new_ops.push_back(unsqueezeInput1); @@ -103,7 +103,7 @@ ov::intel_cpu::AlignMatMulInputRanks::AlignMatMulInputRanks() { matmul->set_transpose_b(false); } - std::shared_ptr matmul_new = matmul->clone_with_new_inputs(matmul_new_inputs); + std::shared_ptr matmul_new = matmul->clone_with_new_inputs(matmul_new_inputs); new_ops.push_back(matmul_new); if (matmul_new->get_output_partial_shape(0) != output_shape) { @@ -112,7 +112,7 @@ ov::intel_cpu::AlignMatMulInputRanks::AlignMatMulInputRanks() { // Insert additional squeeze operation to preserve output shape const auto new_out_shape_size = matmul_new->get_output_partial_shape(0).size(); size_t squeeze_axis = 0; - std::shared_ptr squeeze_output; + std::shared_ptr squeeze_output; // If output data is scalar && new_out_shape is [1 1 .. 1], squeeze all the axis to produce a scalar auto& new_output_partial_shape = matmul_new->get_output_partial_shape(0); const bool can_squeeze_scalar = @@ -126,25 +126,25 @@ ov::intel_cpu::AlignMatMulInputRanks::AlignMatMulInputRanks() { squeeze_axis = new_out_shape_size - 1; squeeze_output = std::make_shared( matmul_new, - ngraph::opset1::Constant::create(ngraph::element::i64, ngraph::Shape{1}, {squeeze_axis})); + ngraph::opset1::Constant::create(ov::element::i64, ov::Shape{1}, {squeeze_axis})); } new_ops.push_back(squeeze_output); matmul_new->set_friendly_name(matmul->get_friendly_name() + "/MM"); // Set the name of the last node after transformation to initial node name // (in case initial node was an output node) squeeze_output->set_friendly_name(matmul->get_friendly_name()); - ngraph::copy_runtime_info(matmul, new_ops); - ngraph::replace_node(matmul, squeeze_output); + ov::copy_runtime_info(matmul, new_ops); + ov::replace_node(matmul, squeeze_output); } else { matmul_new->set_friendly_name(matmul->get_friendly_name()); - ngraph::copy_runtime_info(matmul, new_ops); - ngraph::replace_node(matmul, matmul_new); + ov::copy_runtime_info(matmul, new_ops); + ov::replace_node(matmul, matmul_new); } return true; }; - auto m = std::make_shared(matmulPattern, matcher_name); + auto m = std::make_shared(matmulPattern, matcher_name); this->register_matcher(m, callback); } diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_broadcast_to_tiles.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_broadcast_to_tiles.cpp index 90c13bacd2da9b..85514b594d0402 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_broadcast_to_tiles.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_broadcast_to_tiles.cpp @@ -12,9 +12,9 @@ ov::intel_cpu::ConvertBroadcastToTiles::ConvertBroadcastToTiles() { MATCHER_SCOPE(ConvertBroadcastToTiles); - auto broadcast = ngraph::pattern::wrap_type(); + auto broadcast = ov::pass::pattern::wrap_type(); - ngraph::matcher_pass_callback callback = [this](ngraph::pattern::Matcher& m) { + ov::matcher_pass_callback callback = [this](ov::pass::pattern::Matcher& m) { auto broadcast = std::dynamic_pointer_cast(m.get_match_root()); if (!broadcast) { @@ -37,14 +37,14 @@ ov::intel_cpu::ConvertBroadcastToTiles::ConvertBroadcastToTiles() { auto last_node = data_node; - ngraph::NodeVector new_ops; + ov::NodeVector new_ops; // In case if input_shape and output_shape differ we insert Reshape to align shapes if (input_shape.size() != dims_count) { if (input_shape.size() > dims_count) { return false; } - ngraph::Shape shape; + ov::Shape shape; auto broadcast_type = broadcast->get_broadcast_spec(); if (broadcast_type == ngraph::op::AutoBroadcastType::NUMPY) { shape = input_shape; @@ -60,7 +60,7 @@ ov::intel_cpu::ConvertBroadcastToTiles::ConvertBroadcastToTiles() { } else { return false; } - auto shape_const = std::make_shared(ngraph::element::i64, ngraph::Shape{shape.size()}, shape); + auto shape_const = std::make_shared(ov::element::i64, ov::Shape{shape.size()}, shape); auto reshape = std::make_shared(data_node, shape_const, true); new_ops.push_back(reshape); last_node = reshape; @@ -84,16 +84,16 @@ ov::intel_cpu::ConvertBroadcastToTiles::ConvertBroadcastToTiles() { ++input_shape_it; } - auto const_node = std::make_shared(ngraph::element::i64, ngraph::Shape{dims_count}, dims); + auto const_node = std::make_shared(ov::element::i64, ov::Shape{dims_count}, dims); auto tile = register_new_node(last_node, const_node); new_ops.push_back(tile); tile->set_friendly_name(broadcast->get_friendly_name()); - ngraph::copy_runtime_info(broadcast, new_ops); - ngraph::replace_node(broadcast, tile); + ov::copy_runtime_info(broadcast, new_ops); + ov::replace_node(broadcast, tile); return true; }; - auto m = std::make_shared(broadcast, matcher_name); + auto m = std::make_shared(broadcast, matcher_name); this->register_matcher(m, callback); } diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_fq_rnn_to_quantized_rnn.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_fq_rnn_to_quantized_rnn.cpp index 8d02719531c136..2a7306a0860423 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_fq_rnn_to_quantized_rnn.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_fq_rnn_to_quantized_rnn.cpp @@ -24,62 +24,62 @@ ov::intel_cpu::ConvertFqRnnToQuantizedRnn::ConvertFqRnnToQuantizedRnn() { MATCHER_SCOPE(ConvertFqRnnToQuantizedRnn); - auto X_m = ngraph::pattern::any_input(); - auto convert_X = ngraph::pattern::wrap_type({X_m}); - auto input_shift_X = ngraph::pattern::wrap_type(); - auto subtract_X = ngraph::pattern::wrap_type({convert_X, input_shift_X}); - auto input_scale_X = ngraph::pattern::wrap_type(); + auto X_m = ov::pass::pattern::any_input(); + auto convert_X = ov::pass::pattern::wrap_type({X_m}); + auto input_shift_X = ov::pass::pattern::wrap_type(); + auto subtract_X = ov::pass::pattern::wrap_type({convert_X, input_shift_X}); + auto input_scale_X = ov::pass::pattern::wrap_type(); - auto deq_X = std::make_shared( + auto deq_X = std::make_shared( OutputVector{ - ngraph::pattern::wrap_type({convert_X, input_scale_X}), - ngraph::pattern::wrap_type({subtract_X, input_scale_X}), + ov::pass::pattern::wrap_type({convert_X, input_scale_X}), + ov::pass::pattern::wrap_type({subtract_X, input_scale_X}), }); - auto H_m = ngraph::pattern::any_input(); - auto convert_H = ngraph::pattern::wrap_type({H_m}); - auto input_shift_H = ngraph::pattern::wrap_type(); - auto subtract_H = ngraph::pattern::wrap_type({convert_H, input_shift_H}); - auto input_scale_H = ngraph::pattern::wrap_type(); + auto H_m = ov::pass::pattern::any_input(); + auto convert_H = ov::pass::pattern::wrap_type({H_m}); + auto input_shift_H = ov::pass::pattern::wrap_type(); + auto subtract_H = ov::pass::pattern::wrap_type({convert_H, input_shift_H}); + auto input_scale_H = ov::pass::pattern::wrap_type(); - auto deq_H = std::make_shared( + auto deq_H = std::make_shared( OutputVector{ - ngraph::pattern::wrap_type({convert_H, input_scale_H}), - ngraph::pattern::wrap_type({subtract_H, input_scale_H}), + ov::pass::pattern::wrap_type({convert_H, input_scale_H}), + ov::pass::pattern::wrap_type({subtract_H, input_scale_H}), }); - auto H_as_const = ngraph::pattern::wrap_type(); - auto H_in = std::make_shared( + auto H_as_const = ov::pass::pattern::wrap_type(); + auto H_in = std::make_shared( OutputVector { deq_H, H_as_const }); - auto cell_state_m = ngraph::pattern::any_input(); // for LSTM - auto sequence_length_m = ngraph::pattern::any_input(); // for Sequences + auto cell_state_m = ov::pass::pattern::any_input(); // for LSTM + auto sequence_length_m = ov::pass::pattern::any_input(); // for Sequences - auto W_m = ngraph::pattern::wrap_type(); - auto convert_W = ngraph::pattern::wrap_type({W_m}); - auto weights_scale_W = ngraph::pattern::wrap_type(); - auto deq_W = ngraph::pattern::wrap_type({convert_W, weights_scale_W}); + auto W_m = ov::pass::pattern::wrap_type(); + auto convert_W = ov::pass::pattern::wrap_type({W_m}); + auto weights_scale_W = ov::pass::pattern::wrap_type(); + auto deq_W = ov::pass::pattern::wrap_type({convert_W, weights_scale_W}); - auto R_m = ngraph::pattern::wrap_type(); - auto convert_R = ngraph::pattern::wrap_type({R_m}); - auto weights_scale_R = ngraph::pattern::wrap_type(); - auto deq_R = ngraph::pattern::wrap_type({convert_R, weights_scale_R}); + auto R_m = ov::pass::pattern::wrap_type(); + auto convert_R = ov::pass::pattern::wrap_type({R_m}); + auto weights_scale_R = ov::pass::pattern::wrap_type(); + auto deq_R = ov::pass::pattern::wrap_type({convert_R, weights_scale_R}); - const auto B_m = ngraph::pattern::wrap_type(); + const auto B_m = ov::pass::pattern::wrap_type(); - auto lstm_seq_m = ngraph::pattern::wrap_type({deq_X, H_in, cell_state_m, sequence_length_m, deq_W, deq_R, B_m}); - auto gru_seq_m = ngraph::pattern::wrap_type ({deq_X, H_in, sequence_length_m, deq_W, deq_R, B_m}); + auto lstm_seq_m = ov::pass::pattern::wrap_type({deq_X, H_in, cell_state_m, sequence_length_m, deq_W, deq_R, B_m}); + auto gru_seq_m = ov::pass::pattern::wrap_type ({deq_X, H_in, sequence_length_m, deq_W, deq_R, B_m}); - auto rnn_pattern = std::make_shared( + auto rnn_pattern = std::make_shared( OutputVector { lstm_seq_m, gru_seq_m }); - ngraph::matcher_pass_callback callback = [=](ngraph::pattern::Matcher& m) { + ov::matcher_pass_callback callback = [=](ov::pass::pattern::Matcher& m) { auto rnn = m.get_match_root(); if (!rnn || transformation_callback(rnn)) @@ -89,7 +89,7 @@ ov::intel_cpu::ConvertFqRnnToQuantizedRnn::ConvertFqRnnToQuantizedRnn() { const auto& activation = pattern_map.at(X_m); const auto hidden_state_it = pattern_map.find(H_m); - ngraph::Output hidden_state; + ov::Output hidden_state; if (hidden_state_it != pattern_map.end()) { // is it H(i8/u8) -> dequantized -> RNN pattern? hidden_state = hidden_state_it->second; } else { @@ -100,9 +100,9 @@ ov::intel_cpu::ConvertFqRnnToQuantizedRnn::ConvertFqRnnToQuantizedRnn() { const auto& r_weights = pattern_map.at(R_m); const auto& bias = pattern_map.at(B_m); - std::shared_ptr rnn_quantized; + std::shared_ptr rnn_quantized; - if (const auto lstm_seq = ngraph::as_type_ptr(rnn)) { + if (const auto lstm_seq = ov::as_type_ptr(rnn)) { const auto& cell_state = pattern_map.at(cell_state_m); const auto& sequence_length = pattern_map.at(sequence_length_m); @@ -126,12 +126,12 @@ ov::intel_cpu::ConvertFqRnnToQuantizedRnn::ConvertFqRnnToQuantizedRnn() { rnn_quantized_tr->set_overridden_output_type(hidden_state.get_element_type(), 1); rnn_quantized = rnn_quantized_tr; - } else if (const auto gru_seq = ngraph::as_type_ptr(rnn)) { + } else if (const auto gru_seq = ov::as_type_ptr(rnn)) { const auto& sequence_length = pattern_map.at(sequence_length_m); auto rnn_quantized_tr = std::make_shared>( - std::vector{ element::f32, element::f32, element::f32, element::f32, element::f32, element::f32}, - std::vector{ element::f32, element::f32 }, + std::vector{ element::f32, element::f32, element::f32, element::f32, element::f32, element::f32}, + std::vector{ element::f32, element::f32 }, op::TemporaryReplaceOutputType(activation, element::f32).get(), op::TemporaryReplaceOutputType(hidden_state, element::f32).get(), op::TemporaryReplaceOutputType(sequence_length, element::f32).get(), @@ -189,8 +189,8 @@ ov::intel_cpu::ConvertFqRnnToQuantizedRnn::ConvertFqRnnToQuantizedRnn() { auto H_outputs = rnn->output(1).get_target_inputs(); rnn_quantized->set_friendly_name(rnn->get_friendly_name()); - ngraph::copy_runtime_info(rnn, rnn_quantized); - ngraph::replace_node(rnn, rnn_quantized); + ov::copy_runtime_info(rnn, rnn_quantized); + ov::replace_node(rnn, rnn_quantized); /* in case of pattern: * H(u8,i8) -> dequantize -> RNN @@ -221,6 +221,6 @@ ov::intel_cpu::ConvertFqRnnToQuantizedRnn::ConvertFqRnnToQuantizedRnn() { return true; }; - auto m = std::make_shared(rnn_pattern, matcher_name); + auto m = std::make_shared(rnn_pattern, matcher_name); this->register_matcher(m, callback); } diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_matmul_to_fc.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_matmul_to_fc.cpp index d04088985a1262..617b457d57f957 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_matmul_to_fc.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_matmul_to_fc.cpp @@ -16,14 +16,14 @@ ov::intel_cpu::ConvertMatMulToFC::ConvertMatMulToFC() { MATCHER_SCOPE(ConvertMatMulToFC); - auto activations_m = ngraph::pattern::any_input(ngraph::pattern::has_static_rank()); + auto activations_m = ov::pass::pattern::any_input(ov::pass::pattern::has_static_rank()); auto weights_path = [](const ov::Output& output) { return ov::op::util::is_on_constant_path(output); }; - auto weights_m = ngraph::pattern::any_input(weights_path); - auto matmul_m = ngraph::pattern::wrap_type({ activations_m, weights_m }, ngraph::pattern::has_static_rank()); + auto weights_m = ov::pass::pattern::any_input(weights_path); + auto matmul_m = ov::pass::pattern::wrap_type({ activations_m, weights_m }, ov::pass::pattern::has_static_rank()); - ngraph::matcher_pass_callback callback = [=](ngraph::pattern::Matcher& m) { + ov::matcher_pass_callback callback = [=](ov::pass::pattern::Matcher& m) { const auto& pattern_map = m.get_pattern_value_map(); auto matmul = std::dynamic_pointer_cast(pattern_map.at(matmul_m).get_node_shared_ptr()); @@ -105,16 +105,16 @@ ov::intel_cpu::ConvertMatMulToFC::ConvertMatMulToFC() { * sequence starting from 0 and replace last two dimension. For example for length = 4 the * order will be [0, 1, 3, 2] that emulates transpose_a or transpose_b attribute. */ - ngraph::NodeVector new_ops; + ov::NodeVector new_ops; - auto create_transpose = [this, &new_ops ](const ngraph::Output& node, const std::string& transpose_name) { + auto create_transpose = [this, &new_ops ](const ov::Output& node, const std::string& transpose_name) { std::vector transpose_order(node.get_partial_shape().size()); std::iota(transpose_order.begin(), transpose_order.end(), 0); std::swap(*(transpose_order.end() - 1), *(transpose_order.end() - 2)); - auto transpose_const = ngraph::op::v0::Constant::create(ngraph::element::i32, ngraph::Shape{ transpose_order.size() }, transpose_order); + auto transpose_const = ngraph::op::v0::Constant::create(ov::element::i32, ov::Shape{ transpose_order.size() }, transpose_order); auto transpose = std::make_shared(node, transpose_const); - if (!ngraph::is_type(transpose)) { + if (!ov::is_type(transpose)) { new_ops.push_back(transpose_const); MatcherPass::register_new_node(transpose); } @@ -144,7 +144,7 @@ ov::intel_cpu::ConvertMatMulToFC::ConvertMatMulToFC() { NGRAPH_CHECK(K.is_static()); auto k_len = K.get_length(); auto reshape_shape_values = matmul->get_transpose_b() ? std::vector{-1, k_len} : std::vector{k_len, -1}; - auto reshape_shape = ngraph::op::v0::Constant::create(ngraph::element::i32, ngraph::Shape{ 2 }, reshape_shape_values); + auto reshape_shape = ngraph::op::v0::Constant::create(ov::element::i32, ov::Shape{ 2 }, reshape_shape_values); fc_input_b = ov::op::util::make_try_fold(fc_input_b, reshape_shape, false); if (!std::dynamic_pointer_cast(fc_input_b.get_node_shared_ptr())) { new_ops.push_back(reshape_shape); @@ -176,11 +176,11 @@ ov::intel_cpu::ConvertMatMulToFC::ConvertMatMulToFC() { matmul->get_output_element_type(0)); fc->set_friendly_name(matmul->get_friendly_name()); new_ops.push_back(fc); - ngraph::copy_runtime_info(matmul, new_ops); - ngraph::replace_node(matmul, fc); + ov::copy_runtime_info(matmul, new_ops); + ov::replace_node(matmul, fc); return true; }; - auto m = std::make_shared(matmul_m, matcher_name); + auto m = std::make_shared(matmul_m, matcher_name); this->register_matcher(m, callback); } diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_tile_to_seq_tiles.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_tile_to_seq_tiles.cpp index bacc9b47edd5e3..cef1d533285f1d 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_tile_to_seq_tiles.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_tile_to_seq_tiles.cpp @@ -16,10 +16,10 @@ ov::intel_cpu::ConvertTileToSeqTiles::ConvertTileToSeqTiles() { MATCHER_SCOPE(ConvertTileToSeqTiles); - auto tile = ngraph::pattern::wrap_type({ngraph::pattern::any_input(ngraph::pattern::has_static_rank()), - ngraph::pattern::wrap_type()}); + auto tile = ov::pass::pattern::wrap_type({ov::pass::pattern::any_input(ov::pass::pattern::has_static_rank()), + ov::pass::pattern::wrap_type()}); - ngraph::matcher_pass_callback callback = [](ngraph::pattern::Matcher& m) { + ov::matcher_pass_callback callback = [](ov::pass::pattern::Matcher& m) { auto tile = std::dynamic_pointer_cast(m.get_match_root()); if (!tile) { return false; @@ -51,7 +51,7 @@ ov::intel_cpu::ConvertTileToSeqTiles::ConvertTileToSeqTiles() { return false; } } - ngraph::replace_node(tile, {last_node}); + ov::replace_node(tile, {last_node}); return true; } @@ -65,7 +65,7 @@ ov::intel_cpu::ConvertTileToSeqTiles::ConvertTileToSeqTiles() { friendly_name += ":"; } - ngraph::NodeVector new_ops; + ov::NodeVector new_ops; auto tiles_it = tiles.rbegin(); while (tiles_it != tiles.rend()) { @@ -73,7 +73,7 @@ ov::intel_cpu::ConvertTileToSeqTiles::ConvertTileToSeqTiles() { if (tile_dim != 1) { std::vector dims(input_shape_rank, 1); dims[cur_dim_id] = tile_dim; - auto const_node = std::make_shared(ngraph::element::i64, ngraph::Shape{input_shape_rank}, dims); + auto const_node = std::make_shared(ov::element::i64, ov::Shape{input_shape_rank}, dims); auto new_tile = std::make_shared(last_node, const_node); new_tile->set_friendly_name(friendly_name); friendly_name += "_" + std::to_string(cur_dim_id); @@ -86,11 +86,11 @@ ov::intel_cpu::ConvertTileToSeqTiles::ConvertTileToSeqTiles() { } last_node.get_node_shared_ptr()->set_friendly_name(tile->get_friendly_name()); - ngraph::copy_runtime_info(tile, new_ops); - ngraph::replace_node(tile, {last_node}); + ov::copy_runtime_info(tile, new_ops); + ov::replace_node(tile, {last_node}); return true; }; - auto m = std::make_shared(tile, matcher_name); + auto m = std::make_shared(tile, matcher_name); this->register_matcher(m, callback); } diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_to_leaky_relu.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_to_leaky_relu.cpp index 113efee5b533be..82d33d1208f7c8 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_to_leaky_relu.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_to_leaky_relu.cpp @@ -13,28 +13,28 @@ ov::intel_cpu::ConvertToLeakyRelu::ConvertToLeakyRelu() { MATCHER_SCOPE(ConvertToLeakyRelu); - auto input = ngraph::pattern::any_input(); - auto slope_constant = ngraph::pattern::wrap_type(); - auto prelu = ngraph::pattern::wrap_type({ input, slope_constant }); + auto input = ov::pass::pattern::any_input(); + auto slope_constant = ov::pass::pattern::wrap_type(); + auto prelu = ov::pass::pattern::wrap_type({ input, slope_constant }); - ngraph::matcher_pass_callback callback = [](ngraph::pattern::Matcher& m) { + ov::matcher_pass_callback callback = [](ov::pass::pattern::Matcher& m) { auto prelu = std::dynamic_pointer_cast(m.get_match_root()); if (!prelu) { return false; } auto slopeNode = std::dynamic_pointer_cast(prelu->get_input_node_shared_ptr(1)); - if (slopeNode != nullptr && ngraph::shape_size(slopeNode->get_shape()) == 1) { + if (slopeNode != nullptr && ov::shape_size(slopeNode->get_shape()) == 1) { const float slope = slopeNode->cast_vector()[0]; const auto leakyRelu = std::make_shared(prelu->input(0).get_source_output(), slope, prelu->output(0).get_element_type()); leakyRelu->set_friendly_name(prelu->get_friendly_name()); - ngraph::copy_runtime_info(prelu, leakyRelu); - ngraph::replace_node(prelu, leakyRelu); + ov::copy_runtime_info(prelu, leakyRelu); + ov::replace_node(prelu, leakyRelu); return true; } return false; }; - auto m = std::make_shared(prelu, matcher_name); + auto m = std::make_shared(prelu, matcher_name); this->register_matcher(m, callback); } diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_to_power_static.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_to_power_static.cpp index 2e4fe2284343ed..7109ee1aa4278a 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_to_power_static.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_to_power_static.cpp @@ -18,7 +18,7 @@ namespace { -int getConstPort(const std::shared_ptr &node) { +int getConstPort(const std::shared_ptr &node) { const auto const1 = std::dynamic_pointer_cast(node->get_input_node_shared_ptr(0)); const auto const2 = std::dynamic_pointer_cast(node->get_input_node_shared_ptr(1)); int constPort = -1; @@ -43,7 +43,7 @@ bool isConvertableToPowerStatic(const std::shared_ptr &node) { if (input_rank.is_dynamic()) return false; auto const_shape = node->get_input_shape(constPort); - return ngraph::shape_size(const_shape) == 1 && + return ov::shape_size(const_shape) == 1 && input_rank.get_length() >= static_cast(const_shape.size()) && !ov::intel_cpu::one_of(node->get_input_node_shared_ptr(nonConstPort)->get_type_info(), ngraph::opset1::NormalizeL2::get_type_info_static(), @@ -66,11 +66,11 @@ bool isConvertableToPowerStatic(const std::shared_ptr &no auto const_node = std::dynamic_pointer_cast(node->get_input_node_shared_ptr(1)); return const_node && input_rank.get_length() >= static_cast(const_node->get_shape().size()) && - ngraph::shape_size(const_node->get_shape()) == 1; + ov::shape_size(const_node->get_shape()) == 1; } template -std::shared_ptr convert(const std::shared_ptr &node) { +std::shared_ptr convert(const std::shared_ptr &node) { const int constPort = getConstPort(node); const int nonConstPort = 1 - constPort; std::shared_ptr powerNode = std::dynamic_pointer_cast(node->get_input_node_shared_ptr(constPort)); @@ -103,18 +103,18 @@ std::shared_ptr convert(const std::shared_ptr &node) { ov::intel_cpu::ConvertToPowerStatic::ConvertToPowerStatic() { MATCHER_SCOPE(ConvertToPowerStatic); - ngraph::OutputVector twoInputs = {ngraph::pattern::any_input(ngraph::pattern::has_static_rank()), - ngraph::pattern::any_input(ngraph::pattern::has_static_rank())}; - auto power = ngraph::pattern::wrap_type(twoInputs); - auto add = ngraph::pattern::wrap_type(twoInputs); - auto sub = ngraph::pattern::wrap_type(twoInputs); - auto mult = ngraph::pattern::wrap_type(twoInputs); - const auto candidate = std::make_shared(ngraph::OutputVector{power, add, sub, mult}); + ov::OutputVector twoInputs = {ov::pass::pattern::any_input(ov::pass::pattern::has_static_rank()), + ov::pass::pattern::any_input(ov::pass::pattern::has_static_rank())}; + auto power = ov::pass::pattern::wrap_type(twoInputs); + auto add = ov::pass::pattern::wrap_type(twoInputs); + auto sub = ov::pass::pattern::wrap_type(twoInputs); + auto mult = ov::pass::pattern::wrap_type(twoInputs); + const auto candidate = std::make_shared(ov::OutputVector{power, add, sub, mult}); - ngraph::matcher_pass_callback callback = [](ngraph::pattern::Matcher &m) { + ov::matcher_pass_callback callback = [](ov::pass::pattern::Matcher &m) { auto node = m.get_match_root(); - std::shared_ptr toReplace = node; + std::shared_ptr toReplace = node; if (auto power = std::dynamic_pointer_cast(node)) { if (!isConvertableToPowerStatic(power)) return false; @@ -135,11 +135,11 @@ ov::intel_cpu::ConvertToPowerStatic::ConvertToPowerStatic() { OPENVINO_THROW("ConvertToPowerStatic: op type is not supported"); } toReplace->set_friendly_name(node->get_friendly_name()); - ngraph::copy_runtime_info(node, toReplace); - ngraph::replace_node(node, toReplace); + ov::copy_runtime_info(node, toReplace); + ov::replace_node(node, toReplace); return true; }; - auto m = std::make_shared(candidate, matcher_name); + auto m = std::make_shared(candidate, matcher_name); this->register_matcher(m, callback); } diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_to_swish_cpu.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_to_swish_cpu.cpp index 45c311a111c541..b8bf92cef0913d 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_to_swish_cpu.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/convert_to_swish_cpu.cpp @@ -13,9 +13,9 @@ ov::intel_cpu::ConvertToSwishCPU::ConvertToSwishCPU() { MATCHER_SCOPE(ConvertToSwishCPU); - auto swish = ngraph::pattern::wrap_type(); + auto swish = ov::pass::pattern::wrap_type(); - ngraph::matcher_pass_callback callback = [](ngraph::pattern::Matcher& m) { + ov::matcher_pass_callback callback = [](ov::pass::pattern::Matcher& m) { auto swish = std::dynamic_pointer_cast (m.get_match_root()); if (!swish) { return false; @@ -24,7 +24,7 @@ ov::intel_cpu::ConvertToSwishCPU::ConvertToSwishCPU() { if (swish->input_values().size() == 2) { auto beta = std::dynamic_pointer_cast(swish->get_input_node_shared_ptr(1)); - if (!beta || ngraph::shape_size(swish->get_input_shape(1)) != 1) { + if (!beta || ov::shape_size(swish->get_input_shape(1)) != 1) { return false; } beta_value = beta->cast_vector()[0]; @@ -32,11 +32,11 @@ ov::intel_cpu::ConvertToSwishCPU::ConvertToSwishCPU() { auto swish_cpu = std::make_shared(swish->input(0).get_source_output(), beta_value); swish_cpu->set_friendly_name(swish->get_friendly_name()); - ngraph::copy_runtime_info(swish, swish_cpu); - ngraph::replace_node(swish, swish_cpu); + ov::copy_runtime_info(swish, swish_cpu); + ov::replace_node(swish, swish_cpu); return true; }; - auto m = std::make_shared(swish, matcher_name); + auto m = std::make_shared(swish, matcher_name); this->register_matcher(m, callback); } diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/decompose_integer_divide.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/decompose_integer_divide.cpp index e36947cb5cb88c..fd3a662e7df25c 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/decompose_integer_divide.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/decompose_integer_divide.cpp @@ -9,8 +9,8 @@ namespace ov { namespace intel_cpu { DecomposeIntegerDivide::DecomposeIntegerDivide() { - register_matcher(std::make_shared(ngraph::pattern::wrap_type(), "DecomposeIntegerDivide"), - [](ngraph::pattern::Matcher& m) { + register_matcher(std::make_shared(ov::pass::pattern::wrap_type(), "DecomposeIntegerDivide"), + [](ov::pass::pattern::Matcher& m) { auto divide = std::dynamic_pointer_cast(m.get_match_root()); if (!divide) { return false; @@ -22,8 +22,8 @@ DecomposeIntegerDivide::DecomposeIntegerDivide() { auto new_divide = std::make_shared(divide->input_value(0), divide->input_value(1)); auto new_floor = std::make_shared(new_divide); new_floor->set_friendly_name(divide->get_friendly_name()); - ngraph::copy_runtime_info(divide, new_floor); - ngraph::replace_node(divide, new_floor); + ov::copy_runtime_info(divide, new_floor); + ov::replace_node(divide, new_floor); return true; }); } diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/move_eltwise_up_data_movement.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/move_eltwise_up_data_movement.cpp index ce92d883c44fbf..bfb5698fa3bfe9 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/move_eltwise_up_data_movement.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/move_eltwise_up_data_movement.cpp @@ -16,7 +16,7 @@ namespace { - bool is_data_movement_operation(const std::shared_ptr& node) { + bool is_data_movement_operation(const std::shared_ptr& node) { return ov::is_type(node) || ov::is_type(node) || ov::is_type(node) || @@ -33,7 +33,7 @@ namespace { ov::is_type(node); } - bool is_scalar_like(const std::shared_ptr& node) { + bool is_scalar_like(const std::shared_ptr& node) { auto constantNode = std::dynamic_pointer_cast(node); return constantNode != nullptr && shape_size(constantNode->get_shape()) == 1; } @@ -41,10 +41,10 @@ namespace { ov::intel_cpu::MoveEltwiseUpThroughDataMov::MoveEltwiseUpThroughDataMov() { MATCHER_SCOPE(MoveEltwiseUpThroughDataMov); - auto eltwise_pattern = ngraph::pattern::wrap_type(ngraph::pattern::has_static_rank()); + auto eltwise_pattern = ov::pass::pattern::wrap_type(ov::pass::pattern::has_static_rank()); - ngraph::matcher_pass_callback callback = [=](ngraph::pattern::Matcher& m) { + ov::matcher_pass_callback callback = [=](ov::pass::pattern::Matcher& m) { const auto& pattern_map = m.get_pattern_value_map(); auto eltwise = pattern_map.at(eltwise_pattern).get_node_shared_ptr(); @@ -88,30 +88,30 @@ ov::intel_cpu::MoveEltwiseUpThroughDataMov::MoveEltwiseUpThroughDataMov() { // eltwise constant shape should match new input shape if (is_binary_op && current->get_output_partial_shape(0).rank().get_length() != eltwise->get_input_partial_shape(1).rank().get_length()) { auto old_eltwise_const = std::dynamic_pointer_cast(eltwise->get_input_node_shared_ptr(1)); - auto new_constant = std::make_shared(*old_eltwise_const.get(), ngraph::Shape{}); - ngraph::copy_runtime_info(old_eltwise_const, new_constant); - ngraph::replace_node(old_eltwise_const, new_constant); + auto new_constant = std::make_shared(*old_eltwise_const.get(), ov::Shape{}); + ov::copy_runtime_info(old_eltwise_const, new_constant); + ov::replace_node(old_eltwise_const, new_constant); } - ngraph::replace_output_update_name(eltwise->output(0), eltwise->input_value(0)); + ov::replace_output_update_name(eltwise->output(0), eltwise->input_value(0)); - ngraph::OutputVector eltwiseInputs = eltwise->input_values(); + ov::OutputVector eltwiseInputs = eltwise->input_values(); eltwiseInputs[0] = child->input_value(0); auto newEltwise = eltwise->clone_with_new_inputs(eltwiseInputs); // WA: it's necessary to set empty friendly name here // to avoid name duplication in TypeRelaxed cases newEltwise->set_friendly_name(""); - ngraph::copy_runtime_info(eltwise, newEltwise); + ov::copy_runtime_info(eltwise, newEltwise); - ngraph::OutputVector childInputs = child->input_values(); + ov::OutputVector childInputs = child->input_values(); childInputs[0] = newEltwise; auto newChild = child->clone_with_new_inputs(childInputs); - ngraph::copy_runtime_info(child, newChild); + ov::copy_runtime_info(child, newChild); newChild->set_friendly_name(child->get_friendly_name()); - ngraph::replace_node(child, newChild); + ov::replace_node(child, newChild); return true; }; - auto m = std::make_shared(eltwise_pattern, matcher_name); + auto m = std::make_shared(eltwise_pattern, matcher_name); register_matcher(m, callback); } diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/reshape_fc_fusion.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/reshape_fc_fusion.cpp index bacc0bbef6e7ab..cec9aed9cd9547 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/reshape_fc_fusion.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/reshape_fc_fusion.cpp @@ -14,13 +14,13 @@ ov::intel_cpu::ReshapeFullyConnectedFusion::ReshapeFullyConnectedFusion() { MATCHER_SCOPE(ReshapeFullyConnectedFusion); - auto m_reshape = ngraph::pattern::wrap_type({ngraph::pattern::any_input(ov::pass::pattern::has_static_shape()), - ngraph::pattern::any_input()}, - ngraph::pattern::has_static_shape()); - ngraph::OutputVector fcInputs = {m_reshape, ngraph::pattern::any_input()}; - auto fc = ngraph::pattern::wrap_type(fcInputs, ngraph::pattern::has_static_shape()); + auto m_reshape = ov::pass::pattern::wrap_type({ov::pass::pattern::any_input(ov::pass::pattern::has_static_shape()), + ov::pass::pattern::any_input()}, + ov::pass::pattern::has_static_shape()); + ov::OutputVector fcInputs = {m_reshape, ov::pass::pattern::any_input()}; + auto fc = ov::pass::pattern::wrap_type(fcInputs, ov::pass::pattern::has_static_shape()); - ngraph::matcher_pass_callback callback = [](ngraph::pattern::Matcher &m) { + ov::matcher_pass_callback callback = [](ov::pass::pattern::Matcher &m) { auto fc = std::dynamic_pointer_cast(m.get_match_root()); if (!fc) return false; @@ -41,12 +41,12 @@ ov::intel_cpu::ReshapeFullyConnectedFusion::ReshapeFullyConnectedFusion() { return false; } - ngraph::NodeVector new_ops; + ov::NodeVector new_ops; auto weightInput = fc->input(1).get_source_output(); - ngraph::Shape newWeightsShape; + ov::Shape newWeightsShape; const auto outShape = fc->get_shape(); if (shape_in.size() == 3) { - newWeightsShape = ngraph::Shape({outShape[2], shape_in[2]}); + newWeightsShape = ov::Shape({outShape[2], shape_in[2]}); } else { newWeightsShape.push_back(outShape[1]); for (size_t i = 1; i < shape_in.size(); i++) @@ -54,23 +54,23 @@ ov::intel_cpu::ReshapeFullyConnectedFusion::ReshapeFullyConnectedFusion() { } if (newWeightsShape != weightInput.get_shape()) { - auto newShape = std::make_shared(ngraph::element::i64, ngraph::Shape{newWeightsShape.size()}, newWeightsShape); + auto newShape = std::make_shared(ov::element::i64, ov::Shape{newWeightsShape.size()}, newWeightsShape); weightInput = std::make_shared(weightInput, newShape, true); new_ops.push_back(weightInput.get_node_shared_ptr()); } - std::shared_ptr new_fc = std::make_shared( + std::shared_ptr new_fc = std::make_shared( reshape->input_value(0), weightInput, - ngraph::Rank(outShape.size()), + ov::Rank(outShape.size()), fc->output(0).get_element_type()); new_ops.push_back(new_fc); new_fc->set_friendly_name(fc->get_friendly_name()); - ngraph::copy_runtime_info({reshape, fc}, new_ops); - ngraph::replace_node(fc, new_fc); + ov::copy_runtime_info({reshape, fc}, new_ops); + ov::replace_node(fc, new_fc); return true; }; - auto m = std::make_shared(fc, matcher_name); + auto m = std::make_shared(fc, matcher_name); register_matcher(m, callback); } diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/rnn_sequences_optimization.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/rnn_sequences_optimization.cpp index 19ae11782a9c0c..61abefc6982f61 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/rnn_sequences_optimization.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/rnn_sequences_optimization.cpp @@ -14,7 +14,7 @@ #include "itt.hpp" namespace { - int64_t getSeqAxis(const std::shared_ptr& sequenceOp) { + int64_t getSeqAxis(const std::shared_ptr& sequenceOp) { // Optimization. // Plug-ins support seqAxis attribute (value 1 or 0) for Seq ops, but according to the spec we don't // support this attribute and should insert Transpose layer before and after Seq op in TI to Sequences @@ -26,12 +26,12 @@ namespace { int64_t seqAxis = 1; // default const auto& target_inputs = sequenceOp->get_output_target_inputs(0); if (target_inputs.size() == 1) { - const auto transpose_before = ngraph::as_type_ptr(sequenceOp->get_input_node_shared_ptr(0)); - const auto transpose_after = ngraph::as_type_ptr(target_inputs.begin()->get_node()->shared_from_this()); + const auto transpose_before = ov::as_type_ptr(sequenceOp->get_input_node_shared_ptr(0)); + const auto transpose_after = ov::as_type_ptr(target_inputs.begin()->get_node()->shared_from_this()); if (transpose_after && transpose_before) { - auto order_before = ngraph::as_type_ptr(transpose_before->get_input_node_shared_ptr(1)); - auto order_after = ngraph::as_type_ptr(transpose_after->get_input_node_shared_ptr(1)); + auto order_before = ov::as_type_ptr(transpose_before->get_input_node_shared_ptr(1)); + auto order_after = ov::as_type_ptr(transpose_after->get_input_node_shared_ptr(1)); if (order_before && order_after) { auto order_before_values = order_before->cast_vector(); @@ -47,19 +47,19 @@ namespace { return seqAxis; } - bool transform(const std::shared_ptr& sequenceOp) { + bool transform(const std::shared_ptr& sequenceOp) { // Detect pattern: Transpose_before -> Seq -> Transpose_after auto seqAxis = getSeqAxis(sequenceOp); if (seqAxis == 0) { - ngraph::Output in_0 = sequenceOp->get_input_node_shared_ptr(0)->input_value(0); + ov::Output in_0 = sequenceOp->get_input_node_shared_ptr(0)->input_value(0); auto shapeBeforeTranspose = ov::op::util::make_try_fold(in_0); auto newInShape = ov::op::util::make_try_fold(shapeBeforeTranspose, - ngraph::opset1::Constant::create(ngraph::element::i32, { 3 }, { 1, 0, 2 }), - ngraph::opset1::Constant::create(ngraph::element::i32, {}, { 0 })); + ngraph::opset1::Constant::create(ov::element::i32, { 3 }, { 1, 0, 2 }), + ngraph::opset1::Constant::create(ov::element::i32, {}, { 0 })); auto reshape1 = std::make_shared(in_0, newInShape, false); - ngraph::copy_runtime_info(sequenceOp->get_input_node_shared_ptr(0), reshape1); - ngraph::replace_node(sequenceOp->get_input_node_shared_ptr(0), reshape1); + ov::copy_runtime_info(sequenceOp->get_input_node_shared_ptr(0), reshape1); + ov::replace_node(sequenceOp->get_input_node_shared_ptr(0), reshape1); const auto &seqTargetInputs = sequenceOp->get_output_target_inputs(0); if (seqTargetInputs.empty()) @@ -68,13 +68,13 @@ namespace { auto lstmOutShape = ov::op::util::make_try_fold(sequenceOp->output(0)); auto newOutShape = ov::op::util::make_try_fold(lstmOutShape, - ngraph::opset1::Constant::create(ngraph::element::i32, { 4 }, { 2, 1, 0, 3 }), - ngraph::opset1::Constant::create(ngraph::element::i32, {}, { 0 })); + ngraph::opset1::Constant::create(ov::element::i32, { 4 }, { 2, 1, 0, 3 }), + ngraph::opset1::Constant::create(ov::element::i32, {}, { 0 })); auto reshape2 = std::make_shared(sequenceOp->output(0), newOutShape, false); reshape2->set_friendly_name(transposeAfter->get_friendly_name()); - ngraph::copy_runtime_info(transposeAfter, reshape2); - ngraph::replace_node(transposeAfter, reshape2); + ov::copy_runtime_info(transposeAfter, reshape2); + ov::replace_node(transposeAfter, reshape2); } sequenceOp->get_rt_info()["seqAxis"] = seqAxis; @@ -85,10 +85,10 @@ namespace { ov::intel_cpu::OptimizeGRUSequenceTransposes::OptimizeGRUSequenceTransposes() { MATCHER_SCOPE(OptimizeGRUSequenceTransposes); - auto gruSequenceNgraph = ngraph::pattern::wrap_type(); + auto gruSequenceNgraph = ov::pass::pattern::wrap_type(); - ngraph::matcher_pass_callback callback = [](ngraph::pattern::Matcher &m) { - auto gruSequence = ngraph::as_type_ptr(m.get_match_root()); + ov::matcher_pass_callback callback = [](ov::pass::pattern::Matcher &m) { + auto gruSequence = ov::as_type_ptr(m.get_match_root()); if (!gruSequence) { return false; } @@ -99,16 +99,16 @@ ov::intel_cpu::OptimizeGRUSequenceTransposes::OptimizeGRUSequenceTransposes() { return transform(gruSequence); }; - auto m = std::make_shared(gruSequenceNgraph, matcher_name); + auto m = std::make_shared(gruSequenceNgraph, matcher_name); this->register_matcher(m, callback); } ov::intel_cpu::OptimizeRNNSequenceTransposes::OptimizeRNNSequenceTransposes() { MATCHER_SCOPE(OptimizeRNNSequenceTransposes); - auto rnnSequenceNgraph = ngraph::pattern::wrap_type(); + auto rnnSequenceNgraph = ov::pass::pattern::wrap_type(); - ngraph::matcher_pass_callback callback = [](ngraph::pattern::Matcher &m) { - auto rnnSequence = ngraph::as_type_ptr(m.get_match_root()); + ov::matcher_pass_callback callback = [](ov::pass::pattern::Matcher &m) { + auto rnnSequence = ov::as_type_ptr(m.get_match_root()); if (!rnnSequence) { return false; } @@ -119,30 +119,30 @@ ov::intel_cpu::OptimizeRNNSequenceTransposes::OptimizeRNNSequenceTransposes() { return transform(rnnSequence); }; - auto m = std::make_shared(rnnSequenceNgraph, matcher_name); + auto m = std::make_shared(rnnSequenceNgraph, matcher_name); this->register_matcher(m, callback); } ov::intel_cpu::OptimizeLSTMSequenceTransposes::OptimizeLSTMSequenceTransposes() { MATCHER_SCOPE(OptimizeLSTMSequenceTransposes); - auto lstmSequenceNgraph = ngraph::pattern::wrap_type(); + auto lstmSequenceNgraph = ov::pass::pattern::wrap_type(); - ngraph::matcher_pass_callback callback = [](ngraph::pattern::Matcher &m) { - auto checkSequence = [](const std::shared_ptr& node) { - if (auto lstm5 = ngraph::as_type_ptr(node)) { + ov::matcher_pass_callback callback = [](ov::pass::pattern::Matcher &m) { + auto checkSequence = [](const std::shared_ptr& node) { + if (auto lstm5 = ov::as_type_ptr(node)) { return lstm5->get_direction() != ngraph::op::RecurrentSequenceDirection::BIDIRECTIONAL; - } else if (auto lstm1 = ngraph::as_type_ptr(node)) { + } else if (auto lstm1 = ov::as_type_ptr(node)) { return lstm1->get_direction() != ngraph::op::RecurrentSequenceDirection::BIDIRECTIONAL; } else { return false; } }; - std::shared_ptr lstmSequence = m.get_match_root(); + std::shared_ptr lstmSequence = m.get_match_root(); return checkSequence(lstmSequence) ? transform(lstmSequence) : false; }; - auto m = std::make_shared(lstmSequenceNgraph, matcher_name); + auto m = std::make_shared(lstmSequenceNgraph, matcher_name); this->register_matcher(m, callback); } diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/convert_to_cpu_specific_opset.hpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/convert_to_cpu_specific_opset.hpp index 090237690f50da..d1d00373f47ab4 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/convert_to_cpu_specific_opset.hpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/convert_to_cpu_specific_opset.hpp @@ -28,10 +28,10 @@ namespace ov { namespace intel_cpu { -inline void ConvertToCPUSpecificOpset(std::shared_ptr &nGraphFunc) { +inline void ConvertToCPUSpecificOpset(std::shared_ptr &nGraphFunc) { RUN_ON_FUNCTION_SCOPE(ConvertToCPUSpecificOpset); - ngraph::pass::Manager manager; + ov::pass::Manager manager; manager.set_per_pass_validation(false); CPU_REGISTER_PASS_COMMON(manager, ConvertMatMulToFC); CPU_REGISTER_PASS_X64(manager, MoveFCReshapeToWeights); @@ -50,7 +50,7 @@ inline void ConvertToCPUSpecificOpset(std::shared_ptr &nGraphF CPU_REGISTER_PASS_COMMON(manager, ov::pass::ConstantFolding); CPU_REGISTER_PASS_COMMON(manager, ov::pass::ConvertPrecision, - precisions_map{{ngraph::element::i64, ngraph::element::i32}}, + precisions_map{{ov::element::i64, ov::element::i32}}, type_to_fuse_map{{}}, false, false); diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/op/interaction.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/op/interaction.cpp index 11b55be96702c3..71ba75da5ec6bb 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/op/interaction.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/op/interaction.cpp @@ -15,7 +15,7 @@ ov::intel_cpu::InteractionNode::InteractionNode(const NodeVector& args) : validate_and_infer_types(); } -std::shared_ptr ov::intel_cpu::InteractionNode::clone_with_new_inputs(const ngraph::OutputVector& new_args) const { +std::shared_ptr ov::intel_cpu::InteractionNode::clone_with_new_inputs(const ov::OutputVector& new_args) const { INTERNAL_OP_SCOPE(InteractionNode_with_new_inputs); check_new_args_count(this, new_args); return std::make_shared(new_args); @@ -48,7 +48,7 @@ void ov::intel_cpu::InteractionNode::validate_and_infer_types() { if (feature.is_static()) { output_feature_size = input_size * (input_size - 1) / 2 + feature.get_length(); } - auto output_type = m_output_type == ngraph::element::undefined ? get_input_element_type(0) : m_output_type; + auto output_type = m_output_type == ov::element::undefined ? get_input_element_type(0) : m_output_type; m_output_type = output_type; PartialShape output_shape = ov::PartialShape::dynamic(2); output_shape[0] = batch; @@ -57,7 +57,7 @@ void ov::intel_cpu::InteractionNode::validate_and_infer_types() { return; } -bool ov::intel_cpu::InteractionNode::visit_attributes(ngraph::AttributeVisitor &visitor) { +bool ov::intel_cpu::InteractionNode::visit_attributes(ov::AttributeVisitor &visitor) { INTERNAL_OP_SCOPE(InteractionNode_visit_attributes); visitor.on_attribute("out-type", m_output_type); return true; diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/op/interaction.hpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/op/interaction.hpp index 6b82468b201b58..798af004da6652 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/op/interaction.hpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/op/interaction.hpp @@ -20,13 +20,13 @@ class InteractionNode : public ngraph::op::Op { InteractionNode(const NodeVector& args); - bool visit_attributes(ngraph::AttributeVisitor &visitor) override; + bool visit_attributes(ov::AttributeVisitor &visitor) override; void validate_and_infer_types() override; - std::shared_ptr clone_with_new_inputs(const ngraph::OutputVector& new_args) const override; + std::shared_ptr clone_with_new_inputs(const ov::OutputVector& new_args) const override; - ngraph::element::Type get_output_type() const { return m_output_type; } + ov::element::Type get_output_type() const { return m_output_type; } void set_fq_scales(const std::vector& scales) { m_fq_scales = scales; @@ -37,7 +37,7 @@ class InteractionNode : public ngraph::op::Op { } private: - ngraph::element::Type m_output_type; + ov::element::Type m_output_type; std::vector m_fq_scales; }; diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/op/mha.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/op/mha.cpp index 2ccd7a1bce173a..a4b419bd323fd0 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/op/mha.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/op/mha.cpp @@ -7,36 +7,36 @@ #include #include -ov::intel_cpu::MHANode::MHANode(const ngraph::Output &in0, - const ngraph::Output &in1, - const ngraph::Output &in2, - const ngraph::Output &in3, +ov::intel_cpu::MHANode::MHANode(const ov::Output &in0, + const ov::Output &in1, + const ov::Output &in2, + const ov::Output &in3, const std::vector &mul_scales, bool is_mul_first, - const ngraph::element::Type output_type) + const ov::element::Type output_type) : Op({in0, in1, in2, in3}), m_output_type(output_type) { this->mul_scales = mul_scales; this->is_mul_first = is_mul_first; - this->fq0_output_type = ngraph::element::undefined; - this->fq1_output_type = ngraph::element::undefined; - this->fq2_output_type = ngraph::element::undefined; + this->fq0_output_type = ov::element::undefined; + this->fq1_output_type = ov::element::undefined; + this->fq2_output_type = ov::element::undefined; validate_and_infer_types(); } -ov::intel_cpu::MHANode::MHANode(const ngraph::Output &in0, - const ngraph::Output &in1, - const ngraph::Output &in2, - const ngraph::Output &in3, +ov::intel_cpu::MHANode::MHANode(const ov::Output &in0, + const ov::Output &in1, + const ov::Output &in2, + const ov::Output &in3, const std::vector &mul_scales, bool is_mul_first, const std::vector &fq_scales0, const std::vector &fq_scales1, const std::vector &fq_scales2, const std::vector &fq_scales3, - const ngraph::element::Type fq0_output_type, - const ngraph::element::Type fq1_output_type, - const ngraph::element::Type fq2_output_type, - const ngraph::element::Type output_type) + const ov::element::Type fq0_output_type, + const ov::element::Type fq1_output_type, + const ov::element::Type fq2_output_type, + const ov::element::Type output_type) : Op({in0, in1, in2, in3}), m_output_type(output_type) { this->mul_scales = mul_scales; this->is_mul_first = is_mul_first; @@ -50,7 +50,7 @@ ov::intel_cpu::MHANode::MHANode(const ngraph::Output &in0, validate_and_infer_types(); } -std::shared_ptr ov::intel_cpu::MHANode::clone_with_new_inputs(const ngraph::OutputVector& new_args) const { +std::shared_ptr ov::intel_cpu::MHANode::clone_with_new_inputs(const ov::OutputVector& new_args) const { INTERNAL_OP_SCOPE(MHANode_clone_with_new_inputs); check_new_args_count(this, new_args); return std::make_shared(new_args.at(0), new_args.at(1), new_args.at(2), new_args.at(3), @@ -72,8 +72,8 @@ void ov::intel_cpu::MHANode::validate_and_infer_types() { const auto matmul0_shape0 = transpose(get_input_partial_shape(0).get_shape(), {0, 2, 1, 3}); const auto matmul0_shape1 = transpose(get_input_partial_shape(1).get_shape(), {0, 2, 3, 1}); - auto matmul0_in0 = std::make_shared(ngraph::element::f32, matmul0_shape0); - auto matmul0_in1 = std::make_shared(ngraph::element::f32, matmul0_shape1); + auto matmul0_in0 = std::make_shared(ov::element::f32, matmul0_shape0); + auto matmul0_in1 = std::make_shared(ov::element::f32, matmul0_shape1); auto matmul0 = std::make_shared(matmul0_in0, matmul0_in1); std::vector matmul0_input_shapes = {matmul0_shape0, matmul0_shape1}; @@ -82,8 +82,8 @@ void ov::intel_cpu::MHANode::validate_and_infer_types() { const auto matmul1_shape0 = matmul0_output_shapes[0]; const auto matmul1_shape1 = transpose(get_input_partial_shape(3).get_shape(), {0, 2, 1, 3}); - auto matmul1_in0 = std::make_shared(ngraph::element::f32, matmul1_shape0); - auto matmul1_in1 = std::make_shared(ngraph::element::f32, matmul1_shape1); + auto matmul1_in0 = std::make_shared(ov::element::f32, matmul1_shape0); + auto matmul1_in1 = std::make_shared(ov::element::f32, matmul1_shape1); auto matmul1 = std::make_shared(matmul1_in0, matmul1_in1); std::vector matmul1_input_shapes = {matmul1_shape0, matmul1_shape1}; @@ -93,11 +93,11 @@ void ov::intel_cpu::MHANode::validate_and_infer_types() { set_output_type( 0, - m_output_type == ngraph::element::undefined || m_output_type == ngraph::element::dynamic ? get_input_element_type(0) : m_output_type, + m_output_type == ov::element::undefined || m_output_type == ov::element::dynamic ? get_input_element_type(0) : m_output_type, output_shape); } -bool ov::intel_cpu::MHANode::visit_attributes(ngraph::AttributeVisitor &visitor) { +bool ov::intel_cpu::MHANode::visit_attributes(ov::AttributeVisitor &visitor) { INTERNAL_OP_SCOPE(MHANode_visit_attributes); visitor.on_attribute("out-type", m_output_type); return true; diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/op/mha.hpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/op/mha.hpp index f28f7c4dfce696..00ecf3501119b9 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/op/mha.hpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/op/mha.hpp @@ -15,36 +15,36 @@ class MHANode : public ngraph::op::Op { MHANode() = default; - MHANode(const ngraph::Output &in0, - const ngraph::Output &in1, - const ngraph::Output &in2, - const ngraph::Output &in3, + MHANode(const ov::Output &in0, + const ov::Output &in1, + const ov::Output &in2, + const ov::Output &in3, const std::vector &mul_scales, bool is_mul_first, - const ngraph::element::Type output_type); + const ov::element::Type output_type); - MHANode(const ngraph::Output &in0, - const ngraph::Output &in1, - const ngraph::Output &in2, - const ngraph::Output &in3, + MHANode(const ov::Output &in0, + const ov::Output &in1, + const ov::Output &in2, + const ov::Output &in3, const std::vector &mul_scales, bool is_mul_first, const std::vector &fq_scales0, const std::vector &fq_scales1, const std::vector &fq_scales2, const std::vector &fq_scales3, - const ngraph::element::Type fq0_output_type, - const ngraph::element::Type fq1_output_type, - const ngraph::element::Type fq2_output_type, - const ngraph::element::Type output_type); + const ov::element::Type fq0_output_type, + const ov::element::Type fq1_output_type, + const ov::element::Type fq2_output_type, + const ov::element::Type output_type); void validate_and_infer_types() override; - bool visit_attributes(ngraph::AttributeVisitor &visitor) override; + bool visit_attributes(ov::AttributeVisitor &visitor) override; - std::shared_ptr clone_with_new_inputs(const ngraph::OutputVector &new_args) const override; + std::shared_ptr clone_with_new_inputs(const ov::OutputVector &new_args) const override; - ngraph::element::Type get_output_type() const { return m_output_type; } + ov::element::Type get_output_type() const { return m_output_type; } const std::vector& get_mul_scales() const { return mul_scales; @@ -67,27 +67,27 @@ class MHANode : public ngraph::op::Op { return is_mul_first; } - ngraph::element::Type get_fq0_output_type() const { + ov::element::Type get_fq0_output_type() const { return fq0_output_type; } - ngraph::element::Type get_fq1_output_type() const { + ov::element::Type get_fq1_output_type() const { return fq1_output_type; } - ngraph::element::Type get_fq2_output_type() const { + ov::element::Type get_fq2_output_type() const { return fq2_output_type; } private: - ngraph::element::Type m_output_type; + ov::element::Type m_output_type; std::vector mul_scales; bool is_mul_first; std::vector fq_scales0; std::vector fq_scales1; std::vector fq_scales2; std::vector fq_scales3; - ngraph::element::Type fq0_output_type; - ngraph::element::Type fq1_output_type; - ngraph::element::Type fq2_output_type; + ov::element::Type fq0_output_type; + ov::element::Type fq1_output_type; + ov::element::Type fq2_output_type; }; } // namespace intel_cpu diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/pass/mha_fusion.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/pass/mha_fusion.cpp index 9b3891d37e265e..37d211a67bbf90 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/pass/mha_fusion.cpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/pass/mha_fusion.cpp @@ -18,17 +18,17 @@ ov::intel_cpu::MHAFloatFusion::MHAFloatFusion() { MATCHER_SCOPE(MHAFloatFusion); - auto in0 = ngraph::pattern::any_input(ngraph::pattern::has_static_shape()); - auto in1 = ngraph::pattern::any_input(ngraph::pattern::has_static_shape()); - auto in2 = ngraph::pattern::wrap_type(); - auto in3 = ngraph::pattern::any_input(ngraph::pattern::has_static_shape()); - auto in4 = ngraph::pattern::wrap_type(); - auto in5 = ngraph::pattern::wrap_type(); - auto in6 = ngraph::pattern::wrap_type(); - auto in7 = ngraph::pattern::wrap_type(); - auto in8 = ngraph::pattern::any_input(ngraph::pattern::has_static_shape()); - auto in9 = ngraph::pattern::wrap_type(); - auto in10 = ngraph::pattern::wrap_type(); + auto in0 = ov::pass::pattern::any_input(ov::pass::pattern::has_static_shape()); + auto in1 = ov::pass::pattern::any_input(ov::pass::pattern::has_static_shape()); + auto in2 = ov::pass::pattern::wrap_type(); + auto in3 = ov::pass::pattern::any_input(ov::pass::pattern::has_static_shape()); + auto in4 = ov::pass::pattern::wrap_type(); + auto in5 = ov::pass::pattern::wrap_type(); + auto in6 = ov::pass::pattern::wrap_type(); + auto in7 = ov::pass::pattern::wrap_type(); + auto in8 = ov::pass::pattern::any_input(ov::pass::pattern::has_static_shape()); + auto in9 = ov::pass::pattern::wrap_type(); + auto in10 = ov::pass::pattern::wrap_type(); auto transpose0 = std::make_shared(in0, in4); auto transpose1 = std::make_shared(in1, in5); auto mul = std::make_shared(transpose1, in2); @@ -41,7 +41,7 @@ ov::intel_cpu::MHAFloatFusion::MHAFloatFusion() { auto matmul1 = std::make_shared(reshape1, transpose2); auto transpose3 = std::make_shared(matmul1, in10); - ngraph::matcher_pass_callback callback = [=](ngraph::pattern::Matcher& m) { + ov::matcher_pass_callback callback = [=](ov::pass::pattern::Matcher& m) { auto& pattern_to_output = m.get_pattern_value_map(); auto transpose0_in = pattern_to_output.at(in0); auto transpose1_in = pattern_to_output.at(in1); @@ -68,10 +68,10 @@ ov::intel_cpu::MHAFloatFusion::MHAFloatFusion() { if (!valid_transpose_order(pattern_to_output.at(in10).get_node_shared_ptr(), {0, 2, 1, 3})) return false; std::vector mul_scales; - if (auto mul_node = ngraph::as_type_ptr(pattern_to_output.at(mul).get_node_shared_ptr())) { - mul_scales = ngraph::as_type_ptr(mul_node->get_input_node_shared_ptr(1))->cast_vector(); + if (auto mul_node = ov::as_type_ptr(pattern_to_output.at(mul).get_node_shared_ptr())) { + mul_scales = ov::as_type_ptr(mul_node->get_input_node_shared_ptr(1))->cast_vector(); - auto expected_shape = ngraph::Shape({1, transpose0_in.get_shape()[2], 1, 1}); + auto expected_shape = ov::Shape({1, transpose0_in.get_shape()[2], 1, 1}); if (mul_scales.size() != 1 && mul_node->get_input_shape(1) != expected_shape) { return false; } @@ -79,17 +79,17 @@ ov::intel_cpu::MHAFloatFusion::MHAFloatFusion() { return false; } - auto matmul0_node = ngraph::as_type_ptr(pattern_to_output.at(matmul0).get_node_shared_ptr()); + auto matmul0_node = ov::as_type_ptr(pattern_to_output.at(matmul0).get_node_shared_ptr()); if (!matmul0_node) return false; if (matmul0_node->get_transpose_a() || matmul0_node->get_transpose_b()) return false; - auto reshape0_node = ngraph::as_type_ptr(pattern_to_output.at(reshape0).get_node_shared_ptr()); + auto reshape0_node = ov::as_type_ptr(pattern_to_output.at(reshape0).get_node_shared_ptr()); if (!reshape0_node) return false; - if (auto reshape_pattern = ngraph::as_type_ptr(pattern_to_output.at(in6).get_node_shared_ptr())) { + if (auto reshape_pattern = ov::as_type_ptr(pattern_to_output.at(in6).get_node_shared_ptr())) { if (reshape0_node->get_input_shape(0).size() != 4) { return false; } @@ -106,7 +106,7 @@ ov::intel_cpu::MHAFloatFusion::MHAFloatFusion() { return false; } - if (auto reshape1_node = ngraph::as_type_ptr(pattern_to_output.at(reshape1).get_node_shared_ptr())) { + if (auto reshape1_node = ov::as_type_ptr(pattern_to_output.at(reshape1).get_node_shared_ptr())) { if (reshape0_node->get_input_shape(0) != reshape1_node->get_output_shape(0)) { return false; } @@ -114,13 +114,13 @@ ov::intel_cpu::MHAFloatFusion::MHAFloatFusion() { return false; } - auto softmax_node = ngraph::as_type_ptr(pattern_to_output.at(softmax).get_node_shared_ptr()); + auto softmax_node = ov::as_type_ptr(pattern_to_output.at(softmax).get_node_shared_ptr()); if (!softmax_node) return false; if (softmax_node->get_axis() != 1) return false; - auto matmul1_node = ngraph::as_type_ptr(pattern_to_output.at(matmul1).get_node_shared_ptr()); + auto matmul1_node = ov::as_type_ptr(pattern_to_output.at(matmul1).get_node_shared_ptr()); if (!matmul1_node) return false; if (matmul1_node->get_transpose_a() || matmul1_node->get_transpose_b()) @@ -131,7 +131,7 @@ ov::intel_cpu::MHAFloatFusion::MHAFloatFusion() { auto mha = std::make_shared(transpose0_in, transpose1_in, add_in1, transpose2_in, mul_scales, is_mul_first, transpose3_node->get_output_element_type(0)); mha->set_friendly_name(m.get_match_root()->get_friendly_name()); - ngraph::copy_runtime_info({pattern_to_output.at(transpose0).get_node_shared_ptr(), + ov::copy_runtime_info({pattern_to_output.at(transpose0).get_node_shared_ptr(), pattern_to_output.at(transpose1).get_node_shared_ptr(), pattern_to_output.at(mul).get_node_shared_ptr(), pattern_to_output.at(matmul0).get_node_shared_ptr(), @@ -149,28 +149,28 @@ ov::intel_cpu::MHAFloatFusion::MHAFloatFusion() { return false; } - ngraph::replace_node(m.get_match_root(), mha); + ov::replace_node(m.get_match_root(), mha); return true; }; - auto m = std::make_shared(transpose3, matcher_name); + auto m = std::make_shared(transpose3, matcher_name); this->register_matcher(m, callback); } ov::intel_cpu::MHAFloatFusion2::MHAFloatFusion2() { MATCHER_SCOPE(MHAFloatFusion2); - auto in0 = ngraph::pattern::any_input(ngraph::pattern::has_static_shape()); - auto in1 = ngraph::pattern::any_input(ngraph::pattern::has_static_shape()); - auto in3 = ngraph::pattern::any_input(ngraph::pattern::has_static_shape()); - auto in4 = ngraph::pattern::wrap_type(); - auto in5 = ngraph::pattern::wrap_type(); - auto in6 = ngraph::pattern::wrap_type(); - auto in7 = ngraph::pattern::wrap_type(); - auto in8 = ngraph::pattern::any_input(ngraph::pattern::has_static_shape()); - auto in9 = ngraph::pattern::wrap_type(); - auto in10 = ngraph::pattern::wrap_type(); + auto in0 = ov::pass::pattern::any_input(ov::pass::pattern::has_static_shape()); + auto in1 = ov::pass::pattern::any_input(ov::pass::pattern::has_static_shape()); + auto in3 = ov::pass::pattern::any_input(ov::pass::pattern::has_static_shape()); + auto in4 = ov::pass::pattern::wrap_type(); + auto in5 = ov::pass::pattern::wrap_type(); + auto in6 = ov::pass::pattern::wrap_type(); + auto in7 = ov::pass::pattern::wrap_type(); + auto in8 = ov::pass::pattern::any_input(ov::pass::pattern::has_static_shape()); + auto in9 = ov::pass::pattern::wrap_type(); + auto in10 = ov::pass::pattern::wrap_type(); auto transpose0 = std::make_shared(in0, in4); auto transpose1 = std::make_shared(in1, in5); auto matmul0 = std::make_shared(transpose0, transpose1); @@ -180,7 +180,7 @@ ov::intel_cpu::MHAFloatFusion2::MHAFloatFusion2() { auto matmul1 = std::make_shared(softmax, transpose2); auto transpose3 = std::make_shared(matmul1, in10); - ngraph::matcher_pass_callback callback = [=](ngraph::pattern::Matcher& m) { + ov::matcher_pass_callback callback = [=](ov::pass::pattern::Matcher& m) { auto& pattern_to_output = m.get_pattern_value_map(); auto transpose0_in = pattern_to_output.at(in0); auto transpose1_in = pattern_to_output.at(in1); @@ -205,19 +205,19 @@ ov::intel_cpu::MHAFloatFusion2::MHAFloatFusion2() { if (!valid_transpose_order(pattern_to_output.at(in9).get_node_shared_ptr(), {0, 2, 1, 3})) return false; if (!valid_transpose_order(pattern_to_output.at(in10).get_node_shared_ptr(), {0, 2, 1, 3})) return false; - auto matmul0_node = ngraph::as_type_ptr(pattern_to_output.at(matmul0).get_node_shared_ptr()); + auto matmul0_node = ov::as_type_ptr(pattern_to_output.at(matmul0).get_node_shared_ptr()); if (!matmul0_node) return false; if (matmul0_node->get_transpose_a() || matmul0_node->get_transpose_b()) return false; - auto softmax_node = ngraph::as_type_ptr(pattern_to_output.at(softmax).get_node_shared_ptr()); + auto softmax_node = ov::as_type_ptr(pattern_to_output.at(softmax).get_node_shared_ptr()); if (!softmax_node) return false; if (softmax_node->get_axis() != 3) return false; - auto matmul1_node = ngraph::as_type_ptr(pattern_to_output.at(matmul1).get_node_shared_ptr()); + auto matmul1_node = ov::as_type_ptr(pattern_to_output.at(matmul1).get_node_shared_ptr()); if (!matmul1_node) return false; if (matmul1_node->get_transpose_a() || matmul1_node->get_transpose_b()) @@ -227,7 +227,7 @@ ov::intel_cpu::MHAFloatFusion2::MHAFloatFusion2() { auto mha = std::make_shared(transpose0_in, transpose1_in, add_in1, transpose2_in, std::vector(), false, transpose3_node->get_output_element_type(0)); mha->set_friendly_name(m.get_match_root()->get_friendly_name()); - ngraph::copy_runtime_info({pattern_to_output.at(transpose0).get_node_shared_ptr(), + ov::copy_runtime_info({pattern_to_output.at(transpose0).get_node_shared_ptr(), pattern_to_output.at(transpose1).get_node_shared_ptr(), pattern_to_output.at(matmul0).get_node_shared_ptr(), pattern_to_output.at(add).get_node_shared_ptr(), @@ -242,12 +242,12 @@ ov::intel_cpu::MHAFloatFusion2::MHAFloatFusion2() { return false; } - ngraph::replace_node(m.get_match_root(), mha); + ov::replace_node(m.get_match_root(), mha); return true; }; - auto m = std::make_shared(transpose3, matcher_name); + auto m = std::make_shared(transpose3, matcher_name); this->register_matcher(m, callback); } @@ -255,45 +255,45 @@ ov::intel_cpu::MHAFloatFusion2::MHAFloatFusion2() { ov::intel_cpu::MHAQuantFusion::MHAQuantFusion() { MATCHER_SCOPE(MHAQuantFusion); - auto in0 = ngraph::pattern::any_input(ngraph::pattern::has_static_shape()); - auto in1 = ngraph::pattern::any_input(ngraph::pattern::has_static_shape()); - auto in2 = ngraph::pattern::wrap_type(); - auto in3 = ngraph::pattern::any_input(ngraph::pattern::has_static_shape()); - auto in4 = ngraph::pattern::wrap_type(); - auto in5 = ngraph::pattern::wrap_type(); - auto in6 = ngraph::pattern::wrap_type(); - auto in7 = ngraph::pattern::wrap_type(); - auto in8 = ngraph::pattern::any_input(ngraph::pattern::has_static_shape()); - auto in9 = ngraph::pattern::wrap_type(); - auto in10 = ngraph::pattern::wrap_type(); + auto in0 = ov::pass::pattern::any_input(ov::pass::pattern::has_static_shape()); + auto in1 = ov::pass::pattern::any_input(ov::pass::pattern::has_static_shape()); + auto in2 = ov::pass::pattern::wrap_type(); + auto in3 = ov::pass::pattern::any_input(ov::pass::pattern::has_static_shape()); + auto in4 = ov::pass::pattern::wrap_type(); + auto in5 = ov::pass::pattern::wrap_type(); + auto in6 = ov::pass::pattern::wrap_type(); + auto in7 = ov::pass::pattern::wrap_type(); + auto in8 = ov::pass::pattern::any_input(ov::pass::pattern::has_static_shape()); + auto in9 = ov::pass::pattern::wrap_type(); + auto in10 = ov::pass::pattern::wrap_type(); auto transpose0 = std::make_shared(in0, in4); auto transpose1 = std::make_shared(in1, in5); auto matmul0 = std::make_shared(transpose0, transpose1); - auto fakeQuantize0 = ngraph::pattern::wrap_type({matmul0, - ngraph::pattern::wrap_type(), - ngraph::pattern::wrap_type(), - ngraph::pattern::wrap_type(), - ngraph::pattern::wrap_type()}); + auto fakeQuantize0 = ov::pass::pattern::wrap_type({matmul0, + ov::pass::pattern::wrap_type(), + ov::pass::pattern::wrap_type(), + ov::pass::pattern::wrap_type(), + ov::pass::pattern::wrap_type()}); auto add = std::make_shared(fakeQuantize0, in3); auto mul = std::make_shared(add, in2); auto reshape0 = std::make_shared(mul, in6, true); auto softmax = std::make_shared(reshape0); auto reshape1 = std::make_shared(softmax, in7, true); - auto fakeQuantize1 = ngraph::pattern::wrap_type({reshape1, - ngraph::pattern::wrap_type(), - ngraph::pattern::wrap_type(), - ngraph::pattern::wrap_type(), - ngraph::pattern::wrap_type()}); + auto fakeQuantize1 = ov::pass::pattern::wrap_type({reshape1, + ov::pass::pattern::wrap_type(), + ov::pass::pattern::wrap_type(), + ov::pass::pattern::wrap_type(), + ov::pass::pattern::wrap_type()}); auto transpose2 = std::make_shared(in8, in9); auto matmul1 = std::make_shared(fakeQuantize1, transpose2); - auto fakeQuantize2 = ngraph::pattern::wrap_type({matmul1, - ngraph::pattern::wrap_type(), - ngraph::pattern::wrap_type(), - ngraph::pattern::wrap_type(), - ngraph::pattern::wrap_type()}); + auto fakeQuantize2 = ov::pass::pattern::wrap_type({matmul1, + ov::pass::pattern::wrap_type(), + ov::pass::pattern::wrap_type(), + ov::pass::pattern::wrap_type(), + ov::pass::pattern::wrap_type()}); auto transpose3 = std::make_shared(fakeQuantize2, in10); - ngraph::matcher_pass_callback callback = [=](ngraph::pattern::Matcher& m) { + ov::matcher_pass_callback callback = [=](ov::pass::pattern::Matcher& m) { auto& pattern_to_output = m.get_pattern_value_map(); auto transpose0_in = pattern_to_output.at(in0); auto transpose1_in = pattern_to_output.at(in1); @@ -314,10 +314,10 @@ ov::intel_cpu::MHAQuantFusion::MHAQuantFusion() { } std::vector mul_scales; - if (auto mul_node = ngraph::as_type_ptr(pattern_to_output.at(mul).get_node_shared_ptr())) { - mul_scales = ngraph::as_type_ptr(mul_node->get_input_node_shared_ptr(1))->cast_vector(); + if (auto mul_node = ov::as_type_ptr(pattern_to_output.at(mul).get_node_shared_ptr())) { + mul_scales = ov::as_type_ptr(mul_node->get_input_node_shared_ptr(1))->cast_vector(); - auto expected_shape = ngraph::Shape({1, transpose0_in.get_shape()[2], 1, 1}); + auto expected_shape = ov::Shape({1, transpose0_in.get_shape()[2], 1, 1}); if (mul_scales.size() != 1 && mul_node->get_input_shape(1) != expected_shape) { return false; } @@ -330,25 +330,25 @@ ov::intel_cpu::MHAQuantFusion::MHAQuantFusion() { if (!valid_transpose_order(pattern_to_output.at(in9).get_node_shared_ptr(), {0, 2, 1, 3})) return false; if (!valid_transpose_order(pattern_to_output.at(in10).get_node_shared_ptr(), {0, 2, 1, 3})) return false; - auto matmul0_node = ngraph::as_type_ptr(pattern_to_output.at(matmul0).get_node_shared_ptr()); + auto matmul0_node = ov::as_type_ptr(pattern_to_output.at(matmul0).get_node_shared_ptr()); if (!matmul0_node) return false; if (matmul0_node->get_transpose_a() || matmul0_node->get_transpose_b()) return false; std::vector fq0_scale; - auto fq0_node = ngraph::as_type_ptr(pattern_to_output.at(fakeQuantize0).get_node_shared_ptr()); + auto fq0_node = ov::as_type_ptr(pattern_to_output.at(fakeQuantize0).get_node_shared_ptr()); if (fq0_node) { fq0_scale = simplifyToScale(fq0_node); if (!fq0_scale.size()) return false; } - auto reshape0_node = ngraph::as_type_ptr(pattern_to_output.at(reshape0).get_node_shared_ptr()); + auto reshape0_node = ov::as_type_ptr(pattern_to_output.at(reshape0).get_node_shared_ptr()); if (!reshape0_node) return false; - if (auto reshape_pattern = ngraph::as_type_ptr(pattern_to_output.at(in6).get_node_shared_ptr())) { + if (auto reshape_pattern = ov::as_type_ptr(pattern_to_output.at(in6).get_node_shared_ptr())) { if (reshape0_node->get_input_shape(0).size() != 4) { return false; } @@ -365,7 +365,7 @@ ov::intel_cpu::MHAQuantFusion::MHAQuantFusion() { return false; } - if (auto reshape1_node = ngraph::as_type_ptr(pattern_to_output.at(reshape1).get_node_shared_ptr())) { + if (auto reshape1_node = ov::as_type_ptr(pattern_to_output.at(reshape1).get_node_shared_ptr())) { if (reshape0_node->get_input_shape(0) != reshape1_node->get_output_shape(0)) { return false; } @@ -373,14 +373,14 @@ ov::intel_cpu::MHAQuantFusion::MHAQuantFusion() { return false; } - auto softmax_node = ngraph::as_type_ptr(pattern_to_output.at(softmax).get_node_shared_ptr()); + auto softmax_node = ov::as_type_ptr(pattern_to_output.at(softmax).get_node_shared_ptr()); if (!softmax_node) return false; if (softmax_node->get_axis() != 1) return false; std::vector fq1_scale; - auto fq1_node = ngraph::as_type_ptr(pattern_to_output.at(fakeQuantize1).get_node_shared_ptr()); + auto fq1_node = ov::as_type_ptr(pattern_to_output.at(fakeQuantize1).get_node_shared_ptr()); if (fq1_node) { fq1_scale = simplifyToScale(fq1_node); if (!fq1_scale.size()) @@ -389,14 +389,14 @@ ov::intel_cpu::MHAQuantFusion::MHAQuantFusion() { return false; } - auto matmul1_node = ngraph::as_type_ptr(pattern_to_output.at(matmul1).get_node_shared_ptr()); + auto matmul1_node = ov::as_type_ptr(pattern_to_output.at(matmul1).get_node_shared_ptr()); if (!matmul1_node) return false; if (matmul1_node->get_transpose_a() || matmul1_node->get_transpose_b()) return false; std::vector fq2_scale; - if (auto fq_node = ngraph::as_type_ptr(pattern_to_output.at(fakeQuantize2).get_node_shared_ptr())) { + if (auto fq_node = ov::as_type_ptr(pattern_to_output.at(fakeQuantize2).get_node_shared_ptr())) { fq2_scale = simplifyToScale(fq_node); if (!fq2_scale.size()) return false; @@ -406,11 +406,11 @@ ov::intel_cpu::MHAQuantFusion::MHAQuantFusion() { auto transpose3_node = pattern_to_output.at(transpose3).get_node_shared_ptr(); auto mha = std::make_shared(transpose0_in, transpose1_in, add_in1, transpose2_in, mul_scales, is_mul_first, std::vector(), fq0_scale, fq1_scale, fq2_scale, - ngraph::element::undefined, - fq0_node ? fq0_node->get_output_element_type(0) : ngraph::element::undefined, + ov::element::undefined, + fq0_node ? fq0_node->get_output_element_type(0) : ov::element::undefined, fq1_node->get_output_element_type(0), transpose3_node->get_output_element_type(0)); mha->set_friendly_name(m.get_match_root()->get_friendly_name()); - ngraph::copy_runtime_info({pattern_to_output.at(transpose0).get_node_shared_ptr(), + ov::copy_runtime_info({pattern_to_output.at(transpose0).get_node_shared_ptr(), pattern_to_output.at(transpose1).get_node_shared_ptr(), pattern_to_output.at(matmul0).get_node_shared_ptr(), pattern_to_output.at(fakeQuantize0).get_node_shared_ptr(), @@ -431,12 +431,12 @@ ov::intel_cpu::MHAQuantFusion::MHAQuantFusion() { return false; } - ngraph::replace_node(m.get_match_root(), mha); + ov::replace_node(m.get_match_root(), mha); return true; }; - auto m = std::make_shared(transpose3, matcher_name); + auto m = std::make_shared(transpose3, matcher_name); this->register_matcher(m, callback); } @@ -444,37 +444,37 @@ ov::intel_cpu::MHAQuantFusion::MHAQuantFusion() { ov::intel_cpu::MHAQuantFusion2::MHAQuantFusion2() { MATCHER_SCOPE(MHAQuantFusion2); - auto in0 = ngraph::pattern::any_input(ngraph::pattern::has_static_shape()); - auto in1 = ngraph::pattern::any_input(ngraph::pattern::has_static_shape()); - auto in2 = ngraph::pattern::wrap_type(); - auto in3 = ngraph::pattern::any_input(ngraph::pattern::has_static_shape()); - auto in4 = ngraph::pattern::wrap_type(); - auto in5 = ngraph::pattern::wrap_type(); - auto in8 = ngraph::pattern::any_input(ngraph::pattern::has_static_shape()); - auto in9 = ngraph::pattern::wrap_type(); - auto in10 = ngraph::pattern::wrap_type(); + auto in0 = ov::pass::pattern::any_input(ov::pass::pattern::has_static_shape()); + auto in1 = ov::pass::pattern::any_input(ov::pass::pattern::has_static_shape()); + auto in2 = ov::pass::pattern::wrap_type(); + auto in3 = ov::pass::pattern::any_input(ov::pass::pattern::has_static_shape()); + auto in4 = ov::pass::pattern::wrap_type(); + auto in5 = ov::pass::pattern::wrap_type(); + auto in8 = ov::pass::pattern::any_input(ov::pass::pattern::has_static_shape()); + auto in9 = ov::pass::pattern::wrap_type(); + auto in10 = ov::pass::pattern::wrap_type(); auto transpose0 = std::make_shared(in0, in4); auto transpose1 = std::make_shared(in1, in5); - auto fakeQuantize0 = ngraph::pattern::wrap_type({transpose1, - ngraph::pattern::wrap_type(), - ngraph::pattern::wrap_type(), - ngraph::pattern::wrap_type(), - ngraph::pattern::wrap_type()}); + auto fakeQuantize0 = ov::pass::pattern::wrap_type({transpose1, + ov::pass::pattern::wrap_type(), + ov::pass::pattern::wrap_type(), + ov::pass::pattern::wrap_type(), + ov::pass::pattern::wrap_type()}); auto matmul0 = std::make_shared(transpose0, fakeQuantize0); auto mul = std::make_shared(matmul0, in2); auto add = std::make_shared(mul, in3); auto softmax = std::make_shared(add); auto transpose2 = std::make_shared(in8, in9); auto matmul1 = std::make_shared(softmax, transpose2); - auto fakeQuantize1 = ngraph::pattern::wrap_type({matmul1, - ngraph::pattern::wrap_type(), - ngraph::pattern::wrap_type(), - ngraph::pattern::wrap_type(), - ngraph::pattern::wrap_type()}); + auto fakeQuantize1 = ov::pass::pattern::wrap_type({matmul1, + ov::pass::pattern::wrap_type(), + ov::pass::pattern::wrap_type(), + ov::pass::pattern::wrap_type(), + ov::pass::pattern::wrap_type()}); auto in11 = std::make_shared(OutputVector{ matmul1, fakeQuantize1 }); auto transpose3 = std::make_shared(in11, in10); - ngraph::matcher_pass_callback callback = [=](ngraph::pattern::Matcher& m) { + ov::matcher_pass_callback callback = [=](ov::pass::pattern::Matcher& m) { auto& pattern_to_output = m.get_pattern_value_map(); auto transpose0_in = pattern_to_output.at(in0); auto transpose1_in = pattern_to_output.at(in1); @@ -495,10 +495,10 @@ ov::intel_cpu::MHAQuantFusion2::MHAQuantFusion2() { } std::vector mul_scales; - if (auto mul_node = ngraph::as_type_ptr(pattern_to_output.at(mul).get_node_shared_ptr())) { - mul_scales = ngraph::as_type_ptr(mul_node->get_input_node_shared_ptr(1))->cast_vector(); + if (auto mul_node = ov::as_type_ptr(pattern_to_output.at(mul).get_node_shared_ptr())) { + mul_scales = ov::as_type_ptr(mul_node->get_input_node_shared_ptr(1))->cast_vector(); - auto expected_shape = ngraph::Shape({1, transpose0_in.get_shape()[2], 1, 1}); + auto expected_shape = ov::Shape({1, transpose0_in.get_shape()[2], 1, 1}); if (mul_scales.size() != 1 && mul_node->get_input_shape(1) != expected_shape) { return false; } @@ -511,14 +511,14 @@ ov::intel_cpu::MHAQuantFusion2::MHAQuantFusion2() { if (!valid_transpose_order(pattern_to_output.at(in9).get_node_shared_ptr(), {0, 2, 1, 3})) return false; if (!valid_transpose_order(pattern_to_output.at(in10).get_node_shared_ptr(), {0, 2, 1, 3})) return false; - auto matmul0_node = ngraph::as_type_ptr(pattern_to_output.at(matmul0).get_node_shared_ptr()); + auto matmul0_node = ov::as_type_ptr(pattern_to_output.at(matmul0).get_node_shared_ptr()); if (!matmul0_node) return false; if (matmul0_node->get_transpose_a() || matmul0_node->get_transpose_b()) return false; std::vector fq0_scale; - auto fq0_node = ngraph::as_type_ptr(pattern_to_output.at(fakeQuantize0).get_node_shared_ptr()); + auto fq0_node = ov::as_type_ptr(pattern_to_output.at(fakeQuantize0).get_node_shared_ptr()); if (fq0_node) { fq0_scale = simplifyToScale(fq0_node); if (!fq0_scale.size()) @@ -527,7 +527,7 @@ ov::intel_cpu::MHAQuantFusion2::MHAQuantFusion2() { return false; } - auto softmax_node = ngraph::as_type_ptr(pattern_to_output.at(softmax).get_node_shared_ptr()); + auto softmax_node = ov::as_type_ptr(pattern_to_output.at(softmax).get_node_shared_ptr()); if (!softmax_node) return false; if (softmax_node->get_axis() != 3) @@ -536,14 +536,14 @@ ov::intel_cpu::MHAQuantFusion2::MHAQuantFusion2() { std::vector fq1_scale; const bool fakeQuantize1Exists = pattern_to_output.find(fakeQuantize1) != pattern_to_output.end(); if (fakeQuantize1Exists) { - if (auto fq_node = ngraph::as_type_ptr(pattern_to_output.at(fakeQuantize1).get_node_shared_ptr())) { + if (auto fq_node = ov::as_type_ptr(pattern_to_output.at(fakeQuantize1).get_node_shared_ptr())) { fq1_scale = simplifyToScale(fq_node); if (!fq1_scale.size()) return false; } } - auto matmul1_node = ngraph::as_type_ptr(pattern_to_output.at(matmul1).get_node_shared_ptr()); + auto matmul1_node = ov::as_type_ptr(pattern_to_output.at(matmul1).get_node_shared_ptr()); if (!matmul1_node) return false; if (matmul1_node->get_transpose_a() || matmul1_node->get_transpose_b()) @@ -553,7 +553,7 @@ ov::intel_cpu::MHAQuantFusion2::MHAQuantFusion2() { auto transpose3_node = pattern_to_output.at(transpose3).get_node_shared_ptr(); auto mha = std::make_shared(transpose0_in, transpose1_in, add_in1, transpose2_in, mul_scales, is_mul_first, fq0_scale, std::vector(), std::vector(), fq1_scale, - fq0_node->get_output_element_type(0), ngraph::element::undefined, ngraph::element::undefined, + fq0_node->get_output_element_type(0), ov::element::undefined, ov::element::undefined, transpose3_node->get_output_element_type(0)); mha->set_friendly_name(m.get_match_root()->get_friendly_name()); std::vector> merged = { @@ -572,17 +572,17 @@ ov::intel_cpu::MHAQuantFusion2::MHAQuantFusion2() { if (fakeQuantize1Exists) { merged.push_back(pattern_to_output.at(fakeQuantize1).get_node_shared_ptr()); } - ngraph::copy_runtime_info(merged, mha); + ov::copy_runtime_info(merged, mha); if (transformation_callback(mha)) { return false; } - ngraph::replace_node(m.get_match_root(), mha); + ov::replace_node(m.get_match_root(), mha); return true; }; - auto m = std::make_shared(transpose3, matcher_name); + auto m = std::make_shared(transpose3, matcher_name); this->register_matcher(m, callback); } diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/pass/mha_fusion.hpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/pass/mha_fusion.hpp index 0e9fdbc83fd8ee..d8f3bee8bb7b78 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/pass/mha_fusion.hpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/pass/mha_fusion.hpp @@ -12,8 +12,8 @@ namespace intel_cpu { class MHAFusionBase : public ov::pass::MatcherPass { protected: - bool valid_transpose_order(const std::shared_ptr& node, const std::vector& expected_order) { - if (auto transpose_pattern = ngraph::as_type_ptr(node)) { + bool valid_transpose_order(const std::shared_ptr& node, const std::vector& expected_order) { + if (auto transpose_pattern = ov::as_type_ptr(node)) { if (transpose_pattern->cast_vector() != expected_order) { return false; } diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/pass/simplify_fakequantize.hpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/pass/simplify_fakequantize.hpp index a46368da478d95..79f3912b84473d 100644 --- a/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/pass/simplify_fakequantize.hpp +++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/x64/pass/simplify_fakequantize.hpp @@ -46,7 +46,7 @@ inline std::vector simplifyToScale(const std::shared_ptr outScale; - if (fq_node->get_output_element_type(0) == ngraph::element::u8 && + if (fq_node->get_output_element_type(0) == ov::element::u8 && std::all_of(cl.cbegin(), cl.cend(), [](float val) { @@ -68,7 +68,7 @@ inline std::vector simplifyToScale(const std::shared_ptrget_output_element_type(0) == ngraph::element::i8 && + if (fq_node->get_output_element_type(0) == ov::element::i8 && std::all_of(ish.cbegin(), ish.cend(), [&threshold](float val) { diff --git a/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/brgemm_to_brgemm_cpu.cpp b/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/brgemm_to_brgemm_cpu.cpp index 70e012fdd2ae34..18d5adac9704ce 100644 --- a/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/brgemm_to_brgemm_cpu.cpp +++ b/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/brgemm_to_brgemm_cpu.cpp @@ -114,7 +114,7 @@ pass::BrgemmToBrgemmCPU::BrgemmToBrgemmCPU() { } brgemm_cpu->set_friendly_name(brgemm->get_friendly_name()); - ngraph::replace_node(brgemm, brgemm_cpu); + ov::replace_node(brgemm, brgemm_cpu); // Transfer ports set_port_desc(brgemm_cpu->input(0), brgemm_in0_desc->get_shape(), brgemm_in0_desc->get_subtensor(), brgemm_in0_desc->get_layout()); diff --git a/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/enforce_precision.hpp b/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/enforce_precision.hpp index bbe4c686dfc374..3af14277f7936c 100644 --- a/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/enforce_precision.hpp +++ b/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/enforce_precision.hpp @@ -20,16 +20,16 @@ class EnforcePrecision: public ov::pass::ModelPass { EnforcePrecision( const element::Type source, const element::Type target, - std::function>(const std::shared_ptr& op)> get_supported_precisions = nullptr); + std::function>(const std::shared_ptr& op)> get_supported_precisions = nullptr); bool run_on_model(const std::shared_ptr& m) override; private: - static std::set> get_supported_precisions_default(const std::shared_ptr& op) noexcept; + static std::set> get_supported_precisions_default(const std::shared_ptr& op) noexcept; const element::Type source; const element::Type target; - const std::function>(const std::shared_ptr& op)> get_supported_precisions; + const std::function>(const std::shared_ptr& op)> get_supported_precisions; }; } // namespace pass diff --git a/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/lowered/fuse_load_store_and_convert.cpp b/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/lowered/fuse_load_store_and_convert.cpp index a5b99245fd789a..fff9182883df2d 100644 --- a/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/lowered/fuse_load_store_and_convert.cpp +++ b/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/lowered/fuse_load_store_and_convert.cpp @@ -31,7 +31,7 @@ bool ov::intel_cpu::pass::FuseLoadStoreConvert::fuse_load_convert(snippets::lowe if (consumers.size() != 1) return false; - std::shared_ptr load_convert = nullptr; + std::shared_ptr load_convert = nullptr; if (const auto convert_saturation = ov::as_type_ptr(convert)) { load_convert = std::make_shared(load->input_value(0), convert_saturation->get_destination_type(), @@ -76,7 +76,7 @@ bool ov::intel_cpu::pass::FuseLoadStoreConvert::fuse_store_convert(snippets::low if (!store) return false; - std::shared_ptr store_convert = nullptr; + std::shared_ptr store_convert = nullptr; if (const auto convert_saturation = ov::as_type_ptr(convert)) { store_convert = std::make_shared(convert->input_value(0), convert_saturation->get_destination_type(), diff --git a/src/plugins/intel_cpu/src/transformations/transformation_pipeline.h b/src/plugins/intel_cpu/src/transformations/transformation_pipeline.h index 1abe61e698c895..ae7863e0d5673b 100644 --- a/src/plugins/intel_cpu/src/transformations/transformation_pipeline.h +++ b/src/plugins/intel_cpu/src/transformations/transformation_pipeline.h @@ -56,7 +56,7 @@ class Transformations { void PostSnippets(void); - static bool fuse_type_to_convert(const std::shared_ptr& node, const precisions_map& precisions); + static bool fuse_type_to_convert(const std::shared_ptr& node, const precisions_map& precisions); }; } // namespace intel_cpu diff --git a/src/plugins/intel_cpu/src/utils/cpu_utils.hpp b/src/plugins/intel_cpu/src/utils/cpu_utils.hpp index 510c3c4622c5e5..0a2cbfd02a7446 100644 --- a/src/plugins/intel_cpu/src/utils/cpu_utils.hpp +++ b/src/plugins/intel_cpu/src/utils/cpu_utils.hpp @@ -37,7 +37,7 @@ struct is_any_of * rank of resulting shape * @return normalized vector */ -inline std::vector getNormalizedDimsBySize(const InferenceEngine::SizeVector &dims, size_t ndims) { +inline std::vector getNormalizedDimsBySize(const VectorDims &dims, size_t ndims) { if (dims.size() >= ndims) return dims; @@ -58,8 +58,8 @@ inline std::vector getNormalizedDimsBySize(const InferenceEngine::SizeVe * flag which specify how we compare C dims if value is undefined (weak or strong) * @return true if broadcastable, false otherwise. */ -inline bool isPerTensorOrPerChannelBroadcastable(const InferenceEngine::SizeVector &firstInputDims, - const InferenceEngine::SizeVector& secondInputDims, +inline bool isPerTensorOrPerChannelBroadcastable(const VectorDims &firstInputDims, + const VectorDims& secondInputDims, int channelAxis, bool weakComparison = false) { bool (*dimsEqual)(size_t, size_t) = weakComparison ? static_cast(dimsEqualWeak) : diff --git a/src/plugins/intel_cpu/src/utils/debug_capabilities.cpp b/src/plugins/intel_cpu/src/utils/debug_capabilities.cpp index 6c37edf61f9113..20160ccad8e9a8 100644 --- a/src/plugins/intel_cpu/src/utils/debug_capabilities.cpp +++ b/src/plugins/intel_cpu/src/utils/debug_capabilities.cpp @@ -368,13 +368,13 @@ std::ostream & operator<<(std::ostream & os, const Node &c_node) { return os; } -class OstreamAttributeVisitor : public ngraph::AttributeVisitor { +class OstreamAttributeVisitor : public ov::AttributeVisitor { std::ostream & os; public: OstreamAttributeVisitor(std::ostream & os) : os(os) {} - void on_adapter(const std::string& name, ngraph::ValueAccessor& adapter) override { + void on_adapter(const std::string& name, ov::ValueAccessor& adapter) override { if (auto a = ov::as_type>>(&adapter)) { const auto& value = join(a->get()); append_attribute(name.c_str(), value.c_str()); @@ -386,43 +386,43 @@ class OstreamAttributeVisitor : public ngraph::AttributeVisitor { } } - void on_adapter(const std::string& name, ngraph::ValueAccessor& adapter) override { + void on_adapter(const std::string& name, ov::ValueAccessor& adapter) override { append_attribute(name.c_str(), std::to_string(adapter.get()).c_str()); } - void on_adapter(const std::string& name, ngraph::ValueAccessor& adapter) override { + void on_adapter(const std::string& name, ov::ValueAccessor& adapter) override { append_attribute(name.c_str(), adapter.get().c_str()); } - void on_adapter(const std::string& name, ngraph::ValueAccessor& adapter) override { + void on_adapter(const std::string& name, ov::ValueAccessor& adapter) override { append_attribute(name.c_str(), std::to_string(adapter.get()).c_str()); } - void on_adapter(const std::string& name, ngraph::ValueAccessor& adapter) override { + void on_adapter(const std::string& name, ov::ValueAccessor& adapter) override { append_attribute(name.c_str(), std::to_string(adapter.get()).c_str()); } - void on_adapter(const std::string& name, ngraph::ValueAccessor>& adapter) override { + void on_adapter(const std::string& name, ov::ValueAccessor>& adapter) override { const auto& value = join(adapter.get()); append_attribute(name.c_str(), value.c_str()); } - void on_adapter(const std::string& name, ngraph::ValueAccessor>& adapter) override { + void on_adapter(const std::string& name, ov::ValueAccessor>& adapter) override { const auto& value = join(adapter.get()); append_attribute(name.c_str(), value.c_str()); } - void on_adapter(const std::string& name, ngraph::ValueAccessor>& adapter) override { + void on_adapter(const std::string& name, ov::ValueAccessor>& adapter) override { const auto& value = join(adapter.get()); append_attribute(name.c_str(), value.c_str()); } - void on_adapter(const std::string& name, ngraph::ValueAccessor>& adapter) override { + void on_adapter(const std::string& name, ov::ValueAccessor>& adapter) override { const auto& value = join(adapter.get()); append_attribute(name.c_str(), value.c_str()); } - void on_adapter(const std::string& name, ngraph::ValueAccessor>& adapter) override { + void on_adapter(const std::string& name, ov::ValueAccessor>& adapter) override { const auto& value = join(adapter.get()); append_attribute(name.c_str(), value.c_str()); } @@ -430,7 +430,7 @@ class OstreamAttributeVisitor : public ngraph::AttributeVisitor { void append_attribute(const char * name, const char * value) { os << " " << name << "=" << value; } - void on_adapter(const std::string& name, ngraph::ValueAccessor>& adapter) override { + void on_adapter(const std::string& name, ov::ValueAccessor>& adapter) override { append_attribute(name.c_str(), "Model"); } diff --git a/src/plugins/intel_cpu/src/utils/ngraph_utils.hpp b/src/plugins/intel_cpu/src/utils/ngraph_utils.hpp index 979be53d65e381..3bc6b827821aae 100644 --- a/src/plugins/intel_cpu/src/utils/ngraph_utils.hpp +++ b/src/plugins/intel_cpu/src/utils/ngraph_utils.hpp @@ -21,7 +21,7 @@ inline std::string getRTInfoValue(const std::map& rtInfo, } } -inline std::string getImplPriorityValue(const std::shared_ptr &node) { +inline std::string getImplPriorityValue(const std::shared_ptr &node) { const auto &rtInfo = node->get_rt_info(); auto it_info = rtInfo.find(ov::PrimitivesPriority::get_type_info_static()); @@ -34,14 +34,14 @@ inline std::string getImplPriorityValue(const std::shared_ptr &nod } template -inline const std::shared_ptr getNgraphOpAs(const std::shared_ptr& op) { - auto typedOp = ngraph::as_type_ptr(op); +inline const std::shared_ptr getNgraphOpAs(const std::shared_ptr& op) { + auto typedOp = ov::as_type_ptr(op); if (!typedOp) OPENVINO_THROW("Can't get ngraph node ", op->get_type_name(), " with name ", op->get_friendly_name()); return typedOp; } -inline bool isDynamicNgraphNode(const std::shared_ptr& op) { +inline bool isDynamicNgraphNode(const std::shared_ptr& op) { bool ret = op->is_dynamic(); for (size_t i = 0; i < op->get_output_size(); i++) { ret = ret || op->get_output_partial_shape(i).is_dynamic(); diff --git a/src/plugins/intel_cpu/src/utils/rt_info/memory_formats_attribute.cpp b/src/plugins/intel_cpu/src/utils/rt_info/memory_formats_attribute.cpp index 98432d06d057ab..d2de46a194d2b1 100644 --- a/src/plugins/intel_cpu/src/utils/rt_info/memory_formats_attribute.cpp +++ b/src/plugins/intel_cpu/src/utils/rt_info/memory_formats_attribute.cpp @@ -14,7 +14,7 @@ namespace intel_cpu { InputMemoryFormats::~InputMemoryFormats() = default; -std::string getInputMemoryFormats(const std::shared_ptr& node) { +std::string getInputMemoryFormats(const std::shared_ptr& node) { auto it_info = node->get_rt_info().find(InputMemoryFormats::get_type_info_static()); if (it_info != node->get_rt_info().end()) { if (it_info->second.is()) { @@ -26,7 +26,7 @@ std::string getInputMemoryFormats(const std::shared_ptr& node) { OutputMemoryFormats::~OutputMemoryFormats() = default; -std::string getOutputMemoryFormats(const std::shared_ptr& node) { +std::string getOutputMemoryFormats(const std::shared_ptr& node) { auto it_info = node->get_rt_info().find(OutputMemoryFormats::get_type_info_static()); if (it_info != node->get_rt_info().end()) { if (it_info->second.is()) { diff --git a/src/plugins/intel_cpu/src/utils/rt_info/memory_formats_attribute.hpp b/src/plugins/intel_cpu/src/utils/rt_info/memory_formats_attribute.hpp index 5d01b9fd58113f..6e8a0f625df90d 100644 --- a/src/plugins/intel_cpu/src/utils/rt_info/memory_formats_attribute.hpp +++ b/src/plugins/intel_cpu/src/utils/rt_info/memory_formats_attribute.hpp @@ -29,7 +29,7 @@ class MemoryFormats : public ov::RuntimeAttribute { return (!ov::op::util::is_constant(to)); } - ov::Any merge(const ngraph::NodeVector & nodes) const override { + ov::Any merge(const ov::NodeVector & nodes) const override { std::set unique_mem_format; for (auto &node : nodes) { @@ -65,7 +65,7 @@ class InputMemoryFormats : public MemoryFormats { ~InputMemoryFormats() override; }; -std::string getInputMemoryFormats(const std::shared_ptr& node); +std::string getInputMemoryFormats(const std::shared_ptr& node); class OutputMemoryFormats : public MemoryFormats { public: @@ -75,7 +75,7 @@ class OutputMemoryFormats : public MemoryFormats { ~OutputMemoryFormats() override; }; -std::string getOutputMemoryFormats(const std::shared_ptr& node); +std::string getOutputMemoryFormats(const std::shared_ptr& node); } // namespace intel_cpu } // namespace ov