From e8f906e165a09b5eb707d8857edc96c051887f57 Mon Sep 17 00:00:00 2001 From: Tomasz Jankowski Date: Thu, 19 Dec 2024 18:48:47 +0100 Subject: [PATCH] [RTTI] Add OPENVINO_MODEL_PASS_RTTI definition (#28123) ### Details: - Adds RTTI definition for passes derived from ov::pass::ModelPass. - Applies the macro where applicable. ### Tickets: - CVS-159568 --------- Signed-off-by: Tomasz Jankowski Co-authored-by: Michal Lukaszewski --- .../low_precision/align_quantization_intervals.hpp | 2 +- .../align_quantization_parameters.hpp | 2 +- .../include/low_precision/low_precision.hpp | 4 ++-- .../markup_avg_pool_precision_preserved.hpp | 2 +- .../low_precision/markup_can_be_quantized.hpp | 2 +- .../include/low_precision/markup_precisions.hpp | 2 +- .../markup_quantization_granularity.hpp | 3 ++- .../include/low_precision/propagate_precisions.hpp | 2 +- .../low_precision/propagate_shared_value.hpp | 1 + .../tests/simple_low_precision_transformer.hpp | 1 + .../offline_transformations/include/pruning.hpp | 4 ++-- .../include/snippets/pass/align_element_types.hpp | 2 +- .../snippets/pass/analyze_broadcastable_inputs.hpp | 2 +- .../include/snippets/pass/canonicalization.hpp | 2 +- .../include/snippets/pass/fq_decomposition.hpp | 2 ++ src/common/snippets/include/snippets/pass/hash.hpp | 2 +- .../include/snippets/pass/propagate_precision.hpp | 2 +- .../include/snippets/pass/tokenization.hpp | 5 +++-- .../snippets/include/snippets/pass/validate.hpp | 2 +- .../change_placeholder_types.hpp | 2 +- .../common_optimizations/common_optimizations.hpp | 2 +- .../common_optimizations/dimension_tracking.hpp | 2 +- .../common_optimizations/fused_names_cleanup.hpp | 2 +- .../mark_precision_sensitive_shapeof_subgraphs.hpp | 2 +- .../moc_legacy_transformations.hpp | 2 +- .../common_optimizations/moc_transformations.hpp | 10 ++++++---- .../optimize_strided_slice.hpp | 8 ++++---- .../push_constant_to_subgraph.hpp | 2 +- .../remove_multi_subgraph_op_dangling_params.hpp | 2 +- .../reverse_shape_and_type_infer.hpp | 2 +- .../common_optimizations/ric_fusion.hpp | 2 +- .../shared_ops_optimization.hpp | 2 +- .../simplify_shape_of_sub_graph.hpp | 2 +- .../transformations/control_flow/unroll_if.hpp | 2 +- .../control_flow/unroll_tensor_iterator.hpp | 2 +- .../include/transformations/convert_precision.hpp | 2 +- .../align_mixed_fp32_fp16_types.hpp | 2 +- .../convert_compression_only_to_legacy.hpp | 2 +- .../mark_subgraphs_to_keep_in_mixed_precision.hpp | 2 +- .../include/transformations/hash.hpp | 2 +- .../include/transformations/init_node_info.hpp | 2 +- .../opset_conversions/convert_opset2_to_opset1.hpp | 2 +- .../opset_conversions/convert_opset3_to_opset2.hpp | 2 +- .../transformations/resolve_names_collisions.hpp | 2 +- .../smart_reshape/lstm_states_broadcast.hpp | 2 +- .../smart_reshape/smart_reshape.hpp | 2 +- .../symbol_optimization.hpp | 4 ++-- .../symbolic_optimizations.hpp | 6 +++--- .../transpose_sinking/ts_general.hpp | 2 +- .../include/transformations/utils/print_model.hpp | 2 +- .../common_optimizations/ric_fusion.cpp | 2 +- .../include/openvino/pass/constant_folding.hpp | 2 +- .../include/openvino/pass/convert_fp32_to_fp16.hpp | 2 +- src/core/include/openvino/pass/graph_rewrite.hpp | 2 +- src/core/include/openvino/pass/low_latency.hpp | 2 +- src/core/include/openvino/pass/make_stateful.hpp | 2 +- src/core/include/openvino/pass/pass.hpp | 14 ++++++++++++-- .../openvino/pass/sdpa_to_paged_attention.hpp | 2 +- src/core/include/openvino/pass/serialize.hpp | 4 ++-- .../openvino/pass/stateful_to_stateless.hpp | 2 +- src/core/include/openvino/pass/validate.hpp | 2 +- src/core/include/openvino/pass/visualize_tree.hpp | 2 +- .../frontend/decoder_transformation_extension.cpp | 2 +- src/core/tests/pass_config.cpp | 2 +- .../src/extension/decoder_transformation.cpp | 1 + .../pytorch/src/transforms/dict_resolver.hpp | 4 ++-- .../prim_list_tuple_construct_replacer.hpp | 2 +- .../transforms/prim_unpack_parameter_replacer.hpp | 2 +- .../src/transforms/tuple_unpack_replacer.hpp | 2 +- .../src/transformations/switch_merge_resolve.hpp | 2 +- .../helper_transforms/const_to_result_remover.hpp | 2 +- .../saved_model_unused_remover.hpp | 2 +- .../tflite_quantize_resolver.hpp | 2 +- .../aarch64/pass/snippets_mark_skipped.hpp | 2 +- .../snippets/x64/pass/enforce_precision.hpp | 2 +- .../snippets/x64/pass/snippets_mark_skipped.hpp | 2 +- .../tpp/x64/pass/fuse_tpp_to_equations.hpp | 2 +- .../plugin/transformations/convert_convolution.hpp | 2 +- .../transformations/print_model_statistics.hpp | 2 +- .../include/common_test_utils/graph_comparator.hpp | 3 +++ .../common_test_utils/src/ov_test_utils.cpp | 1 + 81 files changed, 113 insertions(+), 90 deletions(-) diff --git a/src/common/low_precision_transformations/include/low_precision/align_quantization_intervals.hpp b/src/common/low_precision_transformations/include/low_precision/align_quantization_intervals.hpp index 2caf346bfc5da6..5d82af51847081 100644 --- a/src/common/low_precision_transformations/include/low_precision/align_quantization_intervals.hpp +++ b/src/common/low_precision_transformations/include/low_precision/align_quantization_intervals.hpp @@ -30,7 +30,7 @@ class LP_TRANSFORMATIONS_API AlignQuantizationIntervals; */ class ov::pass::low_precision::AlignQuantizationIntervals : public ov::pass::ModelPass { public: - OPENVINO_RTTI("AlignQuantizationIntervals", "0"); + OPENVINO_MODEL_PASS_RTTI("low_precision::AlignQuantizationIntervals"); AlignQuantizationIntervals(const std::vector& defaultPrecisions = ov::pass::low_precision::precision_set::get_int8_support()); bool run_on_model(const std::shared_ptr& m) override; private: diff --git a/src/common/low_precision_transformations/include/low_precision/align_quantization_parameters.hpp b/src/common/low_precision_transformations/include/low_precision/align_quantization_parameters.hpp index 89c9bf59747860..ce6db1c397522f 100644 --- a/src/common/low_precision_transformations/include/low_precision/align_quantization_parameters.hpp +++ b/src/common/low_precision_transformations/include/low_precision/align_quantization_parameters.hpp @@ -31,7 +31,7 @@ class LP_TRANSFORMATIONS_API AlignQuantizationParameters; */ class ov::pass::low_precision::AlignQuantizationParameters : public ov::pass::ModelPass { public: - OPENVINO_RTTI("AlignQuantizationParameters", "0"); + OPENVINO_MODEL_PASS_RTTI("low_precision::AlignQuantizationParameters"); AlignQuantizationParameters(const std::vector defaultPrecisions = ov::pass::low_precision::precision_set::get_int8_support()); bool run_on_model(const std::shared_ptr& m) override; private: diff --git a/src/common/low_precision_transformations/include/low_precision/low_precision.hpp b/src/common/low_precision_transformations/include/low_precision/low_precision.hpp index d6bddd3643a4f6..b3b92340303ced 100644 --- a/src/common/low_precision_transformations/include/low_precision/low_precision.hpp +++ b/src/common/low_precision_transformations/include/low_precision/low_precision.hpp @@ -42,7 +42,7 @@ class LP_TRANSFORMATIONS_API LowPrecision; class ov::pass::low_precision::MarkupOptimizations : public ov::pass::ModelPass { public: - OPENVINO_RTTI("MarkupOptimizations", "0"); + OPENVINO_MODEL_PASS_RTTI("low_precision::MarkupOptimizations"); MarkupOptimizations( const std::vector& precisionRestrictions, const std::vector& quantizationRestrictions, @@ -62,7 +62,7 @@ class ov::pass::low_precision::TypeRelaxedReplacer : public ov::pass::GraphRewri class LP_TRANSFORMATIONS_API ov::pass::low_precision::LowPrecision : public ov::pass::ModelPass { public: - OPENVINO_RTTI("LowPrecision", "0"); + OPENVINO_MODEL_PASS_RTTI("low_precision::LowPrecision"); LowPrecision( const std::vector& precisionRestrictions = {}, const std::vector& quantizationRestrictions = {}, diff --git a/src/common/low_precision_transformations/include/low_precision/markup_avg_pool_precision_preserved.hpp b/src/common/low_precision_transformations/include/low_precision/markup_avg_pool_precision_preserved.hpp index da3605b4ee4ba5..4e65b9f414f9fc 100644 --- a/src/common/low_precision_transformations/include/low_precision/markup_avg_pool_precision_preserved.hpp +++ b/src/common/low_precision_transformations/include/low_precision/markup_avg_pool_precision_preserved.hpp @@ -29,7 +29,7 @@ class LP_TRANSFORMATIONS_API MarkupAvgPoolPrecisionPreserved; */ class ov::pass::low_precision::MarkupAvgPoolPrecisionPreserved : public ov::pass::ModelPass { public: - OPENVINO_RTTI("MarkupAvgPoolPrecisionPreserved", "0"); + OPENVINO_MODEL_PASS_RTTI("low_precision::MarkupAvgPoolPrecisionPreserved"); MarkupAvgPoolPrecisionPreserved(const std::vector defaultPrecisions = ov::pass::low_precision::precision_set::get_int8_support()); bool run_on_model(const std::shared_ptr& m) override; private: diff --git a/src/common/low_precision_transformations/include/low_precision/markup_can_be_quantized.hpp b/src/common/low_precision_transformations/include/low_precision/markup_can_be_quantized.hpp index f886e69f2088c7..7359a6617c96b6 100644 --- a/src/common/low_precision_transformations/include/low_precision/markup_can_be_quantized.hpp +++ b/src/common/low_precision_transformations/include/low_precision/markup_can_be_quantized.hpp @@ -30,7 +30,7 @@ class LP_TRANSFORMATIONS_API MarkupCanBeQuantized; */ class ov::pass::low_precision::MarkupCanBeQuantized : public ov::pass::ModelPass { public: - OPENVINO_RTTI("MarkupCanBeQuantized", "0"); + OPENVINO_MODEL_PASS_RTTI("low_precision::MarkupCanBeQuantized"); MarkupCanBeQuantized(const std::vector defaultPrecisions = { ov::element::u8, ov::element::i8 }); bool run_on_model(const std::shared_ptr& m) override; private: diff --git a/src/common/low_precision_transformations/include/low_precision/markup_precisions.hpp b/src/common/low_precision_transformations/include/low_precision/markup_precisions.hpp index 92ea93b2c3e5b1..56e926101581bf 100644 --- a/src/common/low_precision_transformations/include/low_precision/markup_precisions.hpp +++ b/src/common/low_precision_transformations/include/low_precision/markup_precisions.hpp @@ -36,6 +36,7 @@ class LP_TRANSFORMATIONS_API MarkupPrecisions; */ class ov::pass::low_precision::MarkupPrecisions : public ov::pass::ModelPass { public: + OPENVINO_MODEL_PASS_RTTI("low_precision::MarkupPrecisions"); class Restriction { public: class RestrictionByVersion { @@ -65,7 +66,6 @@ class ov::pass::low_precision::MarkupPrecisions : public ov::pass::ModelPass { std::unordered_map precisionsByVersion; }; - OPENVINO_RTTI("MarkupPrecisions", "0"); explicit MarkupPrecisions(const std::vector& restrictions = {}, const std::vector& defaultPrecisions = { ov::element::u8, ov::element::i8 }); bool run_on_model(const std::shared_ptr& m) override; diff --git a/src/common/low_precision_transformations/include/low_precision/markup_quantization_granularity.hpp b/src/common/low_precision_transformations/include/low_precision/markup_quantization_granularity.hpp index a61473cf263963..aa0ee4b4191de0 100644 --- a/src/common/low_precision_transformations/include/low_precision/markup_quantization_granularity.hpp +++ b/src/common/low_precision_transformations/include/low_precision/markup_quantization_granularity.hpp @@ -34,6 +34,8 @@ class LP_TRANSFORMATIONS_API MarkupQuantizationGranularity; */ class ov::pass::low_precision::MarkupQuantizationGranularity : public ov::pass::ModelPass { public: + OPENVINO_MODEL_PASS_RTTI("low_precision::MarkupQuantizationGranularity"); + class PerTensorQuantization { public: explicit PerTensorQuantization(const bool versionIsRequired) : versionIsRequired(versionIsRequired) {} @@ -45,7 +47,6 @@ class ov::pass::low_precision::MarkupQuantizationGranularity : public ov::pass:: std::unordered_map> portsByVersion; }; - OPENVINO_RTTI("MarkupPerTensorQuantization", "0"); explicit MarkupQuantizationGranularity(const std::vector& restrictions = {}); bool run_on_model(const std::shared_ptr& m) override; diff --git a/src/common/low_precision_transformations/include/low_precision/propagate_precisions.hpp b/src/common/low_precision_transformations/include/low_precision/propagate_precisions.hpp index c17fa2faded476..98f91bc5155d7b 100644 --- a/src/common/low_precision_transformations/include/low_precision/propagate_precisions.hpp +++ b/src/common/low_precision_transformations/include/low_precision/propagate_precisions.hpp @@ -31,7 +31,7 @@ class LP_TRANSFORMATIONS_API PropagatePrecisions; */ class ov::pass::low_precision::PropagatePrecisions : public ov::pass::ModelPass { public: - OPENVINO_RTTI("PropagatePrecisions", "0"); + OPENVINO_MODEL_PASS_RTTI("low_precision::PropagatePrecisions"); PropagatePrecisions(const AttributeParameters& params = AttributeParameters()); bool run_on_model(const std::shared_ptr& m) override; diff --git a/src/common/low_precision_transformations/include/low_precision/propagate_shared_value.hpp b/src/common/low_precision_transformations/include/low_precision/propagate_shared_value.hpp index 16a014cda6ec04..9254e2fc007dab 100644 --- a/src/common/low_precision_transformations/include/low_precision/propagate_shared_value.hpp +++ b/src/common/low_precision_transformations/include/low_precision/propagate_shared_value.hpp @@ -38,6 +38,7 @@ class LP_TRANSFORMATIONS_API PropagateSharedValue; template class ov::pass::low_precision::PropagateSharedValue : public ov::pass::ModelPass { public: + OPENVINO_MODEL_PASS_RTTI("low_precision::PropagateSharedValue"); bool run_on_model(const std::shared_ptr& f) override { OV_ITT_SCOPE(FIRST_INFERENCE, itt::domains::LPT_LT, "PropagateSharedValue"); diff --git a/src/common/low_precision_transformations/tests/simple_low_precision_transformer.hpp b/src/common/low_precision_transformations/tests/simple_low_precision_transformer.hpp index 7593361f8dd71a..36cf9747f6d76b 100644 --- a/src/common/low_precision_transformations/tests/simple_low_precision_transformer.hpp +++ b/src/common/low_precision_transformations/tests/simple_low_precision_transformer.hpp @@ -16,6 +16,7 @@ class SimpleLowPrecisionTransformer : public ov::pass::ModelPass{ public: + OPENVINO_MODEL_PASS_RTTI("SimpleLowPrecisionTransformer"); SimpleLowPrecisionTransformer( const std::vector& precisionRestrictions = {}, const std::vector& quantizationRestrictions = {}, diff --git a/src/common/offline_transformations/include/pruning.hpp b/src/common/offline_transformations/include/pruning.hpp index dd5374d7477ded..e573108a89eb86 100644 --- a/src/common/offline_transformations/include/pruning.hpp +++ b/src/common/offline_transformations/include/pruning.hpp @@ -67,7 +67,7 @@ class ov::pass::PropagateMasks : public ov::pass::GraphRewrite { */ class ov::pass::ShrinkWeights : public ov::pass::ModelPass { public: - OPENVINO_RTTI("ShrinkWeights", "0"); + OPENVINO_MODEL_PASS_RTTI("ShrinkWeights"); bool run_on_model(const std::shared_ptr&) override; }; @@ -77,6 +77,6 @@ class ov::pass::ShrinkWeights : public ov::pass::ModelPass { */ class ov::pass::Pruning : public ov::pass::ModelPass { public: - OPENVINO_RTTI("Pruning", "0"); + OPENVINO_MODEL_PASS_RTTI("Pruning"); bool run_on_model(const std::shared_ptr&) override; }; diff --git a/src/common/snippets/include/snippets/pass/align_element_types.hpp b/src/common/snippets/include/snippets/pass/align_element_types.hpp index 1d5a1fa9256c88..6261b2b87b2a65 100644 --- a/src/common/snippets/include/snippets/pass/align_element_types.hpp +++ b/src/common/snippets/include/snippets/pass/align_element_types.hpp @@ -19,7 +19,7 @@ namespace pass { */ class AlignElementTypes: public ov::pass::ModelPass { public: - OPENVINO_RTTI("AlignElementTypes"); + OPENVINO_MODEL_PASS_RTTI("snippets::pass::AlignElementTypes"); AlignElementTypes(std::vector input_precisions, std::vector output_precisions); bool run_on_model(const std::shared_ptr& m) override; diff --git a/src/common/snippets/include/snippets/pass/analyze_broadcastable_inputs.hpp b/src/common/snippets/include/snippets/pass/analyze_broadcastable_inputs.hpp index 4367567c9df1c7..9d23e462ddff94 100644 --- a/src/common/snippets/include/snippets/pass/analyze_broadcastable_inputs.hpp +++ b/src/common/snippets/include/snippets/pass/analyze_broadcastable_inputs.hpp @@ -21,7 +21,7 @@ namespace pass { */ class AnalyzeBroadcastableInputs : public ov::pass::ModelPass { public: - OPENVINO_RTTI("AnalyzeBroadcastableInputs"); + OPENVINO_MODEL_PASS_RTTI("snippets::pass::AnalyzeBroadcastableInputs"); // [Index of Parameter -> Index of broadcastable dimension from end] using BroadcastableInputsMap = std::map; AnalyzeBroadcastableInputs(BroadcastableInputsMap& map); diff --git a/src/common/snippets/include/snippets/pass/canonicalization.hpp b/src/common/snippets/include/snippets/pass/canonicalization.hpp index 5c7acaa781d2b8..645184a55609ba 100644 --- a/src/common/snippets/include/snippets/pass/canonicalization.hpp +++ b/src/common/snippets/include/snippets/pass/canonicalization.hpp @@ -22,7 +22,7 @@ namespace pass { */ class Canonicalization: public ov::pass::ModelPass { public: - OPENVINO_RTTI("Canonicalization"); + OPENVINO_MODEL_PASS_RTTI("snippets::pass::Canonicalization"); using BlockedShapeVector = op::Subgraph::BlockedShapeVector; using Layout = std::vector; explicit Canonicalization(const BlockedShapeVector& blocked_input_shapes); diff --git a/src/common/snippets/include/snippets/pass/fq_decomposition.hpp b/src/common/snippets/include/snippets/pass/fq_decomposition.hpp index 1e4af6c04e22fa..9f2b0ab7cc4bf9 100644 --- a/src/common/snippets/include/snippets/pass/fq_decomposition.hpp +++ b/src/common/snippets/include/snippets/pass/fq_decomposition.hpp @@ -80,6 +80,8 @@ class FakeQuantizeDecomposition : public ov::pass::MatcherPass { */ class CommonFakeQuantizeDecomposition: public ov::pass::ModelPass { public: + OPENVINO_MODEL_PASS_RTTI("snippets::pass::CommonFakeQuantizeDecomposition"); + bool run_on_model(const std::shared_ptr& m) override; static bool is_supported_fq(const std::shared_ptr& fq); diff --git a/src/common/snippets/include/snippets/pass/hash.hpp b/src/common/snippets/include/snippets/pass/hash.hpp index 66126cd21bbe6d..fc3bd9a64d0bdc 100644 --- a/src/common/snippets/include/snippets/pass/hash.hpp +++ b/src/common/snippets/include/snippets/pass/hash.hpp @@ -18,7 +18,7 @@ namespace pass { */ class Hash : public ov::pass::ModelPass { public: - OPENVINO_RTTI("HashPass", "0"); + OPENVINO_MODEL_PASS_RTTI("snippets::pass::Hash"); bool run_on_model(const std::shared_ptr& f) override; diff --git a/src/common/snippets/include/snippets/pass/propagate_precision.hpp b/src/common/snippets/include/snippets/pass/propagate_precision.hpp index 6f805cb1b68808..66d0b28430dd5f 100644 --- a/src/common/snippets/include/snippets/pass/propagate_precision.hpp +++ b/src/common/snippets/include/snippets/pass/propagate_precision.hpp @@ -19,7 +19,7 @@ namespace pass { */ class PropagatePrecision: public ov::pass::ModelPass { public: - OPENVINO_RTTI("PropagatePrecision", "0"); + OPENVINO_MODEL_PASS_RTTI("snippets::pass::PropagatePrecision"); PropagatePrecision(const std::shared_ptr& target_machine); bool run_on_model(const std::shared_ptr& m) override; diff --git a/src/common/snippets/include/snippets/pass/tokenization.hpp b/src/common/snippets/include/snippets/pass/tokenization.hpp index 24efcceec71a24..fc7ed8aace6d64 100644 --- a/src/common/snippets/include/snippets/pass/tokenization.hpp +++ b/src/common/snippets/include/snippets/pass/tokenization.hpp @@ -37,7 +37,7 @@ int64_t GetTopologicalOrder(const std::shared_ptr&); */ class EnumerateNodes : public ov::pass::ModelPass { public: - OPENVINO_RTTI("EnumerateNodes", "0"); + OPENVINO_MODEL_PASS_RTTI("snippets::pass::EnumerateNodes"); EnumerateNodes() : ModelPass() {} bool run_on_model(const std::shared_ptr&) override; }; @@ -59,6 +59,8 @@ class EnumerateNodes : public ov::pass::ModelPass { */ class SnippetsTokenization : public ov::pass::ModelPass { public: + OPENVINO_MODEL_PASS_RTTI("snippets::pass::SnippetsTokenization"); + /** * @interface Config * @brief Allow to adjust tokenization passes @@ -123,7 +125,6 @@ class SnippetsTokenization : public ov::pass::ModelPass { std::set m_mha_supported_transpose_ranks = { 3, 4 }; }; - OPENVINO_RTTI("SnippetsTokenization", "0"); SnippetsTokenization(const Config& config) : m_config(config) {} bool run_on_model(const std::shared_ptr& m) override; diff --git a/src/common/snippets/include/snippets/pass/validate.hpp b/src/common/snippets/include/snippets/pass/validate.hpp index 1fedf8a2ce08d5..21d748eaa3afbb 100644 --- a/src/common/snippets/include/snippets/pass/validate.hpp +++ b/src/common/snippets/include/snippets/pass/validate.hpp @@ -17,7 +17,7 @@ namespace pass { */ class Validate: public ov::pass::ModelPass { public: - OPENVINO_RTTI("Validate", "0"); + OPENVINO_MODEL_PASS_RTTI("snippets::pass::Validate"); Validate(const std::shared_ptr& pass_config) : m_pass_config(pass_config) {} bool run_on_model(const std::shared_ptr& m) override; diff --git a/src/common/transformations/include/transformations/common_optimizations/change_placeholder_types.hpp b/src/common/transformations/include/transformations/common_optimizations/change_placeholder_types.hpp index d2ff059d5974ef..023937b79df48a 100644 --- a/src/common/transformations/include/transformations/common_optimizations/change_placeholder_types.hpp +++ b/src/common/transformations/include/transformations/common_optimizations/change_placeholder_types.hpp @@ -20,7 +20,7 @@ class TRANSFORMATIONS_API ChangePlaceholderTypes; */ class ChangePlaceholderTypes : public ModelPass { public: - OPENVINO_RTTI("ChangePlaceholderTypes", "0"); + OPENVINO_MODEL_PASS_RTTI("ChangePlaceholderTypes"); explicit ChangePlaceholderTypes(const std::vector& params_with_custom_types) : m_params_with_custom_types(params_with_custom_types) {} bool run_on_model(const std::shared_ptr& model) override; diff --git a/src/common/transformations/include/transformations/common_optimizations/common_optimizations.hpp b/src/common/transformations/include/transformations/common_optimizations/common_optimizations.hpp index 7540275ce74d0f..35017f5984f9a1 100644 --- a/src/common/transformations/include/transformations/common_optimizations/common_optimizations.hpp +++ b/src/common/transformations/include/transformations/common_optimizations/common_optimizations.hpp @@ -20,6 +20,6 @@ class TRANSFORMATIONS_API CommonOptimizations; class ov::pass::CommonOptimizations : public ov::pass::ModelPass { public: - OPENVINO_RTTI("CommonOptimizations", "0"); + OPENVINO_MODEL_PASS_RTTI("CommonOptimizations"); bool run_on_model(const std::shared_ptr& f) override; }; diff --git a/src/common/transformations/include/transformations/common_optimizations/dimension_tracking.hpp b/src/common/transformations/include/transformations/common_optimizations/dimension_tracking.hpp index d1ec2069b3f621..ca176057972eaa 100644 --- a/src/common/transformations/include/transformations/common_optimizations/dimension_tracking.hpp +++ b/src/common/transformations/include/transformations/common_optimizations/dimension_tracking.hpp @@ -22,7 +22,7 @@ class TRANSFORMATIONS_API FindBatch; class ov::pass::FindBatch : public ov::pass::ModelPass { public: - OPENVINO_RTTI("FindBatch"); + OPENVINO_MODEL_PASS_RTTI("FindBatch"); FindBatch(bool detach_detection_output = false, bool track = true) : track(track), detach_do(detach_detection_output) {} diff --git a/src/common/transformations/include/transformations/common_optimizations/fused_names_cleanup.hpp b/src/common/transformations/include/transformations/common_optimizations/fused_names_cleanup.hpp index 8058a01811d9bc..fd7ce8defba920 100644 --- a/src/common/transformations/include/transformations/common_optimizations/fused_names_cleanup.hpp +++ b/src/common/transformations/include/transformations/common_optimizations/fused_names_cleanup.hpp @@ -21,6 +21,6 @@ class TRANSFORMATIONS_API FusedNamesCleanup; */ class ov::pass::FusedNamesCleanup : public ov::pass::ModelPass { public: - OPENVINO_RTTI("FusedNamesCleanup", "0"); + OPENVINO_MODEL_PASS_RTTI("FusedNamesCleanup"); bool run_on_model(const std::shared_ptr& m) override; }; diff --git a/src/common/transformations/include/transformations/common_optimizations/mark_precision_sensitive_shapeof_subgraphs.hpp b/src/common/transformations/include/transformations/common_optimizations/mark_precision_sensitive_shapeof_subgraphs.hpp index 05e73456d46ee0..3e20e7535f8fed 100644 --- a/src/common/transformations/include/transformations/common_optimizations/mark_precision_sensitive_shapeof_subgraphs.hpp +++ b/src/common/transformations/include/transformations/common_optimizations/mark_precision_sensitive_shapeof_subgraphs.hpp @@ -26,7 +26,7 @@ class TRANSFORMATIONS_API MarkShapeOfSubgraphs; */ class ov::pass::MarkPrecisionSensitiveShapeOfSubgraphs : public ModelPass { public: - OPENVINO_RTTI("MarkPrecisionSensitiveShapeOfSubgraphs", "0"); + OPENVINO_MODEL_PASS_RTTI("MarkPrecisionSensitiveShapeOfSubgraphs"); MarkPrecisionSensitiveShapeOfSubgraphs(); bool run_on_model(const std::shared_ptr& f) override; diff --git a/src/common/transformations/include/transformations/common_optimizations/moc_legacy_transformations.hpp b/src/common/transformations/include/transformations/common_optimizations/moc_legacy_transformations.hpp index 833ce83e6cf065..0f40a4d81a1bde 100644 --- a/src/common/transformations/include/transformations/common_optimizations/moc_legacy_transformations.hpp +++ b/src/common/transformations/include/transformations/common_optimizations/moc_legacy_transformations.hpp @@ -32,7 +32,7 @@ namespace pass { class MOCLegacyTransformations : public ModelPass { public: - OPENVINO_RTTI("MOCLegacyTransformations", "0"); + OPENVINO_MODEL_PASS_RTTI("MOCLegacyTransformations"); explicit MOCLegacyTransformations(const std::vector& params_with_custom_types) : m_params_with_custom_types(params_with_custom_types) {} bool run_on_model(const std::shared_ptr& f) override; diff --git a/src/common/transformations/include/transformations/common_optimizations/moc_transformations.hpp b/src/common/transformations/include/transformations/common_optimizations/moc_transformations.hpp index 49893dfb220de6..b65c9b84456ff8 100644 --- a/src/common/transformations/include/transformations/common_optimizations/moc_transformations.hpp +++ b/src/common/transformations/include/transformations/common_optimizations/moc_transformations.hpp @@ -24,11 +24,9 @@ class TRANSFORMATIONS_API MOCTransformations; */ class ov::pass::MOCTransformations : public ov::pass::ModelPass { - bool m_use_shapes; - bool m_low_precision_enabled; - public: - OPENVINO_RTTI("MOCTransformations", "0"); + OPENVINO_MODEL_PASS_RTTI("MOCTransformations"); + /** * use_shapes = True enables transformations which are depends on shapes and also it * enables ConstantFolding for all ShapeOf operations. @@ -41,4 +39,8 @@ class ov::pass::MOCTransformations : public ov::pass::ModelPass { m_low_precision_enabled(low_precision_enabled) {} bool run_on_model(const std::shared_ptr& m) override; + +private: + bool m_use_shapes; + bool m_low_precision_enabled; }; diff --git a/src/common/transformations/include/transformations/common_optimizations/optimize_strided_slice.hpp b/src/common/transformations/include/transformations/common_optimizations/optimize_strided_slice.hpp index 454378a0e9bbd1..cb642795254791 100644 --- a/src/common/transformations/include/transformations/common_optimizations/optimize_strided_slice.hpp +++ b/src/common/transformations/include/transformations/common_optimizations/optimize_strided_slice.hpp @@ -29,7 +29,7 @@ class TRANSFORMATIONS_API SliceSequenceToSingleSlice; */ class ov::pass::UselessSliceEraser : public ov::pass::ModelPass { public: - OPENVINO_RTTI("UselessSliceEraser", "0"); + OPENVINO_MODEL_PASS_RTTI("UselessSliceEraser"); bool run_on_model(const std::shared_ptr& m) override; }; @@ -41,7 +41,7 @@ class ov::pass::UselessSliceEraser : public ov::pass::ModelPass { */ class ov::pass::GroupedStridedSliceOptimizer : public ov::pass::ModelPass { public: - OPENVINO_RTTI("GroupedStridedSliceOptimizer", "0"); + OPENVINO_MODEL_PASS_RTTI("GroupedStridedSliceOptimizer"); bool run_on_model(const std::shared_ptr& m) override; }; @@ -53,7 +53,7 @@ class ov::pass::GroupedStridedSliceOptimizer : public ov::pass::ModelPass { */ class ov::pass::GroupedSliceToVSplitOptimization : public ov::pass::ModelPass { public: - OPENVINO_RTTI("GroupedSliceToVSplitOptimization", "0"); + OPENVINO_MODEL_PASS_RTTI("GroupedSliceToVSplitOptimization"); bool run_on_model(const std::shared_ptr& m) override; }; @@ -82,9 +82,9 @@ class ov::pass::SliceSequenceToSingleSlice : public ov::pass::MatcherPass { */ class ov::pass::StridedSliceOptimization : public ov::pass::ModelPass { public: + OPENVINO_MODEL_PASS_RTTI("StridedSliceOptimization"); StridedSliceOptimization(bool use_shapes = true); - OPENVINO_RTTI("StridedSliceOptimization", "0"); bool run_on_model(const std::shared_ptr& m) override; private: diff --git a/src/common/transformations/include/transformations/common_optimizations/push_constant_to_subgraph.hpp b/src/common/transformations/include/transformations/common_optimizations/push_constant_to_subgraph.hpp index e571b9a41869f2..085da725a64233 100644 --- a/src/common/transformations/include/transformations/common_optimizations/push_constant_to_subgraph.hpp +++ b/src/common/transformations/include/transformations/common_optimizations/push_constant_to_subgraph.hpp @@ -17,7 +17,7 @@ namespace pass { */ class TRANSFORMATIONS_API PushConstantToSubgraph : public ov::pass::ModelPass { public: - OPENVINO_RTTI("PushConstantToSubgraph", "0"); + OPENVINO_MODEL_PASS_RTTI("PushConstantToSubgraph"); bool run_on_model(const std::shared_ptr& model) override; }; diff --git a/src/common/transformations/include/transformations/common_optimizations/remove_multi_subgraph_op_dangling_params.hpp b/src/common/transformations/include/transformations/common_optimizations/remove_multi_subgraph_op_dangling_params.hpp index 359d68f7c980c2..b5b35e44364e46 100644 --- a/src/common/transformations/include/transformations/common_optimizations/remove_multi_subgraph_op_dangling_params.hpp +++ b/src/common/transformations/include/transformations/common_optimizations/remove_multi_subgraph_op_dangling_params.hpp @@ -23,6 +23,6 @@ class TRANSFORMATIONS_API RemoveMultiSubGraphOpDanglingParamsResults; class ov::pass::RemoveMultiSubGraphOpDanglingParamsResults : public ov::pass::ModelPass { public: - OPENVINO_RTTI("RemoveMultiSubGraphOpDanglingParamsResults", "0"); + OPENVINO_MODEL_PASS_RTTI("RemoveMultiSubGraphOpDanglingParamsResults"); bool run_on_model(const std::shared_ptr& m) override; }; diff --git a/src/common/transformations/include/transformations/common_optimizations/reverse_shape_and_type_infer.hpp b/src/common/transformations/include/transformations/common_optimizations/reverse_shape_and_type_infer.hpp index cfc5d789d9c07e..f0f9fe269e6206 100644 --- a/src/common/transformations/include/transformations/common_optimizations/reverse_shape_and_type_infer.hpp +++ b/src/common/transformations/include/transformations/common_optimizations/reverse_shape_and_type_infer.hpp @@ -20,7 +20,7 @@ class TRANSFORMATIONS_API ReverseShapeAndTypeInfer; */ class ov::pass::ReverseShapeAndTypeInfer : public ov::pass::ModelPass { public: - OPENVINO_RTTI("ReverseShapeAndTypeInfer", "0"); + OPENVINO_MODEL_PASS_RTTI("ReverseShapeAndTypeInfer"); bool run_on_model(const std::shared_ptr& f) override; private: diff --git a/src/common/transformations/include/transformations/common_optimizations/ric_fusion.hpp b/src/common/transformations/include/transformations/common_optimizations/ric_fusion.hpp index c91c27a464cada..1c56d61bb615c9 100644 --- a/src/common/transformations/include/transformations/common_optimizations/ric_fusion.hpp +++ b/src/common/transformations/include/transformations/common_optimizations/ric_fusion.hpp @@ -23,6 +23,6 @@ class TRANSFORMATIONS_API ReverseInputChannelsFusion; class ov::pass::ReverseInputChannelsFusion : public ov::pass::ModelPass { public: - OPENVINO_RTTI("ReverseInputChannelsFusion", "0"); + OPENVINO_MODEL_PASS_RTTI("ReverseInputChannelsFusion"); bool run_on_model(const std::shared_ptr&) override; }; diff --git a/src/common/transformations/include/transformations/common_optimizations/shared_ops_optimization.hpp b/src/common/transformations/include/transformations/common_optimizations/shared_ops_optimization.hpp index 8e2a87502ebcc9..6ff8f611564db2 100644 --- a/src/common/transformations/include/transformations/common_optimizations/shared_ops_optimization.hpp +++ b/src/common/transformations/include/transformations/common_optimizations/shared_ops_optimization.hpp @@ -22,6 +22,6 @@ class TRANSFORMATIONS_API SharedOpOptimization; */ class ov::pass::SharedOpOptimization : public ov::pass::ModelPass { public: - OPENVINO_RTTI("SharedOpOptimization", "0"); + OPENVINO_MODEL_PASS_RTTI("SharedOpOptimization"); bool run_on_model(const std::shared_ptr& m) override; }; diff --git a/src/common/transformations/include/transformations/common_optimizations/simplify_shape_of_sub_graph.hpp b/src/common/transformations/include/transformations/common_optimizations/simplify_shape_of_sub_graph.hpp index 509047578bd489..79e0ffd789bf7c 100644 --- a/src/common/transformations/include/transformations/common_optimizations/simplify_shape_of_sub_graph.hpp +++ b/src/common/transformations/include/transformations/common_optimizations/simplify_shape_of_sub_graph.hpp @@ -41,7 +41,7 @@ class ov::pass::GroupedGatherElimination : public ov::pass::MatcherPass { */ class ov::pass::SimplifyShapeOfSubGraph : public ov::pass::ModelPass { public: - OPENVINO_RTTI("SimplifyShapeOfSubGraph", "0"); + OPENVINO_MODEL_PASS_RTTI("SimplifyShapeOfSubGraph"); explicit SimplifyShapeOfSubGraph(bool use_shapes = true) : m_use_shapes(use_shapes){}; bool run_on_model(const std::shared_ptr& m) override; diff --git a/src/common/transformations/include/transformations/control_flow/unroll_if.hpp b/src/common/transformations/include/transformations/control_flow/unroll_if.hpp index e59b60106e2536..5dc95ee3eeb85a 100644 --- a/src/common/transformations/include/transformations/control_flow/unroll_if.hpp +++ b/src/common/transformations/include/transformations/control_flow/unroll_if.hpp @@ -26,6 +26,6 @@ class TRANSFORMATIONS_API UnrollIf; class ov::pass::UnrollIf : public ov::pass::ModelPass { public: - OPENVINO_RTTI("UnrollIf", "0"); + OPENVINO_MODEL_PASS_RTTI("UnrollIf"); bool run_on_model(const std::shared_ptr& m) override; }; diff --git a/src/common/transformations/include/transformations/control_flow/unroll_tensor_iterator.hpp b/src/common/transformations/include/transformations/control_flow/unroll_tensor_iterator.hpp index 282aecab5c7f05..ce8b6419e6734e 100644 --- a/src/common/transformations/include/transformations/control_flow/unroll_tensor_iterator.hpp +++ b/src/common/transformations/include/transformations/control_flow/unroll_tensor_iterator.hpp @@ -28,6 +28,6 @@ class TRANSFORMATIONS_API UnrollTensorIterator; class ov::pass::UnrollTensorIterator : public ov::pass::ModelPass { public: - OPENVINO_RTTI("UnrollTensorIterator", "0"); + OPENVINO_MODEL_PASS_RTTI("UnrollTensorIterator"); bool run_on_model(const std::shared_ptr& m) override; }; diff --git a/src/common/transformations/include/transformations/convert_precision.hpp b/src/common/transformations/include/transformations/convert_precision.hpp index 30f773da9e3be4..b411629ccbce77 100644 --- a/src/common/transformations/include/transformations/convert_precision.hpp +++ b/src/common/transformations/include/transformations/convert_precision.hpp @@ -79,7 +79,7 @@ using type_to_fuse_map = class ov::pass::ConvertPrecision : public ov::pass::ModelPass { public: - OPENVINO_RTTI("ConvertPrecision", "0"); + OPENVINO_MODEL_PASS_RTTI("ConvertPrecision"); ConvertPrecision(ov::element::Type_t from, ov::element::Type_t to, type_to_fuse_map additional_type_to_fuse_map = {}, diff --git a/src/common/transformations/include/transformations/fp16_compression/align_mixed_fp32_fp16_types.hpp b/src/common/transformations/include/transformations/fp16_compression/align_mixed_fp32_fp16_types.hpp index 4fd93d7742ab67..e890b89794d862 100644 --- a/src/common/transformations/include/transformations/fp16_compression/align_mixed_fp32_fp16_types.hpp +++ b/src/common/transformations/include/transformations/fp16_compression/align_mixed_fp32_fp16_types.hpp @@ -21,6 +21,6 @@ class TRANSFORMATIONS_API AlignMixedFP32FP16Types; */ class ov::pass::AlignMixedFP32FP16Types : public ov::pass::ModelPass { public: - OPENVINO_RTTI("AlignMixedFP32FP16Types", "0"); + OPENVINO_MODEL_PASS_RTTI("AlignMixedFP32FP16Types"); bool run_on_model(const std::shared_ptr& m) override; }; diff --git a/src/common/transformations/include/transformations/fp16_compression/convert_compression_only_to_legacy.hpp b/src/common/transformations/include/transformations/fp16_compression/convert_compression_only_to_legacy.hpp index fbac44f637a2a2..c7c8e408da2209 100644 --- a/src/common/transformations/include/transformations/fp16_compression/convert_compression_only_to_legacy.hpp +++ b/src/common/transformations/include/transformations/fp16_compression/convert_compression_only_to_legacy.hpp @@ -21,6 +21,6 @@ class TRANSFORMATIONS_API ConvertCompressedOnlyToLegacy; */ class ov::pass::ConvertCompressedOnlyToLegacy : public ov::pass::ModelPass { public: - OPENVINO_RTTI("ConvertCompressedOnlyToLegacy", "0"); + OPENVINO_MODEL_PASS_RTTI("ConvertCompressedOnlyToLegacy"); bool run_on_model(const std::shared_ptr& f) override; }; diff --git a/src/common/transformations/include/transformations/fp16_compression/mark_subgraphs_to_keep_in_mixed_precision.hpp b/src/common/transformations/include/transformations/fp16_compression/mark_subgraphs_to_keep_in_mixed_precision.hpp index 0ffce989f0d83c..d7f4e2991a3d07 100644 --- a/src/common/transformations/include/transformations/fp16_compression/mark_subgraphs_to_keep_in_mixed_precision.hpp +++ b/src/common/transformations/include/transformations/fp16_compression/mark_subgraphs_to_keep_in_mixed_precision.hpp @@ -25,6 +25,6 @@ constexpr auto float16_min_normalized = float16::from_bits(0x0400); */ class ov::pass::MarkSugraphsToKeepInMixedPrecision : public ov::pass::ModelPass { public: - OPENVINO_RTTI("MarkSugraphsToKeepInMixedPrecision", "0"); + OPENVINO_MODEL_PASS_RTTI("MarkSugraphsToKeepInMixedPrecision"); bool run_on_model(const std::shared_ptr& m) override; }; diff --git a/src/common/transformations/include/transformations/hash.hpp b/src/common/transformations/include/transformations/hash.hpp index 73668c7e53548e..3d6cf8f46076dc 100644 --- a/src/common/transformations/include/transformations/hash.hpp +++ b/src/common/transformations/include/transformations/hash.hpp @@ -18,7 +18,7 @@ namespace pass { */ class TRANSFORMATIONS_API Hash : public ov::pass::ModelPass { public: - OPENVINO_RTTI("HashPass"); + OPENVINO_MODEL_PASS_RTTI("HashPass"); bool run_on_model(const std::shared_ptr& f) override; diff --git a/src/common/transformations/include/transformations/init_node_info.hpp b/src/common/transformations/include/transformations/init_node_info.hpp index e458bcfdcd4bd4..9474edc00cf9e0 100644 --- a/src/common/transformations/include/transformations/init_node_info.hpp +++ b/src/common/transformations/include/transformations/init_node_info.hpp @@ -35,6 +35,6 @@ class TRANSFORMATIONS_API InitNodeInfo; */ class ov::pass::InitNodeInfo : public ov::pass::ModelPass { public: - OPENVINO_RTTI("InitNodeInfo", "0"); + OPENVINO_MODEL_PASS_RTTI("InitNodeInfo"); bool run_on_model(const std::shared_ptr& m) override; }; diff --git a/src/common/transformations/include/transformations/opset_conversions/convert_opset2_to_opset1.hpp b/src/common/transformations/include/transformations/opset_conversions/convert_opset2_to_opset1.hpp index 8b523bc663912d..e3d511d396c510 100644 --- a/src/common/transformations/include/transformations/opset_conversions/convert_opset2_to_opset1.hpp +++ b/src/common/transformations/include/transformations/opset_conversions/convert_opset2_to_opset1.hpp @@ -19,6 +19,6 @@ class TRANSFORMATIONS_API ConvertOpSet2ToOpSet1; class ov::pass::ConvertOpSet2ToOpSet1 : public ov::pass::ModelPass { public: - OPENVINO_RTTI("ConvertOpSet2ToOpSet1", "0"); + OPENVINO_MODEL_PASS_RTTI("ConvertOpSet2ToOpSet1"); bool run_on_model(const std::shared_ptr& m) override; }; diff --git a/src/common/transformations/include/transformations/opset_conversions/convert_opset3_to_opset2.hpp b/src/common/transformations/include/transformations/opset_conversions/convert_opset3_to_opset2.hpp index 8a44b0d24ad6e4..f5e4faeeca93f8 100644 --- a/src/common/transformations/include/transformations/opset_conversions/convert_opset3_to_opset2.hpp +++ b/src/common/transformations/include/transformations/opset_conversions/convert_opset3_to_opset2.hpp @@ -19,6 +19,6 @@ class TRANSFORMATIONS_API ConvertOpSet3ToOpSet2; class ov::pass::ConvertOpSet3ToOpSet2 : public ov::pass::ModelPass { public: - OPENVINO_RTTI("ConvertOpSet3ToOpSet2", "0"); + OPENVINO_MODEL_PASS_RTTI("ConvertOpSet3ToOpSet2"); bool run_on_model(const std::shared_ptr& m) override; }; diff --git a/src/common/transformations/include/transformations/resolve_names_collisions.hpp b/src/common/transformations/include/transformations/resolve_names_collisions.hpp index f1d1f18a505441..8af93bd055043f 100644 --- a/src/common/transformations/include/transformations/resolve_names_collisions.hpp +++ b/src/common/transformations/include/transformations/resolve_names_collisions.hpp @@ -24,7 +24,7 @@ namespace pass { */ class TRANSFORMATIONS_API ResolveNameCollisions : public ModelPass { public: - OPENVINO_RTTI("ResolveNameCollisions", "0"); + OPENVINO_MODEL_PASS_RTTI("ResolveNameCollisions"); ResolveNameCollisions() = default; explicit ResolveNameCollisions(bool resolve_all_names) : m_resolve_all_names(resolve_all_names) {} bool run_on_model(const std::shared_ptr& model) override; diff --git a/src/common/transformations/include/transformations/smart_reshape/lstm_states_broadcast.hpp b/src/common/transformations/include/transformations/smart_reshape/lstm_states_broadcast.hpp index 55f80ace7812e3..6b93dd465c3ecd 100644 --- a/src/common/transformations/include/transformations/smart_reshape/lstm_states_broadcast.hpp +++ b/src/common/transformations/include/transformations/smart_reshape/lstm_states_broadcast.hpp @@ -26,6 +26,6 @@ class TRANSFORMATIONS_API LSTMStatesBroadcast; class ov::pass::LSTMStatesBroadcast : public ov::pass::ModelPass { public: - OPENVINO_RTTI("LSTMStatesBroadcast", "0"); + OPENVINO_MODEL_PASS_RTTI("LSTMStatesBroadcast"); bool run_on_model(const std::shared_ptr& m) override; }; diff --git a/src/common/transformations/include/transformations/smart_reshape/smart_reshape.hpp b/src/common/transformations/include/transformations/smart_reshape/smart_reshape.hpp index 55bdf523762d91..970d64447c798a 100644 --- a/src/common/transformations/include/transformations/smart_reshape/smart_reshape.hpp +++ b/src/common/transformations/include/transformations/smart_reshape/smart_reshape.hpp @@ -20,6 +20,6 @@ class TRANSFORMATIONS_API SmartReshape; class ov::pass::SmartReshape : public ov::pass::ModelPass { public: - OPENVINO_RTTI("SmartReshape", "0"); + OPENVINO_MODEL_PASS_RTTI("SmartReshape"); bool run_on_model(const std::shared_ptr& m) override; }; diff --git a/src/common/transformations/include/transformations/symbolic_transformations/symbol_optimization.hpp b/src/common/transformations/include/transformations/symbolic_transformations/symbol_optimization.hpp index 179bc7d6cfcf52..323a1218bfdf4a 100644 --- a/src/common/transformations/include/transformations/symbolic_transformations/symbol_optimization.hpp +++ b/src/common/transformations/include/transformations/symbolic_transformations/symbol_optimization.hpp @@ -21,7 +21,7 @@ class TRANSFORMATIONS_API OptimizeSymbolsUsedAsValues; */ class ov::pass::ApplySymbolEquivalence : public ov::pass::ModelPass { public: - OPENVINO_RTTI("ApplySymbolEquivalence", "0"); + OPENVINO_MODEL_PASS_RTTI("ApplySymbolEquivalence"); bool run_on_model(const std::shared_ptr& m) override; }; @@ -32,6 +32,6 @@ class ov::pass::ApplySymbolEquivalence : public ov::pass::ModelPass { */ class ov::pass::OptimizeSymbolsUsedAsValues : public ov::pass::ModelPass { public: - OPENVINO_RTTI("OptimizeSymbolsUsedAsValues", "0"); + OPENVINO_MODEL_PASS_RTTI("OptimizeSymbolsUsedAsValues"); bool run_on_model(const std::shared_ptr& m) override; }; diff --git a/src/common/transformations/include/transformations/symbolic_transformations/symbolic_optimizations.hpp b/src/common/transformations/include/transformations/symbolic_transformations/symbolic_optimizations.hpp index 17a5d8503cbcb9..c6a99c90122544 100644 --- a/src/common/transformations/include/transformations/symbolic_transformations/symbolic_optimizations.hpp +++ b/src/common/transformations/include/transformations/symbolic_transformations/symbolic_optimizations.hpp @@ -24,7 +24,7 @@ class TRANSFORMATIONS_API LabelResolvingThroughSelect; */ class ov::pass::SymbolicOptimizations : public ov::pass::ModelPass { public: - OPENVINO_RTTI("SymbolicOptimizations", "0"); + OPENVINO_MODEL_PASS_RTTI("SymbolicOptimizations"); explicit SymbolicOptimizations(bool full_run = true); bool run_on_model(const std::shared_ptr& m) override; std::shared_ptr get_manager() { @@ -42,7 +42,7 @@ class ov::pass::SymbolicOptimizations : public ov::pass::ModelPass { */ class ov::pass::SymbolicPropagation : public ov::pass::ModelPass { public: - OPENVINO_RTTI("SymbolicPropagation"); + OPENVINO_MODEL_PASS_RTTI("SymbolicPropagation"); bool run_on_model(const std::shared_ptr& m) override; }; @@ -60,4 +60,4 @@ class ov::pass::LabelResolvingThroughSelect : public ov::pass::MatcherPass { public: OPENVINO_RTTI("LabelResolvingThroughSelect", "0"); LabelResolvingThroughSelect(); -}; \ No newline at end of file +}; diff --git a/src/common/transformations/include/transformations/transpose_sinking/ts_general.hpp b/src/common/transformations/include/transformations/transpose_sinking/ts_general.hpp index c794608798a4a4..09d4d5819322a9 100644 --- a/src/common/transformations/include/transformations/transpose_sinking/ts_general.hpp +++ b/src/common/transformations/include/transformations/transpose_sinking/ts_general.hpp @@ -52,6 +52,6 @@ class ov::pass::transpose_sinking::TSGeneralBackward : public ov::pass::GraphRew */ class ov::pass::transpose_sinking::TSGeneral : public ov::pass::ModelPass { public: - OPENVINO_RTTI("TSGeneral", "0"); + OPENVINO_MODEL_PASS_RTTI("TSGeneral"); bool run_on_model(const std::shared_ptr& m) override; }; diff --git a/src/common/transformations/include/transformations/utils/print_model.hpp b/src/common/transformations/include/transformations/utils/print_model.hpp index 29340d60727c82..0829cd7e320e88 100644 --- a/src/common/transformations/include/transformations/utils/print_model.hpp +++ b/src/common/transformations/include/transformations/utils/print_model.hpp @@ -390,7 +390,7 @@ void dump_cpp_style(std::ostream& os, const std::shared_ptr& model) { class OPENVINO_API PrintModel : public ov::pass::ModelPass { public: - OPENVINO_RTTI("ov::pass::PrintModel"); + OPENVINO_MODEL_PASS_RTTI("ov::pass::PrintModel"); PrintModel(std::string file_name) { static int dump_index = 0; diff --git a/src/common/transformations/src/transformations/common_optimizations/ric_fusion.cpp b/src/common/transformations/src/transformations/common_optimizations/ric_fusion.cpp index 53f26e00136ee9..4e9715883ec9f8 100644 --- a/src/common/transformations/src/transformations/common_optimizations/ric_fusion.cpp +++ b/src/common/transformations/src/transformations/common_optimizations/ric_fusion.cpp @@ -804,7 +804,7 @@ class ConvertPassThrough : public ov::pass::MatcherPass { class Constant : public ov::pass::ModelPass { public: - OPENVINO_RTTI("Constant", "0"); + OPENVINO_MODEL_PASS_RTTI("Constant"); Constant() = default; bool run_on_model(const std::shared_ptr& model) override { RUN_ON_FUNCTION_SCOPE(Constant); diff --git a/src/core/include/openvino/pass/constant_folding.hpp b/src/core/include/openvino/pass/constant_folding.hpp index 134f02c590974f..6b2e763e49cb1a 100644 --- a/src/core/include/openvino/pass/constant_folding.hpp +++ b/src/core/include/openvino/pass/constant_folding.hpp @@ -18,7 +18,7 @@ namespace pass { */ class OPENVINO_API ConstantFolding : public ModelPass { public: - OPENVINO_RTTI("ConstantFolding"); + OPENVINO_MODEL_PASS_RTTI("ConstantFolding"); bool run_on_model(const std::shared_ptr& model) override; protected: diff --git a/src/core/include/openvino/pass/convert_fp32_to_fp16.hpp b/src/core/include/openvino/pass/convert_fp32_to_fp16.hpp index ae9bb25efb4a87..ebae49b7a1fa05 100644 --- a/src/core/include/openvino/pass/convert_fp32_to_fp16.hpp +++ b/src/core/include/openvino/pass/convert_fp32_to_fp16.hpp @@ -14,7 +14,7 @@ namespace pass { */ class OPENVINO_API ConvertFP32ToFP16 : public ModelPass { public: - OPENVINO_RTTI("ConvertFP32ToFP16"); + OPENVINO_MODEL_PASS_RTTI("ConvertFP32ToFP16"); bool run_on_model(const std::shared_ptr&) override; }; } // namespace pass diff --git a/src/core/include/openvino/pass/graph_rewrite.hpp b/src/core/include/openvino/pass/graph_rewrite.hpp index 3fd801235c31a2..ec8e1339912513 100644 --- a/src/core/include/openvino/pass/graph_rewrite.hpp +++ b/src/core/include/openvino/pass/graph_rewrite.hpp @@ -34,7 +34,7 @@ namespace pass { /// \ingroup ov_pass_cpp_api class OPENVINO_API GraphRewrite : public ModelPass { public: - OPENVINO_RTTI("ov::pass::GraphRewrite"); + OPENVINO_MODEL_PASS_RTTI("ov::pass::GraphRewrite"); GraphRewrite() = default; diff --git a/src/core/include/openvino/pass/low_latency.hpp b/src/core/include/openvino/pass/low_latency.hpp index b3a8d38f755d42..d7bead4972c39b 100644 --- a/src/core/include/openvino/pass/low_latency.hpp +++ b/src/core/include/openvino/pass/low_latency.hpp @@ -36,7 +36,7 @@ namespace pass { */ class OPENVINO_API LowLatency2 : public ModelPass { public: - OPENVINO_RTTI("LowLatency2"); + OPENVINO_MODEL_PASS_RTTI("LowLatency2"); explicit LowLatency2(bool use_const_initializer = true) : m_use_const_initializer(use_const_initializer) {} diff --git a/src/core/include/openvino/pass/make_stateful.hpp b/src/core/include/openvino/pass/make_stateful.hpp index a4132589fe6a41..064f3fdea6aad1 100644 --- a/src/core/include/openvino/pass/make_stateful.hpp +++ b/src/core/include/openvino/pass/make_stateful.hpp @@ -18,7 +18,7 @@ namespace pass { */ class OPENVINO_API MakeStateful : public ModelPass { public: - OPENVINO_RTTI("MakeStateful"); + OPENVINO_MODEL_PASS_RTTI("MakeStateful"); using ParamResPairs = std::vector, std::shared_ptr>>; diff --git a/src/core/include/openvino/pass/pass.hpp b/src/core/include/openvino/pass/pass.hpp index 5c27df8aed4a0d..3927e7542aa886 100644 --- a/src/core/include/openvino/pass/pass.hpp +++ b/src/core/include/openvino/pass/pass.hpp @@ -4,16 +4,26 @@ #pragma once -#include #include -#include +#include #include "openvino/core/core_visibility.hpp" #include "openvino/core/enum_mask.hpp" #include "openvino/core/model.hpp" #include "openvino/core/node.hpp" +#include "openvino/core/rtti.hpp" #include "openvino/pass/pass_config.hpp" +#define _OPENVINO_MODEL_PASS_RTTI_WITH_TYPE(TYPE_NAME) _OPENVINO_MODEL_PASS_RTTI_WITH_TYPE_VERSION(TYPE_NAME, "0") + +#define _OPENVINO_MODEL_PASS_RTTI_WITH_TYPE_VERSION(TYPE_NAME, VERSION_NAME) \ + _OPENVINO_RTTI_WITH_TYPE_VERSION_PARENT(TYPE_NAME, VERSION_NAME, ::ov::pass::ModelPass) + +#define OPENVINO_MODEL_PASS_RTTI(...) \ + _OPENVINO_RTTI_EXPAND(_OPENVINO_RTTI_DEFINITION_SELECTOR_2(__VA_ARGS__, \ + _OPENVINO_MODEL_PASS_RTTI_WITH_TYPE_VERSION, \ + _OPENVINO_MODEL_PASS_RTTI_WITH_TYPE)(__VA_ARGS__)) + namespace ov { namespace pass { enum class PassProperty : uint32_t { diff --git a/src/core/include/openvino/pass/sdpa_to_paged_attention.hpp b/src/core/include/openvino/pass/sdpa_to_paged_attention.hpp index a0dd403818b462..74aeacb0719cee 100644 --- a/src/core/include/openvino/pass/sdpa_to_paged_attention.hpp +++ b/src/core/include/openvino/pass/sdpa_to_paged_attention.hpp @@ -17,7 +17,7 @@ namespace pass { */ class OPENVINO_API SDPAToPagedAttention : public ModelPass { public: - OPENVINO_RTTI("SDPAToPagedAttention"); + OPENVINO_MODEL_PASS_RTTI("SDPAToPagedAttention"); SDPAToPagedAttention(bool use_block_indices_inputs = false, bool use_score_outputs = false); bool run_on_model(const std::shared_ptr& model) override; diff --git a/src/core/include/openvino/pass/serialize.hpp b/src/core/include/openvino/pass/serialize.hpp index d0eaadde346bf6..ff99a59c70b556 100644 --- a/src/core/include/openvino/pass/serialize.hpp +++ b/src/core/include/openvino/pass/serialize.hpp @@ -26,7 +26,7 @@ namespace pass { */ class OPENVINO_API Serialize : public ov::pass::ModelPass { public: - OPENVINO_RTTI("Serialize"); + OPENVINO_MODEL_PASS_RTTI("Serialize"); enum class Version : uint8_t { UNSPECIFIED = 0, // Use the latest or function version @@ -63,7 +63,7 @@ class OPENVINO_API Serialize : public ov::pass::ModelPass { */ class OPENVINO_API StreamSerialize : public ov::pass::ModelPass { public: - OPENVINO_RTTI("StreamSerialize"); + OPENVINO_MODEL_PASS_RTTI("StreamSerialize"); struct DataHeader { size_t custom_data_offset; diff --git a/src/core/include/openvino/pass/stateful_to_stateless.hpp b/src/core/include/openvino/pass/stateful_to_stateless.hpp index 90fd6b9e6e7901..551c9315c20f72 100644 --- a/src/core/include/openvino/pass/stateful_to_stateless.hpp +++ b/src/core/include/openvino/pass/stateful_to_stateless.hpp @@ -14,7 +14,7 @@ namespace pass { */ class OPENVINO_API StatefulToStateless : public ModelPass { public: - OPENVINO_RTTI("StatefulToStateless"); + OPENVINO_MODEL_PASS_RTTI("StatefulToStateless"); bool run_on_model(const std::shared_ptr& model) override; }; diff --git a/src/core/include/openvino/pass/validate.hpp b/src/core/include/openvino/pass/validate.hpp index 23cfe9909f707b..dce6967131d33d 100644 --- a/src/core/include/openvino/pass/validate.hpp +++ b/src/core/include/openvino/pass/validate.hpp @@ -24,7 +24,7 @@ namespace pass { /// \ingroup ov_pass_cpp_api class OPENVINO_API Validate : public ModelPass { public: - OPENVINO_RTTI("ov::pass::Validate"); + OPENVINO_MODEL_PASS_RTTI("ov::pass::Validate"); Validate() : ModelPass() {} bool run_on_model(const std::shared_ptr& f) override; diff --git a/src/core/include/openvino/pass/visualize_tree.hpp b/src/core/include/openvino/pass/visualize_tree.hpp index 065cec96e27220..2207270cd57d3d 100644 --- a/src/core/include/openvino/pass/visualize_tree.hpp +++ b/src/core/include/openvino/pass/visualize_tree.hpp @@ -28,7 +28,7 @@ namespace pass { */ class OPENVINO_API VisualizeTree : public ModelPass { public: - OPENVINO_RTTI("ov::pass::VisualizeTree"); + OPENVINO_MODEL_PASS_RTTI("ov::pass::VisualizeTree"); using node_modifiers_t = std::function& attributes)>; VisualizeTree(const std::string& file_name, node_modifiers_t nm = nullptr, bool dot_only = false); diff --git a/src/core/tests/frontend/decoder_transformation_extension.cpp b/src/core/tests/frontend/decoder_transformation_extension.cpp index 714dd4b9fafb18..d1110041392bf7 100644 --- a/src/core/tests/frontend/decoder_transformation_extension.cpp +++ b/src/core/tests/frontend/decoder_transformation_extension.cpp @@ -37,7 +37,7 @@ TEST(DecoderTransformation, FunctionPass) { namespace _decoder_transformation_test { class TestPass : public ov::pass::ModelPass { public: - OPENVINO_RTTI("ov::pass::TestPass"); + OPENVINO_MODEL_PASS_RTTI("ov::pass::TestPass"); TestPass() = default; TestPass(const TestPass& tp) = default; bool run_on_model(const std::shared_ptr&) override { diff --git a/src/core/tests/pass_config.cpp b/src/core/tests/pass_config.cpp index 15ebc71eef10a6..053cb2b62aff32 100644 --- a/src/core/tests/pass_config.cpp +++ b/src/core/tests/pass_config.cpp @@ -51,7 +51,7 @@ class RenameSigmoid : public ov::pass::MatcherPass { class TestModelPass : public pass::ModelPass { public: - OPENVINO_RTTI("TestModelPass"); + OPENVINO_MODEL_PASS_RTTI("TestModelPass"); bool run_on_model(const std::shared_ptr& f) override { pass::Manager manager(get_pass_config()); diff --git a/src/frontends/common/src/extension/decoder_transformation.cpp b/src/frontends/common/src/extension/decoder_transformation.cpp index 4533fb89d85651..940131479ca9e0 100644 --- a/src/frontends/common/src/extension/decoder_transformation.cpp +++ b/src/frontends/common/src/extension/decoder_transformation.cpp @@ -12,6 +12,7 @@ using namespace ov::frontend; /// \brief Helper class to register user function as a FunctionPass class CustomModelPass : public ov::pass::ModelPass { public: + OPENVINO_MODEL_PASS_RTTI("frontend::CustomModelPass"); explicit CustomModelPass(std::function)> pass) : m_pass(std::move(pass)) {} bool run_on_model(const std::shared_ptr& f) override { diff --git a/src/frontends/pytorch/src/transforms/dict_resolver.hpp b/src/frontends/pytorch/src/transforms/dict_resolver.hpp index 150b1361dab57d..b2830cecb51bdc 100644 --- a/src/frontends/pytorch/src/transforms/dict_resolver.hpp +++ b/src/frontends/pytorch/src/transforms/dict_resolver.hpp @@ -15,13 +15,13 @@ namespace pass { // This transformation replaces pattern Parameter(Dict)->aten::__getitem__ class DictParameterResolver : public ov::pass::ModelPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::DictParameterResolver"); + OPENVINO_MODEL_PASS_RTTI("ov::frontend::pytorch::pass::DictParameterResolver"); bool run_on_model(const std::shared_ptr& model) override; }; // This transformation replaces pattern prim::DictConstruct->Result class DictResultResolver : public ov::pass::ModelPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::DictResultResolver"); + OPENVINO_MODEL_PASS_RTTI("ov::frontend::pytorch::pass::DictResultResolver"); bool run_on_model(const std::shared_ptr& model) override; }; diff --git a/src/frontends/pytorch/src/transforms/prim_list_tuple_construct_replacer.hpp b/src/frontends/pytorch/src/transforms/prim_list_tuple_construct_replacer.hpp index 31a025d6d90493..cbe8e1eb0b62c9 100644 --- a/src/frontends/pytorch/src/transforms/prim_list_tuple_construct_replacer.hpp +++ b/src/frontends/pytorch/src/transforms/prim_list_tuple_construct_replacer.hpp @@ -14,7 +14,7 @@ namespace pass { class DecomposeListTupleResults : public ov::pass::ModelPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::DecomposeListTupleResults"); + OPENVINO_MODEL_PASS_RTTI("ov::frontend::pytorch::pass::DecomposeListTupleResults"); bool run_on_model(const std::shared_ptr& model) override; }; diff --git a/src/frontends/pytorch/src/transforms/prim_unpack_parameter_replacer.hpp b/src/frontends/pytorch/src/transforms/prim_unpack_parameter_replacer.hpp index 2616b66fb58ab6..5d339a307033ef 100644 --- a/src/frontends/pytorch/src/transforms/prim_unpack_parameter_replacer.hpp +++ b/src/frontends/pytorch/src/transforms/prim_unpack_parameter_replacer.hpp @@ -27,7 +27,7 @@ namespace pass { // tuples only and the most nested objects in those tuples are tensors. class DecomposeUnpackParameters : public ov::pass::ModelPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::DecomposeUnpackParameters"); + OPENVINO_MODEL_PASS_RTTI("ov::frontend::pytorch::pass::DecomposeUnpackParameters"); bool run_on_model(const std::shared_ptr& model) override; }; diff --git a/src/frontends/pytorch/src/transforms/tuple_unpack_replacer.hpp b/src/frontends/pytorch/src/transforms/tuple_unpack_replacer.hpp index 625b986f3b64b7..2aec2824bbddd3 100644 --- a/src/frontends/pytorch/src/transforms/tuple_unpack_replacer.hpp +++ b/src/frontends/pytorch/src/transforms/tuple_unpack_replacer.hpp @@ -20,7 +20,7 @@ class PrimTupleUnpackReplacer : public ov::pass::MatcherPass { class TupleUnpackInBodyReplacer : public ov::pass::ModelPass { public: - OPENVINO_RTTI("ov::frontend::pytorch::pass::TupleUnpackInBodyReplacer"); + OPENVINO_MODEL_PASS_RTTI("ov::frontend::pytorch::pass::TupleUnpackInBodyReplacer"); bool run_on_model(const std::shared_ptr& model) override; }; diff --git a/src/frontends/tensorflow/src/transformations/switch_merge_resolve.hpp b/src/frontends/tensorflow/src/transformations/switch_merge_resolve.hpp index 6038005e2eb4c4..d9eb34fb58d81b 100644 --- a/src/frontends/tensorflow/src/transformations/switch_merge_resolve.hpp +++ b/src/frontends/tensorflow/src/transformations/switch_merge_resolve.hpp @@ -20,7 +20,7 @@ namespace pass { // Merge nodes can have the same eliminated markers that means the fused If will have several outputs. class SwitchMergeResolver : public ov::pass::ModelPass { public: - OPENVINO_RTTI("ov::frontend::tensorflow::SwitchMergeResolver"); + OPENVINO_MODEL_PASS_RTTI("ov::frontend::tensorflow::SwitchMergeResolver"); SwitchMergeResolver() = default; bool run_on_model(const std::shared_ptr& m) override; diff --git a/src/frontends/tensorflow_common/include/helper_transforms/const_to_result_remover.hpp b/src/frontends/tensorflow_common/include/helper_transforms/const_to_result_remover.hpp index fc4d1c36fac3af..016f7b994dacb3 100644 --- a/src/frontends/tensorflow_common/include/helper_transforms/const_to_result_remover.hpp +++ b/src/frontends/tensorflow_common/include/helper_transforms/const_to_result_remover.hpp @@ -17,7 +17,7 @@ namespace pass { // We need to remove them because separate sub-graphs can solidly affect performance class ConstToResultRemover : public ov::pass::ModelPass { public: - OPENVINO_RTTI("ov::frontend::tensorflow::pass::UnsupportedConstToResultRemover"); + OPENVINO_MODEL_PASS_RTTI("ov::frontend::tensorflow::pass::UnsupportedConstToResultRemover"); ConstToResultRemover() {} bool run_on_model(const std::shared_ptr& m) override; diff --git a/src/frontends/tensorflow_common/include/helper_transforms/saved_model_unused_remover.hpp b/src/frontends/tensorflow_common/include/helper_transforms/saved_model_unused_remover.hpp index c7d457d8d6a361..fcc493458ccbba 100644 --- a/src/frontends/tensorflow_common/include/helper_transforms/saved_model_unused_remover.hpp +++ b/src/frontends/tensorflow_common/include/helper_transforms/saved_model_unused_remover.hpp @@ -15,7 +15,7 @@ namespace pass { // Results marked as unused by Saved Model settings class SavedModelUnusedRemover : public ov::pass::ModelPass { public: - OPENVINO_RTTI("ov::frontend::tensorflow::pass::SavedModelUnusedRemover"); + OPENVINO_MODEL_PASS_RTTI("ov::frontend::tensorflow::pass::SavedModelUnusedRemover"); SavedModelUnusedRemover() {} bool run_on_model(const std::shared_ptr& m) override; 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 584e8c55b6a9ea..84cdf44cbf5b02 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 @@ -32,7 +32,7 @@ class TFLQuantizeReplacer : public ov::pass::MatcherPass { // This transformation simplifies type manipulations in the graph class TFLQuantizeResolver : public ov::pass::ModelPass { public: - OPENVINO_RTTI("ov::frontend::tensorflow_lite::pass::TFLQuantizeResolver"); + OPENVINO_MODEL_PASS_RTTI("ov::frontend::tensorflow_lite::pass::TFLQuantizeResolver"); bool run_on_model(const std::shared_ptr& m) override; }; diff --git a/src/plugins/intel_cpu/src/transformations/snippets/aarch64/pass/snippets_mark_skipped.hpp b/src/plugins/intel_cpu/src/transformations/snippets/aarch64/pass/snippets_mark_skipped.hpp index 2b17039d198bf3..8ca0424ccda030 100644 --- a/src/plugins/intel_cpu/src/transformations/snippets/aarch64/pass/snippets_mark_skipped.hpp +++ b/src/plugins/intel_cpu/src/transformations/snippets/aarch64/pass/snippets_mark_skipped.hpp @@ -16,7 +16,7 @@ namespace intel_cpu { */ class SnippetsMarkSkipped : public ov::pass::ModelPass { public: - OPENVINO_RTTI("SnippetsMarkSkipped", "0"); + OPENVINO_MODEL_PASS_RTTI("SnippetsMarkSkipped"); SnippetsMarkSkipped() : ModelPass() {} bool run_on_model(const std::shared_ptr&) override; }; 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 05f8d1206715f0..24e848cf157e0e 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 @@ -15,7 +15,7 @@ namespace pass { class EnforcePrecision : public ov::pass::ModelPass { public: - OPENVINO_RTTI("EnforcePrecision", "0"); + OPENVINO_MODEL_PASS_RTTI("EnforcePrecision"); EnforcePrecision(const element::Type source, const element::Type target, diff --git a/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/snippets_mark_skipped.hpp b/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/snippets_mark_skipped.hpp index fc5250defac8cb..f71a376ee1f038 100644 --- a/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/snippets_mark_skipped.hpp +++ b/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/snippets_mark_skipped.hpp @@ -16,7 +16,7 @@ namespace intel_cpu { */ class SnippetsMarkSkipped : public ov::pass::ModelPass { public: - OPENVINO_RTTI("SnippetsMarkSkipped", "0"); + OPENVINO_MODEL_PASS_RTTI("SnippetsMarkSkipped"); SnippetsMarkSkipped(bool enableBF16 = false) : ModelPass(), enableBF16(enableBF16) {} bool run_on_model(const std::shared_ptr&) override; diff --git a/src/plugins/intel_cpu/src/transformations/tpp/x64/pass/fuse_tpp_to_equations.hpp b/src/plugins/intel_cpu/src/transformations/tpp/x64/pass/fuse_tpp_to_equations.hpp index 9a00f97d9c464d..a99330845d443d 100644 --- a/src/plugins/intel_cpu/src/transformations/tpp/x64/pass/fuse_tpp_to_equations.hpp +++ b/src/plugins/intel_cpu/src/transformations/tpp/x64/pass/fuse_tpp_to_equations.hpp @@ -18,7 +18,7 @@ namespace pass { */ class FuseTPPToEquations: public ov::pass::ModelPass { public: - OPENVINO_RTTI("FuseTPPToEquations", "0"); + OPENVINO_MODEL_PASS_RTTI("FuseTPPToEquations"); FuseTPPToEquations() = default; bool run_on_model(const std::shared_ptr& m) override; private: diff --git a/src/plugins/intel_gpu/src/plugin/transformations/convert_convolution.hpp b/src/plugins/intel_gpu/src/plugin/transformations/convert_convolution.hpp index 004bd4fad561a8..1cc30180db7142 100644 --- a/src/plugins/intel_gpu/src/plugin/transformations/convert_convolution.hpp +++ b/src/plugins/intel_gpu/src/plugin/transformations/convert_convolution.hpp @@ -11,7 +11,7 @@ namespace intel_gpu { class ConvertConvolutionToInternal : public ov::pass::ModelPass { public: - OPENVINO_RTTI("ConvertConvolutionToInternal", "0"); + OPENVINO_MODEL_PASS_RTTI("ConvertConvolutionToInternal"); bool run_on_model(const std::shared_ptr& m) override; }; diff --git a/src/plugins/intel_gpu/src/plugin/transformations/print_model_statistics.hpp b/src/plugins/intel_gpu/src/plugin/transformations/print_model_statistics.hpp index 079028f0154848..77922903c287bd 100644 --- a/src/plugins/intel_gpu/src/plugin/transformations/print_model_statistics.hpp +++ b/src/plugins/intel_gpu/src/plugin/transformations/print_model_statistics.hpp @@ -11,7 +11,7 @@ namespace intel_gpu { class PrintModelStatistics : public ov::pass::ModelPass { public: - OPENVINO_RTTI("PrintModelStatistics", "0"); + OPENVINO_MODEL_PASS_RTTI("PrintModelStatistics"); PrintModelStatistics() = default; bool run_on_model(const std::shared_ptr& m) override; diff --git a/src/tests/test_utils/common_test_utils/include/common_test_utils/graph_comparator.hpp b/src/tests/test_utils/common_test_utils/include/common_test_utils/graph_comparator.hpp index dbd945bc80a45b..461136bc08aaa8 100644 --- a/src/tests/test_utils/common_test_utils/include/common_test_utils/graph_comparator.hpp +++ b/src/tests/test_utils/common_test_utils/include/common_test_utils/graph_comparator.hpp @@ -127,6 +127,7 @@ namespace ov { namespace pass { class InjectionPass : public ov::pass::ModelPass { public: + OPENVINO_MODEL_PASS_RTTI("InjectionPass"); using injection_callback = std::function)>; explicit InjectionPass(injection_callback callback) : ModelPass(), m_callback(std::move(callback)) {} @@ -268,6 +269,7 @@ class InitUniqueNames : public ov::pass::ModelPass { UniqueNamesHolder::Ptr m_unh; public: + OPENVINO_MODEL_PASS_RTTI("InitUniqueNames"); InitUniqueNames(UniqueNamesHolder::Ptr unh) : m_unh(unh) {} bool run_on_model(const std::shared_ptr& f) override { m_unh->init_names(f); @@ -279,6 +281,7 @@ class CheckUniqueNames : public ov::pass::ModelPass { UniqueNamesHolder::Ptr m_unh; public: + OPENVINO_MODEL_PASS_RTTI("CheckUniqueNames"); CheckUniqueNames(UniqueNamesHolder::Ptr unh, bool soft_names_comparison = false, bool result_friendly_names_check = true) diff --git a/src/tests/test_utils/common_test_utils/src/ov_test_utils.cpp b/src/tests/test_utils/common_test_utils/src/ov_test_utils.cpp index d781d92b57052a..91ef3fd6a7ebe1 100644 --- a/src/tests/test_utils/common_test_utils/src/ov_test_utils.cpp +++ b/src/tests/test_utils/common_test_utils/src/ov_test_utils.cpp @@ -17,6 +17,7 @@ namespace pass { class CopyTensorNamesToRefModel : public ov::pass::ModelPass { public: + OPENVINO_MODEL_PASS_RTTI("CopyTensorNamesToRefModel"); CopyTensorNamesToRefModel(const std::shared_ptr& ref_model) : m_ref_model(ref_model) {} bool run_on_model(const std::shared_ptr& f) override { const auto& orig_results = f->get_results();