From 624714a0d205aa24ae420a9cdbde59fb58e120b6 Mon Sep 17 00:00:00 2001 From: Tomasz Jankowski Date: Tue, 17 Dec 2024 15:41:59 +0100 Subject: [PATCH 1/6] Add OPENVINO_MATCHER_PASS_RTTI definition Signed-off-by: Tomasz Jankowski --- src/core/include/openvino/pass/matcher_pass.hpp | 15 ++++++++++++++- src/core/tests/graph_rewrite.cpp | 8 +++++--- src/core/tests/matcher_pass.cpp | 1 + src/core/tests/pass_config.cpp | 6 +++--- 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/src/core/include/openvino/pass/matcher_pass.hpp b/src/core/include/openvino/pass/matcher_pass.hpp index b17237fdf08340..f63ba538df2dbe 100644 --- a/src/core/include/openvino/pass/matcher_pass.hpp +++ b/src/core/include/openvino/pass/matcher_pass.hpp @@ -6,10 +6,23 @@ #include #include -#include +#include +#include +#include "openvino/core/rtti.hpp" #include "openvino/pass/node_registry.hpp" +#define _OPENVINO_MATCHER_PASS_RTTI_WITH_TYPE(TYPE_NAME) _OPENVINO_MATCHER_PASS_RTTI_WITH_TYPE_VERSION(TYPE_NAME, "0") + +#define _OPENVINO_MATCHER_PASS_RTTI_WITH_TYPE_VERSION(TYPE_NAME, VERSION_NAME) \ + _OPENVINO_RTTI_WITH_TYPE_VERSION_PARENT(TYPE_NAME, VERSION_NAME, ::ov::pass::MatcherPass) + +#define OPENVINO_MATCHER_PASS_RTTI(...) \ + _OPENVINO_RTTI_EXPAND(_OPENVINO_RTTI_DEFINITION_SELECTOR(__VA_ARGS__, \ + _OPENVINO_RTTI_WITH_TYPE_VERSION_PARENT, \ + _OPENVINO_MATCHER_PASS_RTTI_WITH_TYPE_VERSION, \ + _OPENVINO_MATCHER_PASS_RTTI_WITH_TYPE)(__VA_ARGS__)) + namespace ov { using matcher_pass_callback = std::function; using graph_rewrite_callback = std::function; diff --git a/src/core/tests/graph_rewrite.cpp b/src/core/tests/graph_rewrite.cpp index 3043e851aaf1d9..20955f5a5d6b1f 100644 --- a/src/core/tests/graph_rewrite.cpp +++ b/src/core/tests/graph_rewrite.cpp @@ -23,7 +23,7 @@ using namespace ov::pass; class TestPass : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("TestPass"); + OPENVINO_MATCHER_PASS_RTTI("TestPass"); TestPass() : MatcherPass() { auto divide = std::make_shared(element::f32, Shape{}, @@ -44,7 +44,7 @@ class TestPass : public ov::pass::MatcherPass { class GatherNodesPass : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("GatherNodesPass"); + OPENVINO_MATCHER_PASS_RTTI("GatherNodesPass"); GatherNodesPass(NodeVector& order) : MatcherPass() { ov::matcher_pass_callback callback = [&order](pattern::Matcher& m) { order.push_back(m.get_match_root()); @@ -187,6 +187,7 @@ TEST(GraphRewriteTest, MatcherPassCallbackDerived) { class TypeBasedTestPass : public ov::pass::MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("TypeBasedTestPass"); TypeBasedTestPass() : MatcherPass() { auto divide = std::make_shared(std::make_shared(), std::make_shared()); @@ -207,6 +208,7 @@ class TypeBasedTestPass : public ov::pass::MatcherPass { class TypeBasedTestPassDerived : public ov::pass::MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("TypeBasedTestPassDerived"); TypeBasedTestPassDerived() : MatcherPass() { auto divide = std::make_shared(std::make_shared(), std::make_shared()); @@ -388,7 +390,7 @@ TEST(PassConfigTest, Test1) { class CheckConsumers : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("CheckConsumers"); + OPENVINO_MATCHER_PASS_RTTI("CheckConsumers"); CheckConsumers() { ov::matcher_pass_callback callback = [](pattern::Matcher& m) -> bool { auto node = m.get_match_root(); diff --git a/src/core/tests/matcher_pass.cpp b/src/core/tests/matcher_pass.cpp index b845f496461193..ec9e5efbcdf9e8 100644 --- a/src/core/tests/matcher_pass.cpp +++ b/src/core/tests/matcher_pass.cpp @@ -21,6 +21,7 @@ using namespace std; class TestMatcherPass : public ov::pass::MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("TestMatcherPass"); TestMatcherPass() { auto m_relu1 = ov::pass::pattern::wrap_type(pattern::consumers_count(1)); auto m_relu2 = ov::pass::pattern::wrap_type({m_relu1}); diff --git a/src/core/tests/pass_config.cpp b/src/core/tests/pass_config.cpp index 566534d4f46ce4..15ebc71eef10a6 100644 --- a/src/core/tests/pass_config.cpp +++ b/src/core/tests/pass_config.cpp @@ -19,7 +19,7 @@ using namespace ov::pass; class RenameReLU : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("RanameReLU"); + OPENVINO_MATCHER_PASS_RTTI("RenameReLU"); RenameReLU() : MatcherPass() { auto relu = ov::pass::pattern::wrap_type(); ov::matcher_pass_callback callback = [](pattern::Matcher& m) { @@ -35,7 +35,7 @@ class RenameReLU : public ov::pass::MatcherPass { class RenameSigmoid : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("RenameSigmoid"); + OPENVINO_MATCHER_PASS_RTTI("RenameSigmoid"); RenameSigmoid() : MatcherPass() { auto sigmoid = pattern::wrap_type(); ov::matcher_pass_callback callback = [](pattern::Matcher& m) { @@ -259,7 +259,7 @@ TEST(PassConfig, EnableDisablePasses9) { class TestNestedMatcher : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("TestNestedMatcher"); + OPENVINO_MATCHER_PASS_RTTI("TestNestedMatcher"); TestNestedMatcher() : MatcherPass() { auto any_op = pattern::any_input(); ov::matcher_pass_callback callback = [this](pattern::Matcher& m) { From 5044527b3b606372d7be62f7e4278e77b49168d1 Mon Sep 17 00:00:00 2001 From: Tomasz Jankowski Date: Tue, 17 Dec 2024 20:51:38 +0100 Subject: [PATCH 2/6] Apply OPENVINO_MATCHER_PASS_RTTI in LP Transformations Signed-off-by: Tomasz Jankowski --- .../include/low_precision/base_matcher_pass.hpp | 1 + .../include/low_precision/convert_subtract_constant.hpp | 2 +- .../low_precision/create_precisions_dependent_attribute.hpp | 1 + .../include/low_precision/layer_transformation.hpp | 1 + .../include/low_precision/markup_bias.hpp | 4 ++-- .../low_precision/propagate_through_precision_preserved.hpp | 4 +++- .../include/low_precision/propagate_to_input.hpp | 3 ++- .../low_precision/pull_reshape_through_dequantization.hpp | 2 +- .../low_precision/pull_transpose_through_dequantization.hpp | 2 +- .../low_precision/update_shared_precision_preserved.hpp | 4 +++- 10 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/common/low_precision_transformations/include/low_precision/base_matcher_pass.hpp b/src/common/low_precision_transformations/include/low_precision/base_matcher_pass.hpp index f3a217e9d25cab..63f69b9e258d51 100644 --- a/src/common/low_precision_transformations/include/low_precision/base_matcher_pass.hpp +++ b/src/common/low_precision_transformations/include/low_precision/base_matcher_pass.hpp @@ -19,6 +19,7 @@ class LP_TRANSFORMATIONS_API BaseMatcherPass; class LP_TRANSFORMATIONS_API ov::pass::low_precision::BaseMatcherPass : public ov::pass::MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("low_precision::BaseMatcherPass"); BaseMatcherPass(const AttributeParameters& params = AttributeParameters()); AttributeParameters params; }; diff --git a/src/common/low_precision_transformations/include/low_precision/convert_subtract_constant.hpp b/src/common/low_precision_transformations/include/low_precision/convert_subtract_constant.hpp index d89384a8cd169f..91734aef48f399 100644 --- a/src/common/low_precision_transformations/include/low_precision/convert_subtract_constant.hpp +++ b/src/common/low_precision_transformations/include/low_precision/convert_subtract_constant.hpp @@ -31,6 +31,6 @@ class LP_TRANSFORMATIONS_API ConvertSubtractConstant; */ class ov::pass::low_precision::ConvertSubtractConstant : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ConvertSubtractConstant", "0"); + OPENVINO_MATCHER_PASS_RTTI("low_precision::ConvertSubtractConstant"); ConvertSubtractConstant(const std::vector& constantPrecisions = {}); }; diff --git a/src/common/low_precision_transformations/include/low_precision/create_precisions_dependent_attribute.hpp b/src/common/low_precision_transformations/include/low_precision/create_precisions_dependent_attribute.hpp index c57d15dde899bd..a9fb24840aa19e 100644 --- a/src/common/low_precision_transformations/include/low_precision/create_precisions_dependent_attribute.hpp +++ b/src/common/low_precision_transformations/include/low_precision/create_precisions_dependent_attribute.hpp @@ -40,6 +40,7 @@ class CreatePrecisionsDependentAttribute; template class ov::pass::low_precision::CreatePrecisionsDependentAttribute : public ov::pass::MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("low_precision::CreatePrecisionsDependentAttribute"); CreatePrecisionsDependentAttribute() { auto operation = pattern::wrap_type(); diff --git a/src/common/low_precision_transformations/include/low_precision/layer_transformation.hpp b/src/common/low_precision_transformations/include/low_precision/layer_transformation.hpp index d86dbd9470cc07..952cb3e468a17b 100644 --- a/src/common/low_precision_transformations/include/low_precision/layer_transformation.hpp +++ b/src/common/low_precision_transformations/include/low_precision/layer_transformation.hpp @@ -244,6 +244,7 @@ inline std::ostream &operator << (std::ostream &os, const DataPrecision& value) */ class LP_TRANSFORMATIONS_API LayerTransformation : public ov::pass::MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("low_precision::LayerTransformation"); class Params { public: Params( diff --git a/src/common/low_precision_transformations/include/low_precision/markup_bias.hpp b/src/common/low_precision_transformations/include/low_precision/markup_bias.hpp index a7f46f74dc0645..a8deb0847d6dff 100644 --- a/src/common/low_precision_transformations/include/low_precision/markup_bias.hpp +++ b/src/common/low_precision_transformations/include/low_precision/markup_bias.hpp @@ -23,10 +23,10 @@ namespace low_precision { */ class LP_TRANSFORMATIONS_API MarkupBias : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("MarkupBias", "0"); + OPENVINO_MATCHER_PASS_RTTI("low_precision::MarkupBias"); MarkupBias(); }; } // namespace low_precision } // namespace pass -} // namespace ov \ No newline at end of file +} // namespace ov diff --git a/src/common/low_precision_transformations/include/low_precision/propagate_through_precision_preserved.hpp b/src/common/low_precision_transformations/include/low_precision/propagate_through_precision_preserved.hpp index 0450091699065d..0a8c945d6c7fa1 100644 --- a/src/common/low_precision_transformations/include/low_precision/propagate_through_precision_preserved.hpp +++ b/src/common/low_precision_transformations/include/low_precision/propagate_through_precision_preserved.hpp @@ -38,7 +38,9 @@ class PropagateThroughPrecisionPreserved; template class ov::pass::low_precision::PropagateThroughPrecisionPreserved : public ov::pass::MatcherPass { public: - PropagateThroughPrecisionPreserved(const std::vector& defaultPrecisions = precision_set::get_int8_support()) { + OPENVINO_MATCHER_PASS_RTTI("low_precision::PropagateThroughPrecisionPreserved"); + PropagateThroughPrecisionPreserved( + const std::vector& defaultPrecisions = precision_set::get_int8_support()) { ov::graph_rewrite_callback callback = [&](pattern::Matcher& m) { auto node = m.get_match_root(); if (transformation_callback(node)) { diff --git a/src/common/low_precision_transformations/include/low_precision/propagate_to_input.hpp b/src/common/low_precision_transformations/include/low_precision/propagate_to_input.hpp index 3e550b9e950ff3..de30730fd2b151 100644 --- a/src/common/low_precision_transformations/include/low_precision/propagate_to_input.hpp +++ b/src/common/low_precision_transformations/include/low_precision/propagate_to_input.hpp @@ -37,7 +37,8 @@ class PropagateToInput; template class ov::pass::low_precision::PropagateToInput : public ov::pass::MatcherPass { public: - PropagateToInput(const std::vector& defaultPrecisions = { ov::element::u8, ov::element::i8 }) { + OPENVINO_MATCHER_PASS_RTTI("low_precision::PropagateToInput"); + PropagateToInput(const std::vector& defaultPrecisions = {ov::element::u8, ov::element::i8}) { ov::graph_rewrite_callback callback = [&](pattern::Matcher& m) { auto node = m.get_match_root(); if (transformation_callback(node)) { diff --git a/src/common/low_precision_transformations/include/low_precision/pull_reshape_through_dequantization.hpp b/src/common/low_precision_transformations/include/low_precision/pull_reshape_through_dequantization.hpp index 75d0d3f6510048..9a3d1113cbbe8a 100644 --- a/src/common/low_precision_transformations/include/low_precision/pull_reshape_through_dequantization.hpp +++ b/src/common/low_precision_transformations/include/low_precision/pull_reshape_through_dequantization.hpp @@ -30,6 +30,6 @@ class LP_TRANSFORMATIONS_API PullReshapeThroughDequantization; */ class ov::pass::low_precision::PullReshapeThroughDequantization : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("PullReshapeThroughDequantization", "0"); + OPENVINO_MATCHER_PASS_RTTI("low_precision::PullReshapeThroughDequantization"); PullReshapeThroughDequantization(const std::vector& inputPrecisions = {}); }; diff --git a/src/common/low_precision_transformations/include/low_precision/pull_transpose_through_dequantization.hpp b/src/common/low_precision_transformations/include/low_precision/pull_transpose_through_dequantization.hpp index 92e9eeebd2be52..8b16c910931230 100644 --- a/src/common/low_precision_transformations/include/low_precision/pull_transpose_through_dequantization.hpp +++ b/src/common/low_precision_transformations/include/low_precision/pull_transpose_through_dequantization.hpp @@ -30,6 +30,6 @@ class LP_TRANSFORMATIONS_API PullTransposeThroughDequantization; */ class ov::pass::low_precision::PullTransposeThroughDequantization : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("PullTransposeThroughDequantization", "0"); + OPENVINO_MATCHER_PASS_RTTI("low_precision::PullTransposeThroughDequantization"); PullTransposeThroughDequantization(const std::vector& inputPrecisions = {}); }; diff --git a/src/common/low_precision_transformations/include/low_precision/update_shared_precision_preserved.hpp b/src/common/low_precision_transformations/include/low_precision/update_shared_precision_preserved.hpp index 4113e1d86d4bef..e462981380247a 100644 --- a/src/common/low_precision_transformations/include/low_precision/update_shared_precision_preserved.hpp +++ b/src/common/low_precision_transformations/include/low_precision/update_shared_precision_preserved.hpp @@ -36,7 +36,9 @@ class UpdateSharedPrecisionPreserved; template class ov::pass::low_precision::UpdateSharedPrecisionPreserved : public ov::pass::MatcherPass { public: - UpdateSharedPrecisionPreserved(const std::vector& defaultPrecisions = precision_set::get_int8_support()) { + OPENVINO_MATCHER_PASS_RTTI("low_precision::UpdateSharedPrecisionPreserved"); + UpdateSharedPrecisionPreserved( + const std::vector& defaultPrecisions = precision_set::get_int8_support()) { ov::graph_rewrite_callback callback = [&](ov::pass::pattern::Matcher& m) { auto node = m.get_match_root(); From 92abcddb1e404c7fb6946b558e11d7e797958529 Mon Sep 17 00:00:00 2001 From: Tomasz Jankowski Date: Tue, 17 Dec 2024 21:02:56 +0100 Subject: [PATCH 3/6] Add missing RTTI definitions to Offline Transformations Signed-off-by: Tomasz Jankowski --- .../include/compress_quantize_weights.hpp | 4 ++-- .../offline_transformations/include/pruning.hpp | 2 +- .../src/pruning/init_masks.cpp | 2 ++ .../src/pruning/propagate_masks.cpp | 15 +++++++++++++++ 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/common/offline_transformations/include/compress_quantize_weights.hpp b/src/common/offline_transformations/include/compress_quantize_weights.hpp index 597b50828494a5..9b2792caf93d47 100644 --- a/src/common/offline_transformations/include/compress_quantize_weights.hpp +++ b/src/common/offline_transformations/include/compress_quantize_weights.hpp @@ -63,7 +63,7 @@ class CompressWeightsWithFakeConvert; */ class ov::pass::CompressWeightsWithFakeQuantize : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("CompressWeightsWithFakeQuantize", "0"); + OPENVINO_MATCHER_PASS_RTTI("CompressWeightsWithFakeQuantize"); CompressWeightsWithFakeQuantize(); }; @@ -95,7 +95,7 @@ class ov::pass::CompressWeightsWithFakeQuantize : public ov::pass::MatcherPass { */ class ov::pass::CompressWeightsWithFakeConvert : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("CompressWeightsWithFakeConvert", "0"); + OPENVINO_MATCHER_PASS_RTTI("CompressWeightsWithFakeConvert"); CompressWeightsWithFakeConvert(); }; diff --git a/src/common/offline_transformations/include/pruning.hpp b/src/common/offline_transformations/include/pruning.hpp index c71a84fe18d396..dd5374d7477ded 100644 --- a/src/common/offline_transformations/include/pruning.hpp +++ b/src/common/offline_transformations/include/pruning.hpp @@ -41,7 +41,7 @@ class ov::pass::InitMasks : public ov::pass::GraphRewrite { */ class ov::pass::InitConstMask : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("InitConstMask", "0"); + OPENVINO_MATCHER_PASS_RTTI("InitConstMask"); explicit InitConstMask( const ov::AxisSet& dims, const std::function& condition = [](const double& value) { diff --git a/src/common/offline_transformations/src/pruning/init_masks.cpp b/src/common/offline_transformations/src/pruning/init_masks.cpp index df94bfc59889c8..6cdede0b5f8252 100644 --- a/src/common/offline_transformations/src/pruning/init_masks.cpp +++ b/src/common/offline_transformations/src/pruning/init_masks.cpp @@ -22,6 +22,7 @@ class InitMatMulMask; class ov::pass::init_masks::InitConvMask : public MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("init_masks::InitConvMask"); InitConvMask() { auto input = pattern::any_input(); auto weights = pattern::any_input(); @@ -59,6 +60,7 @@ class ov::pass::init_masks::InitConvMask : public MatcherPass { class ov::pass::init_masks::InitMatMulMask : public MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("init_masks::InitMatMulMask"); InitMatMulMask() { auto a = pattern::any_input(); auto b = pattern::any_input(); diff --git a/src/common/offline_transformations/src/pruning/propagate_masks.cpp b/src/common/offline_transformations/src/pruning/propagate_masks.cpp index 40e5c98a31a30f..081a49109ec947 100644 --- a/src/common/offline_transformations/src/pruning/propagate_masks.cpp +++ b/src/common/offline_transformations/src/pruning/propagate_masks.cpp @@ -65,6 +65,7 @@ static ov::Shape broadcast_shape_to_rank(ov::Shape shape_to_broadcast, int64_t d class ov::pass::mask_propagation::MatMul : public MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("mask_propagation::MatMul"); MatMul() { auto a = pattern::any_input(pattern::has_static_shape()); auto b = pattern::any_input(pattern::has_static_shape()); @@ -201,6 +202,7 @@ class ov::pass::mask_propagation::MatMul : public MatcherPass { class ov::pass::mask_propagation::Convolution : public MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("mask_propagation::Convolution"); Convolution() { auto input = pattern::any_input(); auto weights = pattern::any_input(pattern::has_static_shape()); @@ -280,6 +282,7 @@ class ov::pass::mask_propagation::Convolution : public MatcherPass { class ov::pass::mask_propagation::GroupConvolution : public MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("mask_propagation::GroupConvolution"); GroupConvolution() { auto input = pattern::any_input(pattern::has_static_dim(1)); auto weights = pattern::any_input(pattern::has_static_shape()); @@ -366,6 +369,7 @@ class ov::pass::mask_propagation::GroupConvolution : public MatcherPass { class ov::pass::mask_propagation::GroupConvolutionReshape : public MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("mask_propagation::GroupConvolutionReshape"); GroupConvolutionReshape() { auto input = pattern::any_input(pattern::has_static_shape()); auto shape = pattern::any_input(); @@ -456,6 +460,7 @@ class ov::pass::mask_propagation::GroupConvolutionReshape : public MatcherPass { class ov::pass::mask_propagation::Elementwise : public MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("mask_propagation::Elementwise"); Elementwise() { auto input = pattern::any_input(); auto weights = pattern::any_input(); @@ -646,6 +651,7 @@ class ov::pass::mask_propagation::Elementwise : public MatcherPass { class ov::pass::mask_propagation::FakeQuantize : public MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("mask_propagation::FakeQuantize"); FakeQuantize() { auto input = pattern::any_input(pattern::has_static_shape()); auto input_low = pattern::any_input(pattern::has_static_shape()); @@ -758,6 +764,7 @@ class ov::pass::mask_propagation::FakeQuantize : public MatcherPass { class ov::pass::mask_propagation::Concat : public MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("mask_propagation::Concat"); Concat() { auto concat = pattern::wrap_type(pattern::has_static_shape()); @@ -864,6 +871,7 @@ class ov::pass::mask_propagation::Concat : public MatcherPass { class ov::pass::mask_propagation::PassThrough : public MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("mask_propagation::PassThrough"); PassThrough() { auto unary_op = pattern::wrap_type(); @@ -1117,6 +1126,7 @@ static std::vector collect_dims_attrs(const std::vector dims class ov::pass::mask_propagation::Reshape : public MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("mask_propagation::Reshape"); Reshape() { auto inputs = pattern::any_input(pattern::has_static_shape()); auto weights = pattern::any_input(); @@ -1373,6 +1383,7 @@ class ov::pass::mask_propagation::Reshape : public MatcherPass { class ov::pass::mask_propagation::Transpose : public MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("mask_propagation::Transpose"); Transpose() { auto input = pattern::any_input(); auto weights = pattern::any_input(); @@ -1480,6 +1491,7 @@ static ov::Mask::Ptr create_connect_split_output_mask(ov::Mask::Ptr input_mask, class ov::pass::mask_propagation::VariadicSplit : public MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("mask_propagation::VariadicSplit"); VariadicSplit() { auto input_pattern = pattern::any_input(pattern::has_static_rank()); auto axis_pattern = pattern::wrap_type(); @@ -1547,6 +1559,7 @@ class ov::pass::mask_propagation::VariadicSplit : public MatcherPass { class ov::pass::mask_propagation::Split : public MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("mask_propagation::Split"); Split() { auto input_pattern = pattern::any_input(pattern::has_static_rank()); auto axis_pattern = pattern::wrap_type(); @@ -1597,6 +1610,7 @@ class ov::pass::mask_propagation::Split : public MatcherPass { class ov::pass::mask_propagation::StopPropagation : public MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("mask_propagation::StopPropagation"); StopPropagation() { auto any_node = pattern::any_input(); @@ -1654,6 +1668,7 @@ class ov::pass::mask_propagation::StopPropagation : public MatcherPass { class ov::pass::mask_propagation::SkipPropagation : public MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("mask_propagation::SkipPropagation"); SkipPropagation() { // Skip mask propagation for ShapeOf operation to prevent this opearation to be // processed as stop op. From 85976daeca3906258e70b0641d8e4ed0830ff0d3 Mon Sep 17 00:00:00 2001 From: Tomasz Jankowski Date: Tue, 17 Dec 2024 21:23:11 +0100 Subject: [PATCH 4/6] Add missing RTTI definitions to common/snippets Signed-off-by: Tomasz Jankowski --- .../include/snippets/pass/broadcast_to_movebroadcast.hpp | 3 ++- .../snippets/include/snippets/pass/collapse_subgraph.hpp | 2 +- .../snippets/include/snippets/pass/common_optimizations.hpp | 2 +- .../snippets/include/snippets/pass/convert_constants.hpp | 1 + .../include/snippets/pass/convert_power_to_powerstatic.hpp | 3 ++- .../snippets/pass/explicit_transpose_matmul_inputs.hpp | 2 +- .../include/snippets/pass/extract_reshapes_from_mha.hpp | 2 +- src/common/snippets/include/snippets/pass/fc_tokenization.hpp | 2 +- .../snippets/include/snippets/pass/fq_decomposition.hpp | 1 + .../snippets/include/snippets/pass/fuse_transpose_brgemm.hpp | 4 ++-- .../snippets/include/snippets/pass/gn_decomposition.hpp | 4 ++-- src/common/snippets/include/snippets/pass/gn_tokenization.hpp | 4 ++-- .../snippets/include/snippets/pass/insert_movebroadcast.hpp | 1 + .../snippets/include/snippets/pass/matmul_to_brgemm.hpp | 2 +- .../snippets/include/snippets/pass/mha_tokenization.hpp | 2 +- .../include/snippets/pass/reduce_to_snippets_reduce.hpp | 3 ++- .../snippets/include/snippets/pass/softmax_decomposition.hpp | 2 +- .../include/snippets/pass/softmax_reshape_elimination.hpp | 1 + .../snippets/include/snippets/pass/transform_convert.hpp | 1 + .../include/snippets/pass/transpose_decomposition.hpp | 2 +- 20 files changed, 26 insertions(+), 18 deletions(-) diff --git a/src/common/snippets/include/snippets/pass/broadcast_to_movebroadcast.hpp b/src/common/snippets/include/snippets/pass/broadcast_to_movebroadcast.hpp index 242d490b2fab05..e0b51364973654 100644 --- a/src/common/snippets/include/snippets/pass/broadcast_to_movebroadcast.hpp +++ b/src/common/snippets/include/snippets/pass/broadcast_to_movebroadcast.hpp @@ -19,10 +19,11 @@ namespace pass { */ class BroadcastToMoveBroadcast: public ov::pass::MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("snippets::pass::BroadcastToMoveBroadcast"); BroadcastToMoveBroadcast(); }; } // namespace pass } // namespace snippets -} // namespace ov \ No newline at end of file +} // namespace ov diff --git a/src/common/snippets/include/snippets/pass/collapse_subgraph.hpp b/src/common/snippets/include/snippets/pass/collapse_subgraph.hpp index 41236df12aa0ef..3363ec09eb7c39 100644 --- a/src/common/snippets/include/snippets/pass/collapse_subgraph.hpp +++ b/src/common/snippets/include/snippets/pass/collapse_subgraph.hpp @@ -35,7 +35,7 @@ namespace pass { */ class TokenizeSnippets: public ov::pass::MatcherPass { public: - OPENVINO_RTTI("TokenizeSnippets", "0"); + OPENVINO_MATCHER_PASS_RTTI("snippets::pass::TokenizeSnippets"); explicit TokenizeSnippets(const SnippetsTokenization::Config& config); static bool AppropriateForSubgraph(const std::shared_ptr&); diff --git a/src/common/snippets/include/snippets/pass/common_optimizations.hpp b/src/common/snippets/include/snippets/pass/common_optimizations.hpp index 1ff2d6293db649..94224d7800777f 100644 --- a/src/common/snippets/include/snippets/pass/common_optimizations.hpp +++ b/src/common/snippets/include/snippets/pass/common_optimizations.hpp @@ -19,7 +19,7 @@ class CommonOptimizations : public ov::pass::MatcherPass { friend class SplitDimensionM; public: - OPENVINO_RTTI("CommonOptimizations", "0"); + OPENVINO_MATCHER_PASS_RTTI("snippets::pass::CommonOptimizations"); CommonOptimizations(const SnippetsTokenization::Config& config); }; diff --git a/src/common/snippets/include/snippets/pass/convert_constants.hpp b/src/common/snippets/include/snippets/pass/convert_constants.hpp index 629528a1700959..cd53d6db0c82b6 100644 --- a/src/common/snippets/include/snippets/pass/convert_constants.hpp +++ b/src/common/snippets/include/snippets/pass/convert_constants.hpp @@ -19,6 +19,7 @@ namespace pass { */ class ConvertConstantsToScalars: public ov::pass::MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("snippets::pass::ConvertConstantsToScalars"); ConvertConstantsToScalars(); }; diff --git a/src/common/snippets/include/snippets/pass/convert_power_to_powerstatic.hpp b/src/common/snippets/include/snippets/pass/convert_power_to_powerstatic.hpp index a2274837fb7c3a..b3aea4b0cb91ca 100644 --- a/src/common/snippets/include/snippets/pass/convert_power_to_powerstatic.hpp +++ b/src/common/snippets/include/snippets/pass/convert_power_to_powerstatic.hpp @@ -17,9 +17,10 @@ namespace pass { */ class ConvertPowerToPowerStatic: public ov::pass::MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("snippets::pass::ConvertPowerToPowerStatic"); ConvertPowerToPowerStatic(); }; } // namespace pass } // namespace snippets -} // namespace ov \ No newline at end of file +} // namespace ov diff --git a/src/common/snippets/include/snippets/pass/explicit_transpose_matmul_inputs.hpp b/src/common/snippets/include/snippets/pass/explicit_transpose_matmul_inputs.hpp index 5aeee244a76877..f4f577dd58edcd 100644 --- a/src/common/snippets/include/snippets/pass/explicit_transpose_matmul_inputs.hpp +++ b/src/common/snippets/include/snippets/pass/explicit_transpose_matmul_inputs.hpp @@ -23,7 +23,7 @@ namespace pass { */ class ExplicitTransposeMatMulInputs: public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ExplicitTransposeMatMulInputs", "0"); + OPENVINO_MATCHER_PASS_RTTI("snippets::pass::ExplicitTransposeMatMulInputs"); ExplicitTransposeMatMulInputs(); // Return `True` if all inputs (except 0-th input) have scalar shape. Otherwise returns `False` diff --git a/src/common/snippets/include/snippets/pass/extract_reshapes_from_mha.hpp b/src/common/snippets/include/snippets/pass/extract_reshapes_from_mha.hpp index c4c23b6e247951..b4e26de8a12403 100644 --- a/src/common/snippets/include/snippets/pass/extract_reshapes_from_mha.hpp +++ b/src/common/snippets/include/snippets/pass/extract_reshapes_from_mha.hpp @@ -31,7 +31,7 @@ namespace pass { */ class ExtractReshapesFromMHA: public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ExtractReshapesFromMHA", "0"); + OPENVINO_MATCHER_PASS_RTTI("snippets::pass::ExtractReshapesFromMHA"); ExtractReshapesFromMHA(); }; diff --git a/src/common/snippets/include/snippets/pass/fc_tokenization.hpp b/src/common/snippets/include/snippets/pass/fc_tokenization.hpp index 40505607341ba4..540334c3654a9f 100644 --- a/src/common/snippets/include/snippets/pass/fc_tokenization.hpp +++ b/src/common/snippets/include/snippets/pass/fc_tokenization.hpp @@ -18,7 +18,7 @@ namespace pass { */ class TokenizeFCSnippets: public ov::pass::MatcherPass { public: - OPENVINO_RTTI("TokenizeFCSnippets", "0"); + OPENVINO_MATCHER_PASS_RTTI("snippets::pass::TokenizeFCSnippets"); TokenizeFCSnippets(const SnippetsTokenization::Config& config); }; diff --git a/src/common/snippets/include/snippets/pass/fq_decomposition.hpp b/src/common/snippets/include/snippets/pass/fq_decomposition.hpp index 982835b4f27d64..1e4af6c04e22fa 100644 --- a/src/common/snippets/include/snippets/pass/fq_decomposition.hpp +++ b/src/common/snippets/include/snippets/pass/fq_decomposition.hpp @@ -49,6 +49,7 @@ namespace pass { class FakeQuantizeDecomposition : public ov::pass::MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("snippets::pass::FakeQuantizeDecomposition"); FakeQuantizeDecomposition(); static bool getScalesAndShifts(const std::shared_ptr& fq_node, diff --git a/src/common/snippets/include/snippets/pass/fuse_transpose_brgemm.hpp b/src/common/snippets/include/snippets/pass/fuse_transpose_brgemm.hpp index d913df46caa890..3a1a2d5488ce6f 100644 --- a/src/common/snippets/include/snippets/pass/fuse_transpose_brgemm.hpp +++ b/src/common/snippets/include/snippets/pass/fuse_transpose_brgemm.hpp @@ -23,7 +23,7 @@ namespace pass { */ class FuseTransposeBrgemm: public ov::pass::MatcherPass { public: - OPENVINO_RTTI("FuseTransposeBrgemm", "0"); + OPENVINO_MATCHER_PASS_RTTI("snippets::pass::FuseTransposeBrgemm"); FuseTransposeBrgemm(); static bool is_supported_transpose(const Output& transpose_out); @@ -32,4 +32,4 @@ class FuseTransposeBrgemm: public ov::pass::MatcherPass { } // namespace pass } // namespace snippets -} // namespace ov \ No newline at end of file +} // namespace ov diff --git a/src/common/snippets/include/snippets/pass/gn_decomposition.hpp b/src/common/snippets/include/snippets/pass/gn_decomposition.hpp index 5c7b6478dec15f..bd1c41c20b051d 100644 --- a/src/common/snippets/include/snippets/pass/gn_decomposition.hpp +++ b/src/common/snippets/include/snippets/pass/gn_decomposition.hpp @@ -17,10 +17,10 @@ namespace pass { */ class GNDecomposition: public ov::pass::MatcherPass { public: - OPENVINO_RTTI("GNDecomposition", "0"); + OPENVINO_MATCHER_PASS_RTTI("snippets::pass::GNDecomposition"); GNDecomposition(); }; } // namespace pass } // namespace snippets -} // namespace ov \ No newline at end of file +} // namespace ov diff --git a/src/common/snippets/include/snippets/pass/gn_tokenization.hpp b/src/common/snippets/include/snippets/pass/gn_tokenization.hpp index 220f05f0bbbc88..2d97cc9a72b4d2 100644 --- a/src/common/snippets/include/snippets/pass/gn_tokenization.hpp +++ b/src/common/snippets/include/snippets/pass/gn_tokenization.hpp @@ -18,10 +18,10 @@ namespace pass { */ class TokenizeGNSnippets : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("TokenizeGNSnippets", "0"); + OPENVINO_MATCHER_PASS_RTTI("snippets::pass::TokenizeGNSnippets"); TokenizeGNSnippets(); }; } // namespace pass } // namespace snippets -} // namespace ov \ No newline at end of file +} // namespace ov diff --git a/src/common/snippets/include/snippets/pass/insert_movebroadcast.hpp b/src/common/snippets/include/snippets/pass/insert_movebroadcast.hpp index 787677a22ed108..9a9f3c3757e909 100644 --- a/src/common/snippets/include/snippets/pass/insert_movebroadcast.hpp +++ b/src/common/snippets/include/snippets/pass/insert_movebroadcast.hpp @@ -18,6 +18,7 @@ namespace pass { */ class InsertMoveBroadcast: public ov::pass::MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("snippets::pass::InsertMoveBroadcast"); InsertMoveBroadcast(); static Output BroadcastNodeLastDim(const ov::Output& value, diff --git a/src/common/snippets/include/snippets/pass/matmul_to_brgemm.hpp b/src/common/snippets/include/snippets/pass/matmul_to_brgemm.hpp index 780b153b4f0487..35d68d15554c2b 100644 --- a/src/common/snippets/include/snippets/pass/matmul_to_brgemm.hpp +++ b/src/common/snippets/include/snippets/pass/matmul_to_brgemm.hpp @@ -19,7 +19,7 @@ namespace pass { */ class MatMulToBrgemm: public ov::pass::MatcherPass { public: - OPENVINO_RTTI("MatMulToBrgemm", "0"); + OPENVINO_MATCHER_PASS_RTTI("snippets::pass::MatMulToBrgemm"); MatMulToBrgemm(); }; diff --git a/src/common/snippets/include/snippets/pass/mha_tokenization.hpp b/src/common/snippets/include/snippets/pass/mha_tokenization.hpp index 78dad6ee8e6e19..a38aaf3d5c8546 100644 --- a/src/common/snippets/include/snippets/pass/mha_tokenization.hpp +++ b/src/common/snippets/include/snippets/pass/mha_tokenization.hpp @@ -40,7 +40,7 @@ namespace pass { */ class TokenizeMHASnippets: public ov::pass::MatcherPass { public: - OPENVINO_RTTI("TokenizeMHASnippets", "0"); + OPENVINO_MATCHER_PASS_RTTI("snippets::pass::TokenizeMHASnippets"); TokenizeMHASnippets(const SnippetsTokenization::Config& config); static std::vector get_fusion_transpose_order(size_t rank); diff --git a/src/common/snippets/include/snippets/pass/reduce_to_snippets_reduce.hpp b/src/common/snippets/include/snippets/pass/reduce_to_snippets_reduce.hpp index 01d33d6e86cd9c..df5412e5a56f21 100644 --- a/src/common/snippets/include/snippets/pass/reduce_to_snippets_reduce.hpp +++ b/src/common/snippets/include/snippets/pass/reduce_to_snippets_reduce.hpp @@ -18,10 +18,11 @@ namespace pass { */ class ReduceToSnippetsReduce: public ov::pass::MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("snippets::pass::ReduceToSnippetsReduce"); ReduceToSnippetsReduce(); }; } // namespace pass } // namespace snippets -} // namespace ov \ No newline at end of file +} // namespace ov diff --git a/src/common/snippets/include/snippets/pass/softmax_decomposition.hpp b/src/common/snippets/include/snippets/pass/softmax_decomposition.hpp index 8e24c1532a72d3..b604b49dffef73 100644 --- a/src/common/snippets/include/snippets/pass/softmax_decomposition.hpp +++ b/src/common/snippets/include/snippets/pass/softmax_decomposition.hpp @@ -17,7 +17,7 @@ namespace pass { */ class SoftmaxDecomposition: public ov::pass::MatcherPass { public: - OPENVINO_RTTI("SoftmaxDecomposition", "0"); + OPENVINO_MATCHER_PASS_RTTI("snippets::pass::SoftmaxDecomposition"); SoftmaxDecomposition(); }; diff --git a/src/common/snippets/include/snippets/pass/softmax_reshape_elimination.hpp b/src/common/snippets/include/snippets/pass/softmax_reshape_elimination.hpp index b43881c1425f84..e1be576cd8418a 100644 --- a/src/common/snippets/include/snippets/pass/softmax_reshape_elimination.hpp +++ b/src/common/snippets/include/snippets/pass/softmax_reshape_elimination.hpp @@ -17,6 +17,7 @@ namespace pass { */ class SoftmaxReshapeElimination: public ov::pass::MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("snippets::pass::SoftmaxReshapeElimination"); SoftmaxReshapeElimination(); }; diff --git a/src/common/snippets/include/snippets/pass/transform_convert.hpp b/src/common/snippets/include/snippets/pass/transform_convert.hpp index 5b087d4ae559eb..e9bb5a5ff40ca1 100644 --- a/src/common/snippets/include/snippets/pass/transform_convert.hpp +++ b/src/common/snippets/include/snippets/pass/transform_convert.hpp @@ -19,6 +19,7 @@ namespace pass { */ class TransformConvertToConvertTruncation: public ov::pass::MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("snippets::pass::TransformConvertToConvertTruncation"); TransformConvertToConvertTruncation(); }; diff --git a/src/common/snippets/include/snippets/pass/transpose_decomposition.hpp b/src/common/snippets/include/snippets/pass/transpose_decomposition.hpp index dbef9bc7b31c93..ea0305c331b88b 100644 --- a/src/common/snippets/include/snippets/pass/transpose_decomposition.hpp +++ b/src/common/snippets/include/snippets/pass/transpose_decomposition.hpp @@ -17,7 +17,7 @@ namespace pass { */ class TransposeDecomposition: public ov::pass::MatcherPass { public: - OPENVINO_RTTI("TransposeDecomposition", "0"); + OPENVINO_MATCHER_PASS_RTTI("snippets::pass::TransposeDecomposition"); TransposeDecomposition(); static bool is_supported_transpose(const Output& transpose_out); From c479291d06528ac79fd47268fd7c88dbcc6e24ca Mon Sep 17 00:00:00 2001 From: Tomasz Jankowski Date: Tue, 17 Dec 2024 21:57:45 +0100 Subject: [PATCH 5/6] Apply OPENVINO_MATCHER_PASS_RTTI in Frontends Signed-off-by: Tomasz Jankowski --- .../common/src/extension/decoder_transformation.cpp | 1 + .../src/internal/pass/transform_fakequantize.hpp | 4 ++-- .../paddle/src/internal/pass/transform_if.hpp | 2 +- .../paddle/src/internal/pass/transform_tensorarray.hpp | 2 +- .../paddle/src/internal/pass/transform_while.hpp | 2 +- .../src/transforms/append_list_unpack_replacer.hpp | 2 +- .../pytorch/src/transforms/aten_cat_replacer.hpp | 4 ++-- .../pytorch/src/transforms/aten_getitem_replacer.hpp | 2 +- .../pytorch/src/transforms/aten_index_put_replacer.hpp | 2 +- .../pytorch/src/transforms/aten_index_replacer.hpp | 2 +- .../transforms/aten_stack_list_construct_replacer.hpp | 2 +- .../pytorch/src/transforms/einsum_list_construct.hpp | 4 ++-- .../src/transforms/index_loop_getitem_replacer.hpp | 2 +- .../pytorch/src/transforms/irfftn_complex_replacer.hpp | 2 +- .../pytorch/src/transforms/listconstruct_replacer.hpp | 2 +- .../min_max_prim_list_construct_replacer.hpp | 2 +- .../pytorch/src/transforms/prim_list_construct_pad.hpp | 4 ++-- .../src/transforms/prim_list_unpack_replacer.hpp | 4 ++-- .../pytorch/src/transforms/quantized_node_remover.hpp | 2 +- .../pytorch/src/transforms/remove_packing_ops.hpp | 4 ++-- .../pytorch/src/transforms/reverseprop_resolver.hpp | 2 +- .../pytorch/src/transforms/rfftn_complex_replacer.hpp | 2 +- .../src/transforms/string_equality_replacer.hpp | 2 +- .../src/transforms/torchfx_gptq_pattern_replacer.hpp | 4 ++-- .../pytorch/src/transforms/tuple_unpack_replacer.hpp | 4 ++-- .../pytorch/src/transforms/u4_block_repack.hpp | 4 ++-- .../transformations/uninitialized_variable_resolve.hpp | 2 +- .../embedding_segments_feature_fusing.hpp | 2 +- .../helper_transforms/tensor_array_v3_replacer.hpp | 2 +- .../helper_transforms/tensor_list_ops_resolver.hpp | 10 +++++----- .../src/tflite_transformations/rfft2d_complex_abs.h | 2 +- .../tflite_quantize_resolver.hpp | 4 ++-- 32 files changed, 46 insertions(+), 45 deletions(-) diff --git a/src/frontends/common/src/extension/decoder_transformation.cpp b/src/frontends/common/src/extension/decoder_transformation.cpp index 561de1aacd79f9..4533fb89d85651 100644 --- a/src/frontends/common/src/extension/decoder_transformation.cpp +++ b/src/frontends/common/src/extension/decoder_transformation.cpp @@ -25,6 +25,7 @@ class CustomModelPass : public ov::pass::ModelPass { /// \brief Helper class to register user matcher pass initialization as a MatcherPass class CustomMatcherPass : public ov::pass::MatcherPass { public: + OPENVINO_MATCHER_PASS_RTTI("frontend::CustomMatcherPass"); explicit CustomMatcherPass(const std::function& matcher_pass_initializer) { matcher_pass_initializer(this); } diff --git a/src/frontends/paddle/src/internal/pass/transform_fakequantize.hpp b/src/frontends/paddle/src/internal/pass/transform_fakequantize.hpp index 6d45edd8ea818a..19abfcbf260d73 100644 --- a/src/frontends/paddle/src/internal/pass/transform_fakequantize.hpp +++ b/src/frontends/paddle/src/internal/pass/transform_fakequantize.hpp @@ -14,7 +14,7 @@ namespace pass { class TransformFakeQuantize : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::paddle::pass::TransformFakeQuantize"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::paddle::pass::TransformFakeQuantize"); TransformFakeQuantize(); private: @@ -23,4 +23,4 @@ class TransformFakeQuantize : public ov::pass::MatcherPass { } // namespace pass } // namespace paddle } // namespace frontend -} // namespace ov \ No newline at end of file +} // namespace ov diff --git a/src/frontends/paddle/src/internal/pass/transform_if.hpp b/src/frontends/paddle/src/internal/pass/transform_if.hpp index 98c66800d6fea6..f71c2b026fd3e4 100644 --- a/src/frontends/paddle/src/internal/pass/transform_if.hpp +++ b/src/frontends/paddle/src/internal/pass/transform_if.hpp @@ -14,7 +14,7 @@ namespace pass { class TransformIf : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::paddle::pass::TransformIf"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::paddle::pass::TransformIf"); TransformIf(std::vector> functions); private: diff --git a/src/frontends/paddle/src/internal/pass/transform_tensorarray.hpp b/src/frontends/paddle/src/internal/pass/transform_tensorarray.hpp index c992bf1eefa4c9..227ce708ad6503 100644 --- a/src/frontends/paddle/src/internal/pass/transform_tensorarray.hpp +++ b/src/frontends/paddle/src/internal/pass/transform_tensorarray.hpp @@ -14,7 +14,7 @@ namespace pass { class TransformTensorArray : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::paddle::pass::TransformTensorArray"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::paddle::pass::TransformTensorArray"); TransformTensorArray(std::vector> functions); private: diff --git a/src/frontends/paddle/src/internal/pass/transform_while.hpp b/src/frontends/paddle/src/internal/pass/transform_while.hpp index de6f381222a554..9a604f520168fe 100644 --- a/src/frontends/paddle/src/internal/pass/transform_while.hpp +++ b/src/frontends/paddle/src/internal/pass/transform_while.hpp @@ -14,7 +14,7 @@ namespace pass { class TransformWhile : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::paddle::pass::TransformWhile"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::paddle::pass::TransformWhile"); TransformWhile(std::vector> functions); private: diff --git a/src/frontends/pytorch/src/transforms/append_list_unpack_replacer.hpp b/src/frontends/pytorch/src/transforms/append_list_unpack_replacer.hpp index d3ecd8b28fc636..84b28c8c7e21d3 100644 --- a/src/frontends/pytorch/src/transforms/append_list_unpack_replacer.hpp +++ b/src/frontends/pytorch/src/transforms/append_list_unpack_replacer.hpp @@ -14,7 +14,7 @@ namespace pass { class AppendListUnpackReplacer : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::AppendListUnpackReplacer"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::AppendListUnpackReplacer"); AppendListUnpackReplacer(); }; diff --git a/src/frontends/pytorch/src/transforms/aten_cat_replacer.hpp b/src/frontends/pytorch/src/transforms/aten_cat_replacer.hpp index 8041e282445353..ef2d06da848132 100644 --- a/src/frontends/pytorch/src/transforms/aten_cat_replacer.hpp +++ b/src/frontends/pytorch/src/transforms/aten_cat_replacer.hpp @@ -15,11 +15,11 @@ namespace pass { // This transformation replaces pattern prim::ListConstruct->aten::append{none or many}->aten::cat class AtenCatToConcat : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::AtenCatToConcat"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::AtenCatToConcat"); AtenCatToConcat(); }; } // namespace pass } // namespace pytorch } // namespace frontend -} // namespace ov \ No newline at end of file +} // namespace ov diff --git a/src/frontends/pytorch/src/transforms/aten_getitem_replacer.hpp b/src/frontends/pytorch/src/transforms/aten_getitem_replacer.hpp index db99e2d65b2ef1..3d6de2c76b2c83 100644 --- a/src/frontends/pytorch/src/transforms/aten_getitem_replacer.hpp +++ b/src/frontends/pytorch/src/transforms/aten_getitem_replacer.hpp @@ -14,7 +14,7 @@ namespace pass { class AtenGetItemReplacer : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::AtenGetItemReplacer"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::AtenGetItemReplacer"); AtenGetItemReplacer(); }; diff --git a/src/frontends/pytorch/src/transforms/aten_index_put_replacer.hpp b/src/frontends/pytorch/src/transforms/aten_index_put_replacer.hpp index e74cf40e057bf2..b641ca3146d0c0 100644 --- a/src/frontends/pytorch/src/transforms/aten_index_put_replacer.hpp +++ b/src/frontends/pytorch/src/transforms/aten_index_put_replacer.hpp @@ -15,7 +15,7 @@ namespace pass { class PYTORCH_API AtenIndexPutReplacer : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::AtenIndexPutReplacer"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::AtenIndexPutReplacer"); AtenIndexPutReplacer(); }; diff --git a/src/frontends/pytorch/src/transforms/aten_index_replacer.hpp b/src/frontends/pytorch/src/transforms/aten_index_replacer.hpp index b9a034e3a2721f..67afefbef53f57 100644 --- a/src/frontends/pytorch/src/transforms/aten_index_replacer.hpp +++ b/src/frontends/pytorch/src/transforms/aten_index_replacer.hpp @@ -16,7 +16,7 @@ namespace pass { // This transformation replaces pattern prim::ListConstruct->aten::index class PYTORCH_API AtenIndexToSelect : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::AtenIndexToSelect"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::AtenIndexToSelect"); AtenIndexToSelect(); }; diff --git a/src/frontends/pytorch/src/transforms/aten_stack_list_construct_replacer.hpp b/src/frontends/pytorch/src/transforms/aten_stack_list_construct_replacer.hpp index ab7376619c4469..51b9832c2e35ae 100644 --- a/src/frontends/pytorch/src/transforms/aten_stack_list_construct_replacer.hpp +++ b/src/frontends/pytorch/src/transforms/aten_stack_list_construct_replacer.hpp @@ -14,7 +14,7 @@ namespace pass { class AtenStackListConstructReplacer : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::AtenStackListConstructReplacer"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::AtenStackListConstructReplacer"); AtenStackListConstructReplacer(); }; diff --git a/src/frontends/pytorch/src/transforms/einsum_list_construct.hpp b/src/frontends/pytorch/src/transforms/einsum_list_construct.hpp index 413c9f526214ae..ba792cbbb820af 100644 --- a/src/frontends/pytorch/src/transforms/einsum_list_construct.hpp +++ b/src/frontends/pytorch/src/transforms/einsum_list_construct.hpp @@ -14,11 +14,11 @@ namespace pass { class AtenEinsumListConstructReplacer : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::AtenEinsumListConstructReplacer"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::AtenEinsumListConstructReplacer"); AtenEinsumListConstructReplacer(); }; } // namespace pass } // namespace pytorch } // namespace frontend -} // namespace ov \ No newline at end of file +} // namespace ov diff --git a/src/frontends/pytorch/src/transforms/index_loop_getitem_replacer.hpp b/src/frontends/pytorch/src/transforms/index_loop_getitem_replacer.hpp index 89627723c3d515..dac4bdafa09d27 100644 --- a/src/frontends/pytorch/src/transforms/index_loop_getitem_replacer.hpp +++ b/src/frontends/pytorch/src/transforms/index_loop_getitem_replacer.hpp @@ -18,7 +18,7 @@ namespace pass { */ class IndexLoopGetitemReplacer : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::IndexLoopGetitemReplacer"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::IndexLoopGetitemReplacer"); IndexLoopGetitemReplacer(); }; diff --git a/src/frontends/pytorch/src/transforms/irfftn_complex_replacer.hpp b/src/frontends/pytorch/src/transforms/irfftn_complex_replacer.hpp index 3aa6991aed5d4d..d3a5738a82ddbf 100644 --- a/src/frontends/pytorch/src/transforms/irfftn_complex_replacer.hpp +++ b/src/frontends/pytorch/src/transforms/irfftn_complex_replacer.hpp @@ -14,7 +14,7 @@ namespace pass { class IRFFTNComplexReplacer : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::IRFFTNComplexReplacer"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::IRFFTNComplexReplacer"); IRFFTNComplexReplacer(); }; diff --git a/src/frontends/pytorch/src/transforms/listconstruct_replacer.hpp b/src/frontends/pytorch/src/transforms/listconstruct_replacer.hpp index 4b265d58d24541..49dac1f83d112a 100644 --- a/src/frontends/pytorch/src/transforms/listconstruct_replacer.hpp +++ b/src/frontends/pytorch/src/transforms/listconstruct_replacer.hpp @@ -14,7 +14,7 @@ namespace pass { class ListConstructReplacer : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::ListConstructReplacer"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::ListConstructReplacer"); ListConstructReplacer(); }; diff --git a/src/frontends/pytorch/src/transforms/min_max_prim_list_construct_replacer.hpp b/src/frontends/pytorch/src/transforms/min_max_prim_list_construct_replacer.hpp index 371b3be7ff7cd0..f8dc9a2037a130 100644 --- a/src/frontends/pytorch/src/transforms/min_max_prim_list_construct_replacer.hpp +++ b/src/frontends/pytorch/src/transforms/min_max_prim_list_construct_replacer.hpp @@ -14,7 +14,7 @@ namespace pass { class MinMaxPrimListConstructReplacer : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::MinMaxPrimListConstructReplacer"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::MinMaxPrimListConstructReplacer"); MinMaxPrimListConstructReplacer(); }; diff --git a/src/frontends/pytorch/src/transforms/prim_list_construct_pad.hpp b/src/frontends/pytorch/src/transforms/prim_list_construct_pad.hpp index 5e5322969f5285..bbd494f2b97b98 100644 --- a/src/frontends/pytorch/src/transforms/prim_list_construct_pad.hpp +++ b/src/frontends/pytorch/src/transforms/prim_list_construct_pad.hpp @@ -14,11 +14,11 @@ namespace pass { class PrimListConstructPadReplacer : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::PrimListConstructPadReplacer"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::PrimListConstructPadReplacer"); PrimListConstructPadReplacer(); }; } // namespace pass } // namespace pytorch } // namespace frontend -} // namespace ov \ No newline at end of file +} // namespace ov diff --git a/src/frontends/pytorch/src/transforms/prim_list_unpack_replacer.hpp b/src/frontends/pytorch/src/transforms/prim_list_unpack_replacer.hpp index 81521716a23430..449adc8a78779d 100644 --- a/src/frontends/pytorch/src/transforms/prim_list_unpack_replacer.hpp +++ b/src/frontends/pytorch/src/transforms/prim_list_unpack_replacer.hpp @@ -14,11 +14,11 @@ namespace pass { class PrimListUnpackReplacer : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::PrimListUnpackReplacer"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::PrimListUnpackReplacer"); PrimListUnpackReplacer(); }; } // namespace pass } // namespace pytorch } // namespace frontend -} // namespace ov \ No newline at end of file +} // namespace ov diff --git a/src/frontends/pytorch/src/transforms/quantized_node_remover.hpp b/src/frontends/pytorch/src/transforms/quantized_node_remover.hpp index e4ca3d5806d494..2ae26866f4fabb 100644 --- a/src/frontends/pytorch/src/transforms/quantized_node_remover.hpp +++ b/src/frontends/pytorch/src/transforms/quantized_node_remover.hpp @@ -20,7 +20,7 @@ namespace pass { */ class QuantizedNodeRemover : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::QuantizedNodeRemover"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::QuantizedNodeRemover"); QuantizedNodeRemover(); }; diff --git a/src/frontends/pytorch/src/transforms/remove_packing_ops.hpp b/src/frontends/pytorch/src/transforms/remove_packing_ops.hpp index 773100dfc35af9..a236a3fd081568 100644 --- a/src/frontends/pytorch/src/transforms/remove_packing_ops.hpp +++ b/src/frontends/pytorch/src/transforms/remove_packing_ops.hpp @@ -17,7 +17,7 @@ namespace pass { */ class MovePackThroughLstm : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::MovePackThroughLstm"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::MovePackThroughLstm"); MovePackThroughLstm(); }; @@ -26,7 +26,7 @@ class MovePackThroughLstm : public ov::pass::MatcherPass { */ class RemovePackingOps : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::RemovePackingOps"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::RemovePackingOps"); RemovePackingOps(); }; diff --git a/src/frontends/pytorch/src/transforms/reverseprop_resolver.hpp b/src/frontends/pytorch/src/transforms/reverseprop_resolver.hpp index a26249e4841d4b..8bc3109e479cf5 100644 --- a/src/frontends/pytorch/src/transforms/reverseprop_resolver.hpp +++ b/src/frontends/pytorch/src/transforms/reverseprop_resolver.hpp @@ -17,7 +17,7 @@ namespace pass { */ class ReversepropResolver : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::ReversepropResolver"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::ReversepropResolver"); ReversepropResolver(); }; diff --git a/src/frontends/pytorch/src/transforms/rfftn_complex_replacer.hpp b/src/frontends/pytorch/src/transforms/rfftn_complex_replacer.hpp index 04ec53ab0f1561..5115e38bdf55b1 100644 --- a/src/frontends/pytorch/src/transforms/rfftn_complex_replacer.hpp +++ b/src/frontends/pytorch/src/transforms/rfftn_complex_replacer.hpp @@ -14,7 +14,7 @@ namespace pass { class RFFTNComplexReplacer : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::RFFTNComplexReplacer"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::RFFTNComplexReplacer"); RFFTNComplexReplacer(); }; diff --git a/src/frontends/pytorch/src/transforms/string_equality_replacer.hpp b/src/frontends/pytorch/src/transforms/string_equality_replacer.hpp index 20dc3cc98b7f32..dfc826dfd600c0 100644 --- a/src/frontends/pytorch/src/transforms/string_equality_replacer.hpp +++ b/src/frontends/pytorch/src/transforms/string_equality_replacer.hpp @@ -14,7 +14,7 @@ namespace pass { class StringEqualityReplacer : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::StringEqualityReplacer"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::StringEqualityReplacer"); StringEqualityReplacer(); }; diff --git a/src/frontends/pytorch/src/transforms/torchfx_gptq_pattern_replacer.hpp b/src/frontends/pytorch/src/transforms/torchfx_gptq_pattern_replacer.hpp index 046a774e56ef8e..a77616b53813be 100644 --- a/src/frontends/pytorch/src/transforms/torchfx_gptq_pattern_replacer.hpp +++ b/src/frontends/pytorch/src/transforms/torchfx_gptq_pattern_replacer.hpp @@ -15,7 +15,7 @@ namespace pass { // This transformation replaces the GPTQ pattern with a Constant node class GPTQDecompressionReplacer : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::GPTQDecompressionReplacer"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::GPTQDecompressionReplacer"); GPTQDecompressionReplacer(); }; @@ -24,7 +24,7 @@ class GPTQDecompressionReplacer : public ov::pass::MatcherPass { // additional optimizations class GPTQMultPatternReplacer : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::GPTQMultPatternReplacer"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::GPTQMultPatternReplacer"); GPTQMultPatternReplacer(); }; diff --git a/src/frontends/pytorch/src/transforms/tuple_unpack_replacer.hpp b/src/frontends/pytorch/src/transforms/tuple_unpack_replacer.hpp index 8d737c3d15947d..625b986f3b64b7 100644 --- a/src/frontends/pytorch/src/transforms/tuple_unpack_replacer.hpp +++ b/src/frontends/pytorch/src/transforms/tuple_unpack_replacer.hpp @@ -14,7 +14,7 @@ namespace pass { class PrimTupleUnpackReplacer : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::PrimTupleUnpackReplacer"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::PrimTupleUnpackReplacer"); PrimTupleUnpackReplacer(); }; @@ -27,4 +27,4 @@ class TupleUnpackInBodyReplacer : public ov::pass::ModelPass { } // namespace pass } // namespace pytorch } // namespace frontend -} // namespace ov \ No newline at end of file +} // namespace ov diff --git a/src/frontends/pytorch/src/transforms/u4_block_repack.hpp b/src/frontends/pytorch/src/transforms/u4_block_repack.hpp index 99742ff148813a..891fd93554f558 100644 --- a/src/frontends/pytorch/src/transforms/u4_block_repack.hpp +++ b/src/frontends/pytorch/src/transforms/u4_block_repack.hpp @@ -14,13 +14,13 @@ namespace pass { class U4BlockRepack : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::U4BlockRepack"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::U4BlockRepack"); U4BlockRepack(bool is_symmetrical = false); }; class U4ConvertReshape : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::U4ConvertReshape"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::U4ConvertReshape"); U4ConvertReshape(); }; diff --git a/src/frontends/tensorflow/src/transformations/uninitialized_variable_resolve.hpp b/src/frontends/tensorflow/src/transformations/uninitialized_variable_resolve.hpp index 5e0f8bd6dfdec0..30aadee2776b9e 100644 --- a/src/frontends/tensorflow/src/transformations/uninitialized_variable_resolve.hpp +++ b/src/frontends/tensorflow/src/transformations/uninitialized_variable_resolve.hpp @@ -19,7 +19,7 @@ namespace pass { // it borrows value of Variable that was used for some state (or node) in a graph class UninitializedVariableResolver : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::tensorflow::pass::UninitializedVariableResolver"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::tensorflow::pass::UninitializedVariableResolver"); UninitializedVariableResolver(); }; diff --git a/src/frontends/tensorflow_common/include/helper_transforms/embedding_segments_feature_fusing.hpp b/src/frontends/tensorflow_common/include/helper_transforms/embedding_segments_feature_fusing.hpp index ec2ce348cb5a1b..696242f321e733 100644 --- a/src/frontends/tensorflow_common/include/helper_transforms/embedding_segments_feature_fusing.hpp +++ b/src/frontends/tensorflow_common/include/helper_transforms/embedding_segments_feature_fusing.hpp @@ -20,7 +20,7 @@ namespace pass { // Such sub-graph is met in the Wide and Deep model in case of the SINGLE categorical feature. class EmbeddingSegmentSingleFeatureFusion : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::tensorflow::pass::EmbeddingSegmentSingleFeatureFusion"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::tensorflow::pass::EmbeddingSegmentSingleFeatureFusion"); EmbeddingSegmentSingleFeatureFusion(); }; diff --git a/src/frontends/tensorflow_common/include/helper_transforms/tensor_array_v3_replacer.hpp b/src/frontends/tensorflow_common/include/helper_transforms/tensor_array_v3_replacer.hpp index ad442e3e5dbe29..e0f7c20c11c9b9 100644 --- a/src/frontends/tensorflow_common/include/helper_transforms/tensor_array_v3_replacer.hpp +++ b/src/frontends/tensorflow_common/include/helper_transforms/tensor_array_v3_replacer.hpp @@ -19,7 +19,7 @@ namespace pass { // that simulates initial state of tensor array container class TensorArrayV3Replacer : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::tensorflow::pass::TensorArrayV3Replacer"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::tensorflow::pass::TensorArrayV3Replacer"); TensorArrayV3Replacer(); }; diff --git a/src/frontends/tensorflow_common/include/helper_transforms/tensor_list_ops_resolver.hpp b/src/frontends/tensorflow_common/include/helper_transforms/tensor_list_ops_resolver.hpp index 764b7dfc472d2a..cb587d7f665c7b 100644 --- a/src/frontends/tensorflow_common/include/helper_transforms/tensor_list_ops_resolver.hpp +++ b/src/frontends/tensorflow_common/include/helper_transforms/tensor_list_ops_resolver.hpp @@ -15,14 +15,14 @@ namespace pass { // Replace internal operation TensorListReserve with a sub-graph producing initial container class TensorListReplacer : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::tensorflow::pass::TensorListReplacer"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::tensorflow::pass::TensorListReplacer"); TensorListReplacer(); }; // Replace internal operation TensorListSetItem with a sub-graph that inserts a new tensor into container class TensorListSetItemReplacer : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::tensorflow::pass::TensorListSetItemReplacer"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::tensorflow::pass::TensorListSetItemReplacer"); TensorListSetItemReplacer(); }; @@ -30,14 +30,14 @@ class TensorListSetItemReplacer : public ov::pass::MatcherPass { // that inserts a new tensor into the tail of the container class TensorListPushBackReplacer : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::tensorflow::pass::TensorListPushBackReplacer"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::tensorflow::pass::TensorListPushBackReplacer"); TensorListPushBackReplacer(); }; // Replace internal operation TensorListGetItem with a sub-graph that gets a tensor from container by index class TensorListGetItemReplacer : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::tensorflow::pass::TensorListGetItemReplacer"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::tensorflow::pass::TensorListGetItemReplacer"); TensorListGetItemReplacer(); }; @@ -45,7 +45,7 @@ class TensorListGetItemReplacer : public ov::pass::MatcherPass { // Replace TensorListSetItem and TensorListGetItem with ConcatOutput and SlicedInput class TensorListInLoopOptimization : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::tensorflow::pass::TensorListInLoopOptimization"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::tensorflow::pass::TensorListInLoopOptimization"); TensorListInLoopOptimization(); }; diff --git a/src/frontends/tensorflow_lite/src/tflite_transformations/rfft2d_complex_abs.h b/src/frontends/tensorflow_lite/src/tflite_transformations/rfft2d_complex_abs.h index f8599e2c7791a3..11e79cfe09a58c 100644 --- a/src/frontends/tensorflow_lite/src/tflite_transformations/rfft2d_complex_abs.h +++ b/src/frontends/tensorflow_lite/src/tflite_transformations/rfft2d_complex_abs.h @@ -24,7 +24,7 @@ namespace pass { // \-(imag)-> Unsqueeze -> Reshape -> Square / class Rfft2dSimplifier : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::tensorflow_lite::pass::Rfft2dSimplifier"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::tensorflow_lite::pass::Rfft2dSimplifier"); Rfft2dSimplifier(); }; diff --git a/src/frontends/tensorflow_lite/src/tflite_transformations/tflite_quantize_resolver.hpp b/src/frontends/tensorflow_lite/src/tflite_transformations/tflite_quantize_resolver.hpp index 45fd3e70722d54..584e8c55b6a9ea 100644 --- a/src/frontends/tensorflow_lite/src/tflite_transformations/tflite_quantize_resolver.hpp +++ b/src/frontends/tensorflow_lite/src/tflite_transformations/tflite_quantize_resolver.hpp @@ -18,14 +18,14 @@ namespace pass { // Fuses Convert into TFLQuantize operation class TFLQuantizeConvert : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::tensorflow_lite::pass::TFLQuantizeConvert"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::tensorflow_lite::pass::TFLQuantizeConvert"); TFLQuantizeConvert(); }; // Replaces TFLQuantize operation with FQ or sub-mul pattern if necessary class TFLQuantizeReplacer : public ov::pass::MatcherPass { public: - OPENVINO_RTTI("ov::frontend::tensorflow_lite::pass::TFLQuantizeReplacer"); + OPENVINO_MATCHER_PASS_RTTI("ov::frontend::tensorflow_lite::pass::TFLQuantizeReplacer"); TFLQuantizeReplacer(); }; From 0af56c1eaa46801b548f1b586fd0ba834252a9ec Mon Sep 17 00:00:00 2001 From: Tomasz Jankowski Date: Tue, 17 Dec 2024 22:28:55 +0100 Subject: [PATCH 6/6] Reduce number of parameters in OPENVINO_MATCHER_PASS_RTTI Signed-off-by: Tomasz Jankowski --- src/core/include/openvino/core/rtti.hpp | 15 ++++++------ src/core/include/openvino/op/op.hpp | 24 +++++++++---------- .../include/openvino/pass/matcher_pass.hpp | 9 ++++--- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/core/include/openvino/core/rtti.hpp b/src/core/include/openvino/core/rtti.hpp index e9681c93e45f1f..758e2de15db181 100644 --- a/src/core/include/openvino/core/rtti.hpp +++ b/src/core/include/openvino/core/rtti.hpp @@ -7,8 +7,9 @@ #include "openvino/core/type.hpp" #include "openvino/core/visibility.hpp" -#define _OPENVINO_RTTI_EXPAND(X) X -#define _OPENVINO_RTTI_DEFINITION_SELECTOR(_1, _2, _3, NAME, ...) NAME +#define _OPENVINO_RTTI_EXPAND(X) X +#define _OPENVINO_RTTI_DEFINITION_SELECTOR_2(_1, _2, NAME, ...) NAME +#define _OPENVINO_RTTI_DEFINITION_SELECTOR_3(_1, _2, _3, NAME, ...) NAME #define _OPENVINO_RTTI_WITH_TYPE(TYPE_NAME) _OPENVINO_RTTI_WITH_TYPE_VERSION(TYPE_NAME, "util") @@ -87,11 +88,11 @@ /// OPENVINO_RTTI(name, version_id) /// OPENVINO_RTTI(name, version_id, parent) /// OPENVINO_RTTI(name, version_id, parent, old_version) -#define OPENVINO_RTTI(...) \ - _OPENVINO_RTTI_EXPAND(_OPENVINO_RTTI_DEFINITION_SELECTOR(__VA_ARGS__, \ - _OPENVINO_RTTI_WITH_TYPE_VERSION_PARENT, \ - _OPENVINO_RTTI_WITH_TYPE_VERSION, \ - _OPENVINO_RTTI_WITH_TYPE)(__VA_ARGS__)) +#define OPENVINO_RTTI(...) \ + _OPENVINO_RTTI_EXPAND(_OPENVINO_RTTI_DEFINITION_SELECTOR_3(__VA_ARGS__, \ + _OPENVINO_RTTI_WITH_TYPE_VERSION_PARENT, \ + _OPENVINO_RTTI_WITH_TYPE_VERSION, \ + _OPENVINO_RTTI_WITH_TYPE)(__VA_ARGS__)) /// Note: Please don't use this macros for new operations #define BWDCMP_RTTI_DECLARATION diff --git a/src/core/include/openvino/op/op.hpp b/src/core/include/openvino/op/op.hpp index 62328429107401..bc172d103c94a2 100644 --- a/src/core/include/openvino/op/op.hpp +++ b/src/core/include/openvino/op/op.hpp @@ -14,18 +14,18 @@ #define _OPENVINO_RTTI_OP_WITH_TYPE_VERSION(TYPE_NAME, VERSION_NAME) \ _OPENVINO_RTTI_WITH_TYPE_VERSION_PARENT(TYPE_NAME, VERSION_NAME, ::ov::op::Op) -#define OPENVINO_OP(...) \ - _OPENVINO_RTTI_EXPAND(_OPENVINO_RTTI_DEFINITION_SELECTOR(__VA_ARGS__, \ - _OPENVINO_RTTI_WITH_TYPE_VERSION_PARENT, \ - _OPENVINO_RTTI_OP_WITH_TYPE_VERSION, \ - _OPENVINO_RTTI_OP_WITH_TYPE)(__VA_ARGS__)) \ - /* Add accessibility for Op to the method: evaluate from the Base class \ - Usually C++ allows to use virtual methods of Base class from Derived class but if they have \ - the same name and not all of them are overrided in Derived class, the only overrided methods \ - will be available from Derived class. We need to explicitly cast Derived to Base class to \ - have an access to remaining methods or use this using. */ \ - using ov::op::Op::evaluate; \ - using ov::op::Op::evaluate_lower; \ +#define OPENVINO_OP(...) \ + _OPENVINO_RTTI_EXPAND(_OPENVINO_RTTI_DEFINITION_SELECTOR_3(__VA_ARGS__, \ + _OPENVINO_RTTI_WITH_TYPE_VERSION_PARENT, \ + _OPENVINO_RTTI_OP_WITH_TYPE_VERSION, \ + _OPENVINO_RTTI_OP_WITH_TYPE)(__VA_ARGS__)) \ + /* Add accessibility for Op to the method: evaluate from the Base class \ + Usually C++ allows to use virtual methods of Base class from Derived class but if they have \ + the same name and not all of them are overrided in Derived class, the only overrided methods \ + will be available from Derived class. We need to explicitly cast Derived to Base class to \ + have an access to remaining methods or use this using. */ \ + using ov::op::Op::evaluate; \ + using ov::op::Op::evaluate_lower; \ using ov::op::Op::evaluate_upper; namespace ov { diff --git a/src/core/include/openvino/pass/matcher_pass.hpp b/src/core/include/openvino/pass/matcher_pass.hpp index f63ba538df2dbe..e98f5ff89008fd 100644 --- a/src/core/include/openvino/pass/matcher_pass.hpp +++ b/src/core/include/openvino/pass/matcher_pass.hpp @@ -17,11 +17,10 @@ #define _OPENVINO_MATCHER_PASS_RTTI_WITH_TYPE_VERSION(TYPE_NAME, VERSION_NAME) \ _OPENVINO_RTTI_WITH_TYPE_VERSION_PARENT(TYPE_NAME, VERSION_NAME, ::ov::pass::MatcherPass) -#define OPENVINO_MATCHER_PASS_RTTI(...) \ - _OPENVINO_RTTI_EXPAND(_OPENVINO_RTTI_DEFINITION_SELECTOR(__VA_ARGS__, \ - _OPENVINO_RTTI_WITH_TYPE_VERSION_PARENT, \ - _OPENVINO_MATCHER_PASS_RTTI_WITH_TYPE_VERSION, \ - _OPENVINO_MATCHER_PASS_RTTI_WITH_TYPE)(__VA_ARGS__)) +#define OPENVINO_MATCHER_PASS_RTTI(...) \ + _OPENVINO_RTTI_EXPAND(_OPENVINO_RTTI_DEFINITION_SELECTOR_2(__VA_ARGS__, \ + _OPENVINO_MATCHER_PASS_RTTI_WITH_TYPE_VERSION, \ + _OPENVINO_MATCHER_PASS_RTTI_WITH_TYPE)(__VA_ARGS__)) namespace ov { using matcher_pass_callback = std::function;