From 7d8820923d9a4ea64f3f646b7e8d7307c1a8389e Mon Sep 17 00:00:00 2001 From: Vladislav Golubev Date: Wed, 8 Jan 2025 14:29:16 +0100 Subject: [PATCH] TransformationContext is removed from transform --- .../include/low_precision/add.hpp | 2 +- .../include/low_precision/assign_and_read_value.hpp | 2 +- .../include/low_precision/avg_pool.hpp | 2 +- .../include/low_precision/batch_to_space.hpp | 2 +- .../include/low_precision/clamp.hpp | 2 +- .../include/low_precision/concat.hpp | 2 +- .../include/low_precision/convert.hpp | 2 +- .../include/low_precision/convolution.hpp | 2 +- .../low_precision/convolution_backprop_data.hpp | 2 +- .../include/low_precision/eliminate_fake_quantize.hpp | 2 +- .../include/low_precision/fake_quantize.hpp | 9 ++++----- .../low_precision/fake_quantize_decomposition.hpp | 2 +- .../include/low_precision/fold_convert.hpp | 2 +- .../include/low_precision/fold_fake_quantize.hpp | 2 +- .../include/low_precision/fuse_convert.hpp | 2 +- .../low_precision/fuse_multiply_to_fake_quantize.hpp | 2 +- .../low_precision/fuse_subtract_to_fake_quantize.hpp | 2 +- .../include/low_precision/gather.hpp | 2 +- .../include/low_precision/group_convolution.hpp | 2 +- .../include/low_precision/interpolate.hpp | 2 +- .../include/low_precision/layer_transformation.hpp | 2 +- .../include/low_precision/mat_mul.hpp | 2 +- .../include/low_precision/max_pool.hpp | 2 +- .../include/low_precision/move_fake_quantize.hpp | 2 +- .../include/low_precision/multiply.hpp | 2 +- .../include/low_precision/multiply_partial.hpp | 2 +- .../low_precision/multiply_to_group_convolution.hpp | 2 +- .../include/low_precision/mvn.hpp | 2 +- .../include/low_precision/normalize_l2.hpp | 2 +- .../include/low_precision/pad.hpp | 2 +- .../include/low_precision/prelu.hpp | 2 +- .../include/low_precision/recurrent_cell.hpp | 4 ++-- .../low_precision/reduce_base_transformation.hpp | 2 +- .../include/low_precision/relu.hpp | 2 +- .../include/low_precision/reshape.hpp | 2 +- .../include/low_precision/shuffle_channels.hpp | 2 +- .../include/low_precision/slice.hpp | 2 +- .../include/low_precision/space_to_batch.hpp | 2 +- .../include/low_precision/split.hpp | 7 ++----- .../include/low_precision/squeeze.hpp | 2 +- .../include/low_precision/strided_slice.hpp | 2 +- .../include/low_precision/subtract.hpp | 2 +- .../low_precision/transparent_base_transformation.hpp | 2 +- .../include/low_precision/transpose.hpp | 2 +- .../include/low_precision/unsqueeze.hpp | 2 +- src/common/low_precision_transformations/src/add.cpp | 4 ++-- .../src/assign_and_read_value.cpp | 6 +++--- .../low_precision_transformations/src/avg_pool.cpp | 4 ++-- .../src/batch_to_space.cpp | 4 ++-- .../low_precision_transformations/src/broadcast.cpp | 2 +- src/common/low_precision_transformations/src/clamp.cpp | 4 ++-- .../low_precision_transformations/src/concat.cpp | 4 ++-- .../low_precision_transformations/src/convert.cpp | 4 ++-- .../low_precision_transformations/src/convolution.cpp | 4 ++-- .../src/convolution_backprop_data.cpp | 4 ++-- .../src/depth_to_space.cpp | 2 +- .../src/eliminate_fake_quantize.cpp | 4 ++-- .../src/fake_quantize.cpp | 7 +++---- .../src/fake_quantize_decomposition.cpp | 4 ++-- .../low_precision_transformations/src/fold_convert.cpp | 4 ++-- .../src/fold_fake_quantize.cpp | 4 ++-- .../low_precision_transformations/src/fuse_convert.cpp | 4 ++-- .../src/fuse_multiply_to_fake_quantize.cpp | 4 ++-- .../src/fuse_subtract_to_fake_quantize.cpp | 4 ++-- .../low_precision_transformations/src/gather.cpp | 4 ++-- .../src/group_convolution.cpp | 9 +++------ .../low_precision_transformations/src/interpolate.cpp | 4 ++-- .../low_precision_transformations/src/mat_mul.cpp | 4 ++-- .../low_precision_transformations/src/max_pool.cpp | 4 ++-- .../src/move_fake_quantize.cpp | 4 ++-- .../low_precision_transformations/src/multiply.cpp | 4 ++-- .../src/multiply_partial.cpp | 4 ++-- .../src/multiply_to_group_convolution.cpp | 4 ++-- src/common/low_precision_transformations/src/mvn.cpp | 4 ++-- .../low_precision_transformations/src/normalize_l2.cpp | 4 ++-- src/common/low_precision_transformations/src/pad.cpp | 4 ++-- src/common/low_precision_transformations/src/prelu.cpp | 4 ++-- .../src/recurrent_cell.cpp | 10 +++++----- .../src/reduce_base_transformation.cpp | 2 +- .../low_precision_transformations/src/reduce_max.cpp | 2 +- .../low_precision_transformations/src/reduce_mean.cpp | 2 +- .../low_precision_transformations/src/reduce_min.cpp | 2 +- .../low_precision_transformations/src/reduce_sum.cpp | 2 +- src/common/low_precision_transformations/src/relu.cpp | 4 ++-- .../low_precision_transformations/src/reshape.cpp | 4 ++-- .../src/shuffle_channels.cpp | 4 ++-- src/common/low_precision_transformations/src/slice.cpp | 4 ++-- .../src/space_to_batch.cpp | 4 ++-- src/common/low_precision_transformations/src/split.cpp | 7 +++---- .../low_precision_transformations/src/squeeze.cpp | 4 ++-- .../src/strided_slice.cpp | 4 ++-- .../low_precision_transformations/src/subtract.cpp | 4 ++-- .../src/transparent_base_transformation.cpp | 2 +- .../low_precision_transformations/src/transpose.cpp | 4 ++-- .../low_precision_transformations/src/unsqueeze.cpp | 4 ++-- .../src/variadic_split.cpp | 2 +- 96 files changed, 150 insertions(+), 159 deletions(-) diff --git a/src/common/low_precision_transformations/include/low_precision/add.hpp b/src/common/low_precision_transformations/include/low_precision/add.hpp index 4e43ec067c3098..55efbf940e94b7 100644 --- a/src/common/low_precision_transformations/include/low_precision/add.hpp +++ b/src/common/low_precision_transformations/include/low_precision/add.hpp @@ -24,7 +24,7 @@ class LP_TRANSFORMATIONS_API AddTransformation : public EltwiseBaseTransformatio public: OPENVINO_RTTI("AddTransformation", "0", EltwiseBaseTransformation); AddTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const std::shared_ptr& layer) const override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/assign_and_read_value.hpp b/src/common/low_precision_transformations/include/low_precision/assign_and_read_value.hpp index aac5201cf5db94..9134293d5512dd 100644 --- a/src/common/low_precision_transformations/include/low_precision/assign_and_read_value.hpp +++ b/src/common/low_precision_transformations/include/low_precision/assign_and_read_value.hpp @@ -15,7 +15,7 @@ class LP_TRANSFORMATIONS_API AssignAndReadValueTransformation : public LayerTran public: OPENVINO_RTTI("AssignAndReadValueTransformation", "0", LayerTransformation); AssignAndReadValueTransformation(const std::shared_ptr model, const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher& m) override; + bool transform(ov::pass::pattern::Matcher& m) override; bool canBeTransformed(const std::shared_ptr& op) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; private: diff --git a/src/common/low_precision_transformations/include/low_precision/avg_pool.hpp b/src/common/low_precision_transformations/include/low_precision/avg_pool.hpp index 3e6dcec3d6aed9..7dfac41beffb06 100644 --- a/src/common/low_precision_transformations/include/low_precision/avg_pool.hpp +++ b/src/common/low_precision_transformations/include/low_precision/avg_pool.hpp @@ -23,7 +23,7 @@ class LP_TRANSFORMATIONS_API AvgPoolTransformation : public LayerTransformation public: OPENVINO_RTTI("AvgPoolTransformation", "0", LayerTransformation); AvgPoolTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const override; bool canBeTransformed(const std::shared_ptr& layer) const override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/batch_to_space.hpp b/src/common/low_precision_transformations/include/low_precision/batch_to_space.hpp index 53121a5fbd4364..b729eb1fc956d3 100644 --- a/src/common/low_precision_transformations/include/low_precision/batch_to_space.hpp +++ b/src/common/low_precision_transformations/include/low_precision/batch_to_space.hpp @@ -25,7 +25,7 @@ class LP_TRANSFORMATIONS_API BatchToSpaceTransformation : public LayerTransforma OPENVINO_RTTI("BatchToSpaceTransformation", "0", LayerTransformation); BatchToSpaceTransformation(const Params& params = Params()); bool canBeTransformed(const std::shared_ptr& op) const override; - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/clamp.hpp b/src/common/low_precision_transformations/include/low_precision/clamp.hpp index b9eb35f07b00e6..c41d80939bca8f 100644 --- a/src/common/low_precision_transformations/include/low_precision/clamp.hpp +++ b/src/common/low_precision_transformations/include/low_precision/clamp.hpp @@ -24,7 +24,7 @@ class LP_TRANSFORMATIONS_API ClampTransformation : public LayerTransformation { public: OPENVINO_RTTI("ClampTransformation", "0", LayerTransformation); ClampTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher& m) override; + bool transform(ov::pass::pattern::Matcher& m) override; bool canBeTransformed(const std::shared_ptr& op) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/concat.hpp b/src/common/low_precision_transformations/include/low_precision/concat.hpp index ffc7554e8506dd..a4511ef0f7c099 100644 --- a/src/common/low_precision_transformations/include/low_precision/concat.hpp +++ b/src/common/low_precision_transformations/include/low_precision/concat.hpp @@ -31,7 +31,7 @@ class LP_TRANSFORMATIONS_API ConcatTransformation : public LayerTransformation { public: OPENVINO_RTTI("ConcatTransformation", "0", LayerTransformation); ConcatTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; bool canBeTransformed(const std::shared_ptr& layer) const override; static bool isQuantizedStatic(const std::shared_ptr& layer); diff --git a/src/common/low_precision_transformations/include/low_precision/convert.hpp b/src/common/low_precision_transformations/include/low_precision/convert.hpp index 7cbd79be03bb2b..edfb58076c9d20 100644 --- a/src/common/low_precision_transformations/include/low_precision/convert.hpp +++ b/src/common/low_precision_transformations/include/low_precision/convert.hpp @@ -15,7 +15,7 @@ class LP_TRANSFORMATIONS_API ConvertTransformation : public LayerTransformation public: OPENVINO_RTTI("ConvertTransformation", "0", LayerTransformation); ConvertTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/convolution.hpp b/src/common/low_precision_transformations/include/low_precision/convolution.hpp index 428a8adf00ca17..74a61817c15b18 100644 --- a/src/common/low_precision_transformations/include/low_precision/convolution.hpp +++ b/src/common/low_precision_transformations/include/low_precision/convolution.hpp @@ -22,7 +22,7 @@ class LP_TRANSFORMATIONS_API ConvolutionTransformation : public WeightableLayerT public: OPENVINO_RTTI("ConvolutionTransformation", "0", WeightableLayerTransformation); ConvolutionTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool isQuantized(const std::shared_ptr& layer, const std::vector&defaultPrecisions) const override; static bool isQuantizedStatic(const std::shared_ptr& layer, diff --git a/src/common/low_precision_transformations/include/low_precision/convolution_backprop_data.hpp b/src/common/low_precision_transformations/include/low_precision/convolution_backprop_data.hpp index de28b23bc3ccb3..9b1e2580e59193 100644 --- a/src/common/low_precision_transformations/include/low_precision/convolution_backprop_data.hpp +++ b/src/common/low_precision_transformations/include/low_precision/convolution_backprop_data.hpp @@ -21,7 +21,7 @@ namespace low_precision { class LP_TRANSFORMATIONS_API ConvolutionBackpropDataTransformation : public WeightableLayerTransformation { public: ConvolutionBackpropDataTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const std::shared_ptr& op) const override; bool isQuantized(const std::shared_ptr& layer, const std::vector&defaultPrecisions) const override; diff --git a/src/common/low_precision_transformations/include/low_precision/eliminate_fake_quantize.hpp b/src/common/low_precision_transformations/include/low_precision/eliminate_fake_quantize.hpp index 27c54e174d8d73..190d146a741151 100644 --- a/src/common/low_precision_transformations/include/low_precision/eliminate_fake_quantize.hpp +++ b/src/common/low_precision_transformations/include/low_precision/eliminate_fake_quantize.hpp @@ -24,7 +24,7 @@ class LP_TRANSFORMATIONS_API EliminateFakeQuantizeTransformation : public Cleanu public: OPENVINO_RTTI("EliminateFakeQuantizeTransformation", "0", CleanupTransformation); EliminateFakeQuantizeTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const std::shared_ptr& layer) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/fake_quantize.hpp b/src/common/low_precision_transformations/include/low_precision/fake_quantize.hpp index 640814dc15cabb..8f5c67dbc0bcc4 100644 --- a/src/common/low_precision_transformations/include/low_precision/fake_quantize.hpp +++ b/src/common/low_precision_transformations/include/low_precision/fake_quantize.hpp @@ -23,16 +23,15 @@ class LP_TRANSFORMATIONS_API FakeQuantizeTransformation : public LayerTransforma public: OPENVINO_RTTI("FakeQuantizeTransformation", "0", LayerTransformation); FakeQuantizeTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; static bool checkElementwise(const std::shared_ptr& eltwise); static std::shared_ptr fuseElementwise( - TransformationContext& context, - MatcherPass* matcherPass, - const std::shared_ptr& fakeQuantize, - const bool updatePrecisions); + MatcherPass* matcherPass, + const std::shared_ptr& fakeQuantize, + const bool updatePrecisions); }; } // namespace low_precision diff --git a/src/common/low_precision_transformations/include/low_precision/fake_quantize_decomposition.hpp b/src/common/low_precision_transformations/include/low_precision/fake_quantize_decomposition.hpp index 4d2ee8d88fadaf..8289a9ea5493f7 100644 --- a/src/common/low_precision_transformations/include/low_precision/fake_quantize_decomposition.hpp +++ b/src/common/low_precision_transformations/include/low_precision/fake_quantize_decomposition.hpp @@ -25,7 +25,7 @@ class LP_TRANSFORMATIONS_API FakeQuantizeDecompositionTransformation : public La public: OPENVINO_RTTI("FakeQuantizeDecompositionTransformation", "0", LayerTransformation); FakeQuantizeDecompositionTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/fold_convert.hpp b/src/common/low_precision_transformations/include/low_precision/fold_convert.hpp index ba9302bdd5bbf1..d0d864835c8f98 100644 --- a/src/common/low_precision_transformations/include/low_precision/fold_convert.hpp +++ b/src/common/low_precision_transformations/include/low_precision/fold_convert.hpp @@ -25,7 +25,7 @@ class LP_TRANSFORMATIONS_API FoldConvertTransformation : public CleanupTransform public: OPENVINO_RTTI("FoldConvertTransformation", "0", CleanupTransformation); FoldConvertTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const std::shared_ptr& layer) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/fold_fake_quantize.hpp b/src/common/low_precision_transformations/include/low_precision/fold_fake_quantize.hpp index edf8802a4e3e21..b345ce5edbd80a 100644 --- a/src/common/low_precision_transformations/include/low_precision/fold_fake_quantize.hpp +++ b/src/common/low_precision_transformations/include/low_precision/fold_fake_quantize.hpp @@ -23,7 +23,7 @@ class LP_TRANSFORMATIONS_API FoldFakeQuantizeTransformation : public LayerTransf public: OPENVINO_RTTI("FoldFakeQuantizeTransformation", "0", LayerTransformation); FoldFakeQuantizeTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const std::shared_ptr& layer) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; bool isConstantOutput(std::shared_ptr op) const; diff --git a/src/common/low_precision_transformations/include/low_precision/fuse_convert.hpp b/src/common/low_precision_transformations/include/low_precision/fuse_convert.hpp index fc40baaea6692f..06d252961e2c26 100644 --- a/src/common/low_precision_transformations/include/low_precision/fuse_convert.hpp +++ b/src/common/low_precision_transformations/include/low_precision/fuse_convert.hpp @@ -22,7 +22,7 @@ class LP_TRANSFORMATIONS_API FuseConvertTransformation : public CleanupTransform public: OPENVINO_RTTI("FuseConvertTransformation", "0", CleanupTransformation); FuseConvertTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const std::shared_ptr& layer) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/fuse_multiply_to_fake_quantize.hpp b/src/common/low_precision_transformations/include/low_precision/fuse_multiply_to_fake_quantize.hpp index 67471a56a4a6b8..1933a07bbb881b 100644 --- a/src/common/low_precision_transformations/include/low_precision/fuse_multiply_to_fake_quantize.hpp +++ b/src/common/low_precision_transformations/include/low_precision/fuse_multiply_to_fake_quantize.hpp @@ -24,7 +24,7 @@ class LP_TRANSFORMATIONS_API FuseMultiplyToFakeQuantizeTransformation : public F public: OPENVINO_RTTI("FuseMultiplyToFakeQuantizeTransformation", "0", FuseElementwiseToFakeQuantizeTransformation); FuseMultiplyToFakeQuantizeTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/fuse_subtract_to_fake_quantize.hpp b/src/common/low_precision_transformations/include/low_precision/fuse_subtract_to_fake_quantize.hpp index c5dd8994e2a512..644aafb740d8ff 100644 --- a/src/common/low_precision_transformations/include/low_precision/fuse_subtract_to_fake_quantize.hpp +++ b/src/common/low_precision_transformations/include/low_precision/fuse_subtract_to_fake_quantize.hpp @@ -24,7 +24,7 @@ class LP_TRANSFORMATIONS_API FuseSubtractToFakeQuantizeTransformation : public F public: OPENVINO_RTTI("FuseSubtractToFakeQuantizeTransformation", "0", FuseElementwiseToFakeQuantizeTransformation); FuseSubtractToFakeQuantizeTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/gather.hpp b/src/common/low_precision_transformations/include/low_precision/gather.hpp index 2d8a15a221de80..980ec8f1e9b992 100644 --- a/src/common/low_precision_transformations/include/low_precision/gather.hpp +++ b/src/common/low_precision_transformations/include/low_precision/gather.hpp @@ -15,7 +15,7 @@ class LP_TRANSFORMATIONS_API GatherTransformation : public LayerTransformation { public: OPENVINO_RTTI("GatherTransformation", "0", LayerTransformation); GatherTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const override; bool canBeTransformed(const std::shared_ptr& layer) const override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/group_convolution.hpp b/src/common/low_precision_transformations/include/low_precision/group_convolution.hpp index 6551a929339830..f1e0bb44bddad8 100644 --- a/src/common/low_precision_transformations/include/low_precision/group_convolution.hpp +++ b/src/common/low_precision_transformations/include/low_precision/group_convolution.hpp @@ -23,7 +23,7 @@ class LP_TRANSFORMATIONS_API GroupConvolutionTransformation : public Convolution public: OPENVINO_RTTI("GroupConvolutionTransformation", "0", ConvolutionTransformation); GroupConvolutionTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool isQuantized(const std::shared_ptr& layer, const std::vector& defaultPrecisions) const override; static bool isQuantizedStatic(const std::shared_ptr& layer, diff --git a/src/common/low_precision_transformations/include/low_precision/interpolate.hpp b/src/common/low_precision_transformations/include/low_precision/interpolate.hpp index 3d51bc64af50b2..d715a24cc73e5d 100644 --- a/src/common/low_precision_transformations/include/low_precision/interpolate.hpp +++ b/src/common/low_precision_transformations/include/low_precision/interpolate.hpp @@ -22,7 +22,7 @@ class LP_TRANSFORMATIONS_API InterpolateTransformation : public LayerTransformat public: OPENVINO_RTTI("InterpolateTransformation", "0", LayerTransformation); InterpolateTransformation(const Params& params = Params()); - bool transform(TransformationContext &context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; bool canBeTransformed(const std::shared_ptr& layer) const override; }; 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 4eb18a4627a592..604f88294adeba 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 @@ -290,7 +290,7 @@ class LP_TRANSFORMATIONS_API LayerTransformation : public ov::pass::MatcherPass LayerTransformation(const Params& params); virtual ~LayerTransformation() = default; - virtual bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) = 0; + virtual bool transform(ov::pass::pattern::Matcher &m) = 0; void setUpdatePrecisions(const bool updatePrecisions); diff --git a/src/common/low_precision_transformations/include/low_precision/mat_mul.hpp b/src/common/low_precision_transformations/include/low_precision/mat_mul.hpp index 61c5c98d1e4230..910154fe0e16e0 100644 --- a/src/common/low_precision_transformations/include/low_precision/mat_mul.hpp +++ b/src/common/low_precision_transformations/include/low_precision/mat_mul.hpp @@ -23,7 +23,7 @@ class LP_TRANSFORMATIONS_API MatMulTransformation : public LayerTransformation { public: OPENVINO_RTTI("MatMulTransformation", "0", LayerTransformation); MatMulTransformation(const Params& params = Params()); - bool transform(TransformationContext &context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; bool canBeTransformed(const std::shared_ptr& layer) const override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/max_pool.hpp b/src/common/low_precision_transformations/include/low_precision/max_pool.hpp index e0eab505022f8f..f6307ed69cbfbe 100644 --- a/src/common/low_precision_transformations/include/low_precision/max_pool.hpp +++ b/src/common/low_precision_transformations/include/low_precision/max_pool.hpp @@ -25,7 +25,7 @@ class LP_TRANSFORMATIONS_API MaxPoolTransformation : public LayerTransformation OPENVINO_RTTI("MaxPoolTransformation", "0", LayerTransformation); MaxPoolTransformation(const Params& params = Params()); bool canBeTransformed(const std::shared_ptr& op) const override; - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/move_fake_quantize.hpp b/src/common/low_precision_transformations/include/low_precision/move_fake_quantize.hpp index f5ec56c57577c5..96a344cc4620fe 100644 --- a/src/common/low_precision_transformations/include/low_precision/move_fake_quantize.hpp +++ b/src/common/low_precision_transformations/include/low_precision/move_fake_quantize.hpp @@ -16,7 +16,7 @@ class LP_TRANSFORMATIONS_API MoveFakeQuantize : public LayerTransformation { public: OPENVINO_RTTI("MoveFakeQuantize", "0", LayerTransformation); MoveFakeQuantize(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const std::shared_ptr& layer) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/multiply.hpp b/src/common/low_precision_transformations/include/low_precision/multiply.hpp index fd51b8cac07f35..5658a5bf71bedf 100644 --- a/src/common/low_precision_transformations/include/low_precision/multiply.hpp +++ b/src/common/low_precision_transformations/include/low_precision/multiply.hpp @@ -23,7 +23,7 @@ class LP_TRANSFORMATIONS_API MultiplyTransformation : public WeightableLayerTran public: OPENVINO_RTTI("MultiplyTransformation", "0", WeightableLayerTransformation); MultiplyTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; protected: size_t getInputChannels(const std::shared_ptr op) const override; diff --git a/src/common/low_precision_transformations/include/low_precision/multiply_partial.hpp b/src/common/low_precision_transformations/include/low_precision/multiply_partial.hpp index d29b067295c153..7f05baeaf3b12e 100644 --- a/src/common/low_precision_transformations/include/low_precision/multiply_partial.hpp +++ b/src/common/low_precision_transformations/include/low_precision/multiply_partial.hpp @@ -23,7 +23,7 @@ class LP_TRANSFORMATIONS_API MultiplyPartialTransformation : public EltwiseBaseT public: OPENVINO_RTTI("MultiplyPartialTransformation", "0", EltwiseBaseTransformation); MultiplyPartialTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const std::shared_ptr& layer) const override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/multiply_to_group_convolution.hpp b/src/common/low_precision_transformations/include/low_precision/multiply_to_group_convolution.hpp index 7a2ee304690ea8..3d6fc228331b13 100644 --- a/src/common/low_precision_transformations/include/low_precision/multiply_to_group_convolution.hpp +++ b/src/common/low_precision_transformations/include/low_precision/multiply_to_group_convolution.hpp @@ -27,7 +27,7 @@ class LP_TRANSFORMATIONS_API MultiplyToGroupConvolutionTransformation : public C const Params& params = Params(), const PrecisionsRestriction::PrecisionsByPorts& restrictions = {}); ~MultiplyToGroupConvolutionTransformation() override {} - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const std::shared_ptr& layer) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; bool isQuantized(const std::shared_ptr& layer, diff --git a/src/common/low_precision_transformations/include/low_precision/mvn.hpp b/src/common/low_precision_transformations/include/low_precision/mvn.hpp index f70c56ba4125e4..061cca9917c43f 100644 --- a/src/common/low_precision_transformations/include/low_precision/mvn.hpp +++ b/src/common/low_precision_transformations/include/low_precision/mvn.hpp @@ -22,7 +22,7 @@ class LP_TRANSFORMATIONS_API MVNTransformation : public LayerTransformation { public: OPENVINO_RTTI("MVNTransformation", "0", LayerTransformation); MVNTransformation(const Params& params = Params()); - bool transform(TransformationContext &context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const std::shared_ptr& layer) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/normalize_l2.hpp b/src/common/low_precision_transformations/include/low_precision/normalize_l2.hpp index 14d8c80fb50b5e..8d16867982e5fe 100644 --- a/src/common/low_precision_transformations/include/low_precision/normalize_l2.hpp +++ b/src/common/low_precision_transformations/include/low_precision/normalize_l2.hpp @@ -22,7 +22,7 @@ class LP_TRANSFORMATIONS_API NormalizeL2Transformation : public LayerTransformat public: OPENVINO_RTTI("NormalizeL2Transformation", "0", LayerTransformation); NormalizeL2Transformation(const Params& params = Params()); - bool transform(TransformationContext &context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const std::shared_ptr& layer) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/pad.hpp b/src/common/low_precision_transformations/include/low_precision/pad.hpp index c1539179ee19ee..595d7b02dbd77e 100644 --- a/src/common/low_precision_transformations/include/low_precision/pad.hpp +++ b/src/common/low_precision_transformations/include/low_precision/pad.hpp @@ -24,7 +24,7 @@ class LP_TRANSFORMATIONS_API PadTransformation : public LayerTransformation { public: OPENVINO_RTTI("PadTransformation", "0", LayerTransformation); PadTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, pattern::Matcher& m) override; + bool transform(pattern::Matcher& m) override; bool canBeTransformed(const std::shared_ptr& op) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/prelu.hpp b/src/common/low_precision_transformations/include/low_precision/prelu.hpp index 64e68ae0f6e655..12af2f536b28f2 100644 --- a/src/common/low_precision_transformations/include/low_precision/prelu.hpp +++ b/src/common/low_precision_transformations/include/low_precision/prelu.hpp @@ -24,7 +24,7 @@ class LP_TRANSFORMATIONS_API PReluTransformation : public LayerTransformation { public: OPENVINO_RTTI("PReluTransformation", "0", LayerTransformation); PReluTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; bool canBeTransformed(const std::shared_ptr& op) const override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/recurrent_cell.hpp b/src/common/low_precision_transformations/include/low_precision/recurrent_cell.hpp index 5b5321545e69d9..9cb8ed91c4b70b 100644 --- a/src/common/low_precision_transformations/include/low_precision/recurrent_cell.hpp +++ b/src/common/low_precision_transformations/include/low_precision/recurrent_cell.hpp @@ -16,7 +16,7 @@ class LP_TRANSFORMATIONS_API RecurrentCellTransformation : public LayerTransform public: OPENVINO_RTTI("RecurrentCellTransformation", "0", LayerTransformation); RecurrentCellTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const std::shared_ptr& layer) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; void propagateSkipCleanupAttribute(std::shared_ptr dequantization_multiply); @@ -25,7 +25,7 @@ class LP_TRANSFORMATIONS_API RecurrentCellTransformation : public LayerTransform static std::shared_ptr wrap_dequantization(const std::shared_ptr parameter, const bool with_subtract); private: - void propagate(TransformationContext& context, const std::shared_ptr node); + void propagate(const std::shared_ptr node); }; } // namespace low_precision diff --git a/src/common/low_precision_transformations/include/low_precision/reduce_base_transformation.hpp b/src/common/low_precision_transformations/include/low_precision/reduce_base_transformation.hpp index cd0e8c625bd336..c91a8364f71c08 100644 --- a/src/common/low_precision_transformations/include/low_precision/reduce_base_transformation.hpp +++ b/src/common/low_precision_transformations/include/low_precision/reduce_base_transformation.hpp @@ -22,7 +22,7 @@ namespace low_precision { class LP_TRANSFORMATIONS_API ReduceBaseTransformation : public LayerTransformation { public: ReduceBaseTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher& m) override; + bool transform(ov::pass::pattern::Matcher& m) override; bool canBeTransformed(const std::shared_ptr& reduce) const override; protected: diff --git a/src/common/low_precision_transformations/include/low_precision/relu.hpp b/src/common/low_precision_transformations/include/low_precision/relu.hpp index cee4295df56ffb..cc92ea72c40f49 100644 --- a/src/common/low_precision_transformations/include/low_precision/relu.hpp +++ b/src/common/low_precision_transformations/include/low_precision/relu.hpp @@ -24,7 +24,7 @@ class LP_TRANSFORMATIONS_API ReluTransformation : public LayerTransformation { public: OPENVINO_RTTI("ReluTransformation", "0", LayerTransformation); ReluTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; bool canBeTransformed(const std::shared_ptr& op) const override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/reshape.hpp b/src/common/low_precision_transformations/include/low_precision/reshape.hpp index 5af2bce33c9a91..b9857f6928a6aa 100644 --- a/src/common/low_precision_transformations/include/low_precision/reshape.hpp +++ b/src/common/low_precision_transformations/include/low_precision/reshape.hpp @@ -23,7 +23,7 @@ class LP_TRANSFORMATIONS_API ReshapeTransformation : public LayerTransformation public: OPENVINO_RTTI("ReshapeTransformation", "0", LayerTransformation); ReshapeTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; bool canBeTransformed(const std::shared_ptr& op) const override; diff --git a/src/common/low_precision_transformations/include/low_precision/shuffle_channels.hpp b/src/common/low_precision_transformations/include/low_precision/shuffle_channels.hpp index 90babac1a35a63..999c052a3108ad 100644 --- a/src/common/low_precision_transformations/include/low_precision/shuffle_channels.hpp +++ b/src/common/low_precision_transformations/include/low_precision/shuffle_channels.hpp @@ -23,7 +23,7 @@ class LP_TRANSFORMATIONS_API ShuffleChannelsTransformation : public LayerTransfo public: OPENVINO_RTTI("ShuffleChannelsTransformation", "0", LayerTransformation); ShuffleChannelsTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher& m) override; + bool transform(ov::pass::pattern::Matcher& m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; bool canBeTransformed(const std::shared_ptr& op) const override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/slice.hpp b/src/common/low_precision_transformations/include/low_precision/slice.hpp index 34fc06d7b9fb4b..6b73536cf06c98 100644 --- a/src/common/low_precision_transformations/include/low_precision/slice.hpp +++ b/src/common/low_precision_transformations/include/low_precision/slice.hpp @@ -24,7 +24,7 @@ class LP_TRANSFORMATIONS_API SliceTransformation : public LayerTransformation { public: OPENVINO_RTTI("SliceTransformation", "0", LayerTransformation); SliceTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher& m) override; + bool transform(ov::pass::pattern::Matcher& m) override; bool canBeTransformed(const std::shared_ptr& op) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/space_to_batch.hpp b/src/common/low_precision_transformations/include/low_precision/space_to_batch.hpp index 4e3831ef9a4fb6..48cda7b4c305fb 100644 --- a/src/common/low_precision_transformations/include/low_precision/space_to_batch.hpp +++ b/src/common/low_precision_transformations/include/low_precision/space_to_batch.hpp @@ -25,7 +25,7 @@ class LP_TRANSFORMATIONS_API SpaceToBatchTransformation : public LayerTransforma OPENVINO_RTTI("SpaceToBatchTransformation", "0", LayerTransformation); SpaceToBatchTransformation(const Params& params = Params()); bool canBeTransformed(const std::shared_ptr& op) const override; - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/split.hpp b/src/common/low_precision_transformations/include/low_precision/split.hpp index b5c18dafa590b5..bb48628a832372 100644 --- a/src/common/low_precision_transformations/include/low_precision/split.hpp +++ b/src/common/low_precision_transformations/include/low_precision/split.hpp @@ -25,13 +25,10 @@ class LP_TRANSFORMATIONS_API SplitTransformation : public LayerTransformation { public: OPENVINO_RTTI("SplitTransformation", "0", LayerTransformation); SplitTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher& m) override; + bool transform(ov::pass::pattern::Matcher& m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; bool canBeTransformed(const std::shared_ptr& layer) const override; - void updateOutputs( - TransformationContext& context, - std::vector> lastNodes, - std::shared_ptr originalNode) const; + void updateOutputs(std::vector> lastNodes, std::shared_ptr originalNode) const; }; } // namespace low_precision } // namespace pass diff --git a/src/common/low_precision_transformations/include/low_precision/squeeze.hpp b/src/common/low_precision_transformations/include/low_precision/squeeze.hpp index 7226f28d30eae0..599b9e2f2eadb3 100644 --- a/src/common/low_precision_transformations/include/low_precision/squeeze.hpp +++ b/src/common/low_precision_transformations/include/low_precision/squeeze.hpp @@ -23,7 +23,7 @@ class LP_TRANSFORMATIONS_API SqueezeTransformation : public LayerTransformation public: OPENVINO_RTTI("SqueezeTransformation", "0", LayerTransformation); SqueezeTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; bool canBeTransformed(const std::shared_ptr& layer) const override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/strided_slice.hpp b/src/common/low_precision_transformations/include/low_precision/strided_slice.hpp index bfde97ebac89bc..a5bbaf983e0b07 100644 --- a/src/common/low_precision_transformations/include/low_precision/strided_slice.hpp +++ b/src/common/low_precision_transformations/include/low_precision/strided_slice.hpp @@ -24,7 +24,7 @@ class LP_TRANSFORMATIONS_API StridedSliceTransformation : public LayerTransforma public: OPENVINO_RTTI("StridedSliceTransformation", "0", LayerTransformation); StridedSliceTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher& m) override; + bool transform(ov::pass::pattern::Matcher& m) override; bool canBeTransformed(const std::shared_ptr& op) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/subtract.hpp b/src/common/low_precision_transformations/include/low_precision/subtract.hpp index a7c6bfbe888ca7..c020480c1e314d 100644 --- a/src/common/low_precision_transformations/include/low_precision/subtract.hpp +++ b/src/common/low_precision_transformations/include/low_precision/subtract.hpp @@ -23,7 +23,7 @@ class LP_TRANSFORMATIONS_API SubtractTransformation : public LayerTransformation public: OPENVINO_RTTI("SubtractTransformation", "0", LayerTransformation); SubtractTransformation(const Params& params); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; }; } // namespace low_precision diff --git a/src/common/low_precision_transformations/include/low_precision/transparent_base_transformation.hpp b/src/common/low_precision_transformations/include/low_precision/transparent_base_transformation.hpp index edfbb516d99b8c..c0350fe186942a 100644 --- a/src/common/low_precision_transformations/include/low_precision/transparent_base_transformation.hpp +++ b/src/common/low_precision_transformations/include/low_precision/transparent_base_transformation.hpp @@ -20,7 +20,7 @@ class LP_TRANSFORMATIONS_API TransparentBaseTransformation : public LayerTransfo public: TransparentBaseTransformation(const Params& params) : LayerTransformation(params) {} ~TransparentBaseTransformation() override {}; - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool canBeTransformed(const std::shared_ptr& layer) const override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/transpose.hpp b/src/common/low_precision_transformations/include/low_precision/transpose.hpp index 9f4544d1ea1b48..a2fc1d4fa58598 100644 --- a/src/common/low_precision_transformations/include/low_precision/transpose.hpp +++ b/src/common/low_precision_transformations/include/low_precision/transpose.hpp @@ -24,7 +24,7 @@ class LP_TRANSFORMATIONS_API TransposeTransformation : public LayerTransformatio public: OPENVINO_RTTI("TransposeTransformation", "0", LayerTransformation); TransposeTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; bool canBeTransformed(const std::shared_ptr& op) const override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/unsqueeze.hpp b/src/common/low_precision_transformations/include/low_precision/unsqueeze.hpp index ec6526fb310f98..41728d1acf289e 100644 --- a/src/common/low_precision_transformations/include/low_precision/unsqueeze.hpp +++ b/src/common/low_precision_transformations/include/low_precision/unsqueeze.hpp @@ -23,7 +23,7 @@ class LP_TRANSFORMATIONS_API UnsqueezeTransformation : public LayerTransformatio public: OPENVINO_RTTI("UnsqueezeTransformation", "0", LayerTransformation); UnsqueezeTransformation(const Params& params = Params()); - bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) override; + bool transform(ov::pass::pattern::Matcher &m) override; bool isPrecisionPreserved(std::shared_ptr layer) const noexcept override; bool canBeTransformed(const std::shared_ptr& layer) const override; }; diff --git a/src/common/low_precision_transformations/src/add.cpp b/src/common/low_precision_transformations/src/add.cpp index cc021bc9d56251..e55577fda4ce3a 100644 --- a/src/common/low_precision_transformations/src/add.cpp +++ b/src/common/low_precision_transformations/src/add.cpp @@ -95,14 +95,14 @@ AddTransformation::AddTransformation(const Params& params) : EltwiseBaseTransfor if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool AddTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { +bool AddTransformation::transform(ov::pass::pattern::Matcher &m) { std::shared_ptr op = ov::as_type_ptr(m.get_match_root()); if ((op == nullptr) || (!canBeTransformed(op))) { return false; diff --git a/src/common/low_precision_transformations/src/assign_and_read_value.cpp b/src/common/low_precision_transformations/src/assign_and_read_value.cpp index f74047f4703395..4a5d2478a4e674 100644 --- a/src/common/low_precision_transformations/src/assign_and_read_value.cpp +++ b/src/common/low_precision_transformations/src/assign_and_read_value.cpp @@ -39,7 +39,7 @@ AssignAndReadValueTransformation::AssignAndReadValueTransformation(const std::sh if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared( @@ -48,7 +48,7 @@ AssignAndReadValueTransformation::AssignAndReadValueTransformation(const std::sh this->register_matcher(m, callback); } -bool AssignAndReadValueTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { +bool AssignAndReadValueTransformation::transform(ov::pass::pattern::Matcher& m) { if (!canBeTransformed(m.get_match_root())) { return false; } @@ -99,7 +99,7 @@ bool AssignAndReadValueTransformation::transform(TransformationContext& context, return true; } - FakeQuantizeTransformation::fuseElementwise(context, this, fakeQuantize, updatePrecisions); + FakeQuantizeTransformation::fuseElementwise(this, fakeQuantize, updatePrecisions); return true; } diff --git a/src/common/low_precision_transformations/src/avg_pool.cpp b/src/common/low_precision_transformations/src/avg_pool.cpp index c519693ccc6d12..7a38834efbdb0d 100644 --- a/src/common/low_precision_transformations/src/avg_pool.cpp +++ b/src/common/low_precision_transformations/src/avg_pool.cpp @@ -27,14 +27,14 @@ AvgPoolTransformation::AvgPoolTransformation(const Params& params) : LayerTransf if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool AvgPoolTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { +bool AvgPoolTransformation::transform(ov::pass::pattern::Matcher &m) { if (!canBeTransformed(m.get_match_root())) { return false; } diff --git a/src/common/low_precision_transformations/src/batch_to_space.cpp b/src/common/low_precision_transformations/src/batch_to_space.cpp index 70a424082d32cb..b231c7110d3d29 100644 --- a/src/common/low_precision_transformations/src/batch_to_space.cpp +++ b/src/common/low_precision_transformations/src/batch_to_space.cpp @@ -26,7 +26,7 @@ BatchToSpaceTransformation::BatchToSpaceTransformation(const Params& params) : L if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); @@ -46,7 +46,7 @@ bool BatchToSpaceTransformation::canBeTransformed(const std::shared_ptr& o return dequantization.isPerTensor(); } -bool BatchToSpaceTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { +bool BatchToSpaceTransformation::transform(ov::pass::pattern::Matcher& m) { if (!canBeTransformed(m.get_match_root())) { return false; } diff --git a/src/common/low_precision_transformations/src/broadcast.cpp b/src/common/low_precision_transformations/src/broadcast.cpp index 27977b42cbd9e1..e59d9de3c3e5d9 100644 --- a/src/common/low_precision_transformations/src/broadcast.cpp +++ b/src/common/low_precision_transformations/src/broadcast.cpp @@ -35,7 +35,7 @@ BroadcastTransformation::BroadcastTransformation(const Params& params) : Transpa if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); diff --git a/src/common/low_precision_transformations/src/clamp.cpp b/src/common/low_precision_transformations/src/clamp.cpp index fe7ba6345cd630..b07f09fe7b6b01 100644 --- a/src/common/low_precision_transformations/src/clamp.cpp +++ b/src/common/low_precision_transformations/src/clamp.cpp @@ -24,14 +24,14 @@ ClampTransformation::ClampTransformation(const Params& params) : LayerTransforma if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool ClampTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { +bool ClampTransformation::transform(ov::pass::pattern::Matcher& m) { if (!canBeTransformed(m.get_match_root())) { return false; } diff --git a/src/common/low_precision_transformations/src/concat.cpp b/src/common/low_precision_transformations/src/concat.cpp index edebcf3eb37ec8..fe39ed8d4f65b2 100644 --- a/src/common/low_precision_transformations/src/concat.cpp +++ b/src/common/low_precision_transformations/src/concat.cpp @@ -32,14 +32,14 @@ ConcatTransformation::ConcatTransformation(const Params& params) : LayerTransfor return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool ConcatTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { +bool ConcatTransformation::transform(ov::pass::pattern::Matcher &m) { if (!canBeTransformed(m.get_match_root())) { return false; } diff --git a/src/common/low_precision_transformations/src/convert.cpp b/src/common/low_precision_transformations/src/convert.cpp index a5b5ff1b1144ad..f1a7ae83e1dd73 100644 --- a/src/common/low_precision_transformations/src/convert.cpp +++ b/src/common/low_precision_transformations/src/convert.cpp @@ -31,14 +31,14 @@ ConvertTransformation::ConvertTransformation(const Params& params) : LayerTransf if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool ConvertTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { +bool ConvertTransformation::transform(ov::pass::pattern::Matcher &m) { std::shared_ptr convert = ov::as_type_ptr(m.get_match_root()); if (!convert) { return false; diff --git a/src/common/low_precision_transformations/src/convolution.cpp b/src/common/low_precision_transformations/src/convolution.cpp index f00659a9e3e874..ab9ed1e133d4b3 100644 --- a/src/common/low_precision_transformations/src/convolution.cpp +++ b/src/common/low_precision_transformations/src/convolution.cpp @@ -39,7 +39,7 @@ ConvolutionTransformation::ConvolutionTransformation(const Params& params) : Wei if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); @@ -62,7 +62,7 @@ size_t ConvolutionTransformation::getInputChannels(const std::shared_ptr(matcher, matcher_name); @@ -74,7 +74,7 @@ size_t ConvolutionBackpropDataTransformation::getInputChannels(const std::shared return channels.get_length(); } -bool ConvolutionBackpropDataTransformation::transform(TransformationContext &context, ov::pass::pattern::Matcher &m) { +bool ConvolutionBackpropDataTransformation::transform(ov::pass::pattern::Matcher &m) { auto convolutionBackpropData = m.get_match_root(); if (!canBeTransformed(convolutionBackpropData)) { diff --git a/src/common/low_precision_transformations/src/depth_to_space.cpp b/src/common/low_precision_transformations/src/depth_to_space.cpp index 0574c4bbc2215d..941ac308c0b5b9 100644 --- a/src/common/low_precision_transformations/src/depth_to_space.cpp +++ b/src/common/low_precision_transformations/src/depth_to_space.cpp @@ -20,7 +20,7 @@ DepthToSpaceTransformation::DepthToSpaceTransformation(const Params& params) : T if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); diff --git a/src/common/low_precision_transformations/src/eliminate_fake_quantize.cpp b/src/common/low_precision_transformations/src/eliminate_fake_quantize.cpp index 334b2fa8e8c720..53777745541053 100644 --- a/src/common/low_precision_transformations/src/eliminate_fake_quantize.cpp +++ b/src/common/low_precision_transformations/src/eliminate_fake_quantize.cpp @@ -30,14 +30,14 @@ EliminateFakeQuantizeTransformation::EliminateFakeQuantizeTransformation(const P if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; const auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool EliminateFakeQuantizeTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { +bool EliminateFakeQuantizeTransformation::transform(ov::pass::pattern::Matcher& m) { const auto root = m.get_match_root(); if (!canBeTransformed(root)) { return false; diff --git a/src/common/low_precision_transformations/src/fake_quantize.cpp b/src/common/low_precision_transformations/src/fake_quantize.cpp index 8f3f8835ece8b0..4bfb24a57abd65 100644 --- a/src/common/low_precision_transformations/src/fake_quantize.cpp +++ b/src/common/low_precision_transformations/src/fake_quantize.cpp @@ -28,14 +28,14 @@ FakeQuantizeTransformation::FakeQuantizeTransformation(const Params& params) : L return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool FakeQuantizeTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { +bool FakeQuantizeTransformation::transform(ov::pass::pattern::Matcher &m) { const auto layer = ov::as_type_ptr(m.get_match_root()); if (!layer || !QuantizationDetails::outputLayoutIsSupported(layer)) { return false; @@ -44,7 +44,7 @@ bool FakeQuantizeTransformation::transform(TransformationContext& context, ov::p bool wasHandled = false; std::shared_ptr fakeQuantize = layer; do { - fakeQuantize = fuseElementwise(context, this, fakeQuantize, updatePrecisions); + fakeQuantize = fuseElementwise(this, fakeQuantize, updatePrecisions); wasHandled = wasHandled || (fakeQuantize != nullptr); } while (fakeQuantize != nullptr); @@ -158,7 +158,6 @@ bool FakeQuantizeTransformation::checkElementwise(const std::shared_ptr& e } std::shared_ptr FakeQuantizeTransformation::fuseElementwise( - TransformationContext& context, MatcherPass* matcherPass, const std::shared_ptr& fakeQuantize, const bool updatePrecisions) { diff --git a/src/common/low_precision_transformations/src/fake_quantize_decomposition.cpp b/src/common/low_precision_transformations/src/fake_quantize_decomposition.cpp index da5888396bf01a..32040b06f80fba 100644 --- a/src/common/low_precision_transformations/src/fake_quantize_decomposition.cpp +++ b/src/common/low_precision_transformations/src/fake_quantize_decomposition.cpp @@ -32,7 +32,7 @@ FakeQuantizeDecompositionTransformation::FakeQuantizeDecompositionTransformation return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); @@ -276,7 +276,7 @@ std::tuple, std::shared_ptr> decomposeFakeQuantize( } // namespace } // namespace fq_decomposition -bool FakeQuantizeDecompositionTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { +bool FakeQuantizeDecompositionTransformation::transform(ov::pass::pattern::Matcher& m) { auto node = ov::as_type_ptr(m.get_match_root()); if (!node || !NetworkHelper::isQuantizeSupported(node)) { return false; diff --git a/src/common/low_precision_transformations/src/fold_convert.cpp b/src/common/low_precision_transformations/src/fold_convert.cpp index 673285c2073072..e5e3a361c2f483 100644 --- a/src/common/low_precision_transformations/src/fold_convert.cpp +++ b/src/common/low_precision_transformations/src/fold_convert.cpp @@ -24,13 +24,13 @@ FoldConvertTransformation::FoldConvertTransformation(const Params& params) : Cle if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; this->register_matcher(matcher, callback); } -bool FoldConvertTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { +bool FoldConvertTransformation::transform(ov::pass::pattern::Matcher &m) { const auto subtract = m.get_match_root(); if (!canBeTransformed(subtract)) { return false; diff --git a/src/common/low_precision_transformations/src/fold_fake_quantize.cpp b/src/common/low_precision_transformations/src/fold_fake_quantize.cpp index b6622cb6595222..3963c1eea20ef1 100644 --- a/src/common/low_precision_transformations/src/fold_fake_quantize.cpp +++ b/src/common/low_precision_transformations/src/fold_fake_quantize.cpp @@ -26,14 +26,14 @@ FoldFakeQuantizeTransformation::FoldFakeQuantizeTransformation(const Params& par if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(fakeQuantize, matcher_name); this->register_matcher(m, callback); } -bool FoldFakeQuantizeTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { +bool FoldFakeQuantizeTransformation::transform(ov::pass::pattern::Matcher &m) { const auto fakeQuantize = ov::as_type_ptr(m.get_match_root()); if (fakeQuantize == nullptr) { return false; diff --git a/src/common/low_precision_transformations/src/fuse_convert.cpp b/src/common/low_precision_transformations/src/fuse_convert.cpp index a54b1f17ad53eb..889233c03236b6 100644 --- a/src/common/low_precision_transformations/src/fuse_convert.cpp +++ b/src/common/low_precision_transformations/src/fuse_convert.cpp @@ -40,7 +40,7 @@ FuseConvertTransformation::FuseConvertTransformation(const Params& params) : Cle if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; this->register_matcher(matcher, callback); @@ -68,7 +68,7 @@ std::shared_ptr removeConvertIfPossibleForSubtract( } // namespace -bool FuseConvertTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { +bool FuseConvertTransformation::transform(ov::pass::pattern::Matcher &m) { const auto op = m.get_match_root(); if (!canBeTransformed(op)) { return false; diff --git a/src/common/low_precision_transformations/src/fuse_multiply_to_fake_quantize.cpp b/src/common/low_precision_transformations/src/fuse_multiply_to_fake_quantize.cpp index 473ed1923f333f..6b77e42f581af0 100644 --- a/src/common/low_precision_transformations/src/fuse_multiply_to_fake_quantize.cpp +++ b/src/common/low_precision_transformations/src/fuse_multiply_to_fake_quantize.cpp @@ -25,14 +25,14 @@ FuseMultiplyToFakeQuantizeTransformation::FuseMultiplyToFakeQuantizeTransformati if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool FuseMultiplyToFakeQuantizeTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { +bool FuseMultiplyToFakeQuantizeTransformation::transform(ov::pass::pattern::Matcher &m) { const auto multiply = m.get_match_root(); if (!canBeTransformed(multiply)) { return false; diff --git a/src/common/low_precision_transformations/src/fuse_subtract_to_fake_quantize.cpp b/src/common/low_precision_transformations/src/fuse_subtract_to_fake_quantize.cpp index a0603c0aee0b59..73862fc856a944 100644 --- a/src/common/low_precision_transformations/src/fuse_subtract_to_fake_quantize.cpp +++ b/src/common/low_precision_transformations/src/fuse_subtract_to_fake_quantize.cpp @@ -25,14 +25,14 @@ FuseSubtractToFakeQuantizeTransformation::FuseSubtractToFakeQuantizeTransformati if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool FuseSubtractToFakeQuantizeTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { +bool FuseSubtractToFakeQuantizeTransformation::transform(ov::pass::pattern::Matcher &m) { const auto subtract = m.get_match_root(); if (!canBeTransformed(subtract)) { return false; diff --git a/src/common/low_precision_transformations/src/gather.cpp b/src/common/low_precision_transformations/src/gather.cpp index 7a226c9e664bc6..4c5959d5c373e0 100644 --- a/src/common/low_precision_transformations/src/gather.cpp +++ b/src/common/low_precision_transformations/src/gather.cpp @@ -95,14 +95,14 @@ GatherTransformation::GatherTransformation(const Params& params) : LayerTransfor if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(gather, matcher_name); this->register_matcher(m, callback); } -bool GatherTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { +bool GatherTransformation::transform(ov::pass::pattern::Matcher &m) { auto node = m.get_match_root(); if (!canBeTransformed(m.get_match_root())) { return false; diff --git a/src/common/low_precision_transformations/src/group_convolution.cpp b/src/common/low_precision_transformations/src/group_convolution.cpp index 0d8eb43e51f778..feabc004f05144 100644 --- a/src/common/low_precision_transformations/src/group_convolution.cpp +++ b/src/common/low_precision_transformations/src/group_convolution.cpp @@ -25,7 +25,7 @@ GroupConvolutionTransformation::GroupConvolutionTransformation(const Params& par if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); @@ -37,15 +37,12 @@ bool GroupConvolutionTransformation::isQuantized(const std::shared_ptr& layer, diff --git a/src/common/low_precision_transformations/src/interpolate.cpp b/src/common/low_precision_transformations/src/interpolate.cpp index b3b9765a3fe7c9..5559de793500e6 100644 --- a/src/common/low_precision_transformations/src/interpolate.cpp +++ b/src/common/low_precision_transformations/src/interpolate.cpp @@ -46,7 +46,7 @@ InterpolateTransformation::InterpolateTransformation(const Params& params) : Lay if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto matcher = std::make_shared( @@ -56,7 +56,7 @@ InterpolateTransformation::InterpolateTransformation(const Params& params) : Lay this->register_matcher(matcher, callback); } -bool InterpolateTransformation::transform(TransformationContext &context, ov::pass::pattern::Matcher &m) { +bool InterpolateTransformation::transform(ov::pass::pattern::Matcher &m) { std::shared_ptr interpolate = m.get_match_root(); if (!canBeTransformed(m.get_match_root())) { return false; diff --git a/src/common/low_precision_transformations/src/mat_mul.cpp b/src/common/low_precision_transformations/src/mat_mul.cpp index 696bec133f23f0..b153173d264a6e 100644 --- a/src/common/low_precision_transformations/src/mat_mul.cpp +++ b/src/common/low_precision_transformations/src/mat_mul.cpp @@ -32,14 +32,14 @@ MatMulTransformation::MatMulTransformation(const Params& params) : LayerTransfor if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool MatMulTransformation::transform(TransformationContext &context, ov::pass::pattern::Matcher &m) { +bool MatMulTransformation::transform(ov::pass::pattern::Matcher &m) { std::shared_ptr matMul = ov::as_type_ptr(m.get_match_root()); if ((matMul == nullptr) || !canBeTransformed(matMul)) { return false; diff --git a/src/common/low_precision_transformations/src/max_pool.cpp b/src/common/low_precision_transformations/src/max_pool.cpp index a3cf52587a45d2..ef0a508fac3a65 100644 --- a/src/common/low_precision_transformations/src/max_pool.cpp +++ b/src/common/low_precision_transformations/src/max_pool.cpp @@ -26,7 +26,7 @@ MaxPoolTransformation::MaxPoolTransformation(const Params& params) : LayerTransf if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); @@ -51,7 +51,7 @@ bool MaxPoolTransformation::canBeTransformed(const std::shared_ptr& op) co return true; } -bool MaxPoolTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { +bool MaxPoolTransformation::transform(ov::pass::pattern::Matcher &m) { if (!canBeTransformed(m.get_match_root())) { return false; } diff --git a/src/common/low_precision_transformations/src/move_fake_quantize.cpp b/src/common/low_precision_transformations/src/move_fake_quantize.cpp index 7d08f268d4bbe0..54b54a332db561 100644 --- a/src/common/low_precision_transformations/src/move_fake_quantize.cpp +++ b/src/common/low_precision_transformations/src/move_fake_quantize.cpp @@ -46,7 +46,7 @@ MoveFakeQuantize::MoveFakeQuantize(const Params& params) : LayerTransformation(p return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared( @@ -55,7 +55,7 @@ MoveFakeQuantize::MoveFakeQuantize(const Params& params) : LayerTransformation(p this->register_matcher(m, callback); } -bool MoveFakeQuantize::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { +bool MoveFakeQuantize::transform(ov::pass::pattern::Matcher& m) { const auto fq = m.get_match_root(); if (!canBeTransformed(fq)) { return false; diff --git a/src/common/low_precision_transformations/src/multiply.cpp b/src/common/low_precision_transformations/src/multiply.cpp index 6c12c6ef7a3ccc..8dd6cce059d96e 100644 --- a/src/common/low_precision_transformations/src/multiply.cpp +++ b/src/common/low_precision_transformations/src/multiply.cpp @@ -33,14 +33,14 @@ MultiplyTransformation::MultiplyTransformation(const Params& params) : if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool MultiplyTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { +bool MultiplyTransformation::transform(ov::pass::pattern::Matcher& m) { auto multiply = m.get_match_root(); if (!canBeTransformed(multiply)) { return false; diff --git a/src/common/low_precision_transformations/src/multiply_partial.cpp b/src/common/low_precision_transformations/src/multiply_partial.cpp index 7c7e3c4dbc67dc..e01b09324712ef 100644 --- a/src/common/low_precision_transformations/src/multiply_partial.cpp +++ b/src/common/low_precision_transformations/src/multiply_partial.cpp @@ -32,14 +32,14 @@ MultiplyPartialTransformation::MultiplyPartialTransformation(const Params& param if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool MultiplyPartialTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { +bool MultiplyPartialTransformation::transform(ov::pass::pattern::Matcher& m) { auto multiply = m.get_match_root(); if (!canBeTransformed(multiply)) { return false; diff --git a/src/common/low_precision_transformations/src/multiply_to_group_convolution.cpp b/src/common/low_precision_transformations/src/multiply_to_group_convolution.cpp index b2e33545bcb85b..8e52eb38ee8ee1 100644 --- a/src/common/low_precision_transformations/src/multiply_to_group_convolution.cpp +++ b/src/common/low_precision_transformations/src/multiply_to_group_convolution.cpp @@ -24,14 +24,14 @@ MultiplyToGroupConvolutionTransformation::MultiplyToGroupConvolutionTransformati if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool MultiplyToGroupConvolutionTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { +bool MultiplyToGroupConvolutionTransformation::transform(ov::pass::pattern::Matcher &m) { const auto multiply = m.get_match_root(); if (!canBeTransformed(multiply)) { return false; diff --git a/src/common/low_precision_transformations/src/mvn.cpp b/src/common/low_precision_transformations/src/mvn.cpp index a53115ca986da3..22dfc2f9816ed0 100644 --- a/src/common/low_precision_transformations/src/mvn.cpp +++ b/src/common/low_precision_transformations/src/mvn.cpp @@ -52,7 +52,7 @@ MVNTransformation::MVNTransformation(const Params& params) : LayerTransformation if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); @@ -117,7 +117,7 @@ bool MVNTransformation::canBeTransformed(const std::shared_ptr& operation) return false; } -bool MVNTransformation::transform(TransformationContext &context, ov::pass::pattern::Matcher &m) { +bool MVNTransformation::transform(ov::pass::pattern::Matcher &m) { std::shared_ptr operation = m.get_match_root(); if (!canBeTransformed(operation)) { return false; diff --git a/src/common/low_precision_transformations/src/normalize_l2.cpp b/src/common/low_precision_transformations/src/normalize_l2.cpp index dec95ae4eb667d..9c30456f84afba 100644 --- a/src/common/low_precision_transformations/src/normalize_l2.cpp +++ b/src/common/low_precision_transformations/src/normalize_l2.cpp @@ -47,7 +47,7 @@ NormalizeL2Transformation::NormalizeL2Transformation(const Params& params) : Lay if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); @@ -97,7 +97,7 @@ bool NormalizeL2Transformation::canBeTransformed(const std::shared_ptr& op return true; } -bool NormalizeL2Transformation::transform(TransformationContext &context, ov::pass::pattern::Matcher &m) { +bool NormalizeL2Transformation::transform(ov::pass::pattern::Matcher &m) { std::shared_ptr operation = m.get_match_root(); if (!canBeTransformed(operation)) { return false; diff --git a/src/common/low_precision_transformations/src/pad.cpp b/src/common/low_precision_transformations/src/pad.cpp index 9e67913416c9f0..c023ee9d14d9ee 100644 --- a/src/common/low_precision_transformations/src/pad.cpp +++ b/src/common/low_precision_transformations/src/pad.cpp @@ -31,7 +31,7 @@ PadTransformation::PadTransformation(const Params& params) : LayerTransformation if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); @@ -50,7 +50,7 @@ namespace { } } // namespace -bool PadTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { +bool PadTransformation::transform(ov::pass::pattern::Matcher& m) { if (!canBeTransformed(m.get_match_root())) { return false; } diff --git a/src/common/low_precision_transformations/src/prelu.cpp b/src/common/low_precision_transformations/src/prelu.cpp index bef136f438a9d6..e30bb6fa041074 100644 --- a/src/common/low_precision_transformations/src/prelu.cpp +++ b/src/common/low_precision_transformations/src/prelu.cpp @@ -28,14 +28,14 @@ PReluTransformation::PReluTransformation(const Params& params) : LayerTransforma if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool PReluTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { +bool PReluTransformation::transform(ov::pass::pattern::Matcher &m) { std::shared_ptr prelu = m.get_match_root(); if (!canBeTransformed(prelu)) { return false; diff --git a/src/common/low_precision_transformations/src/recurrent_cell.cpp b/src/common/low_precision_transformations/src/recurrent_cell.cpp index 1bc9c6b6437d3b..34d851d6a2b464 100644 --- a/src/common/low_precision_transformations/src/recurrent_cell.cpp +++ b/src/common/low_precision_transformations/src/recurrent_cell.cpp @@ -43,7 +43,7 @@ RecurrentCellTransformation::RecurrentCellTransformation(const Params& params) : return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared( @@ -116,7 +116,7 @@ std::vector> get_supported_precisions(std::shar } // namespace -void RecurrentCellTransformation::propagate(TransformationContext& context, const std::shared_ptr node) { +void RecurrentCellTransformation::propagate(const std::shared_ptr node) { if (!isSupportedForPerChannelQuantization(node)) { return; } @@ -136,12 +136,12 @@ void RecurrentCellTransformation::propagate(TransformationContext& context, cons for (auto output : new_dequantization.multiply->outputs()) { for (auto input : output.get_target_inputs()) { auto child = input.get_node()->shared_from_this(); - propagate(context, child); + propagate(child); } } } -bool RecurrentCellTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { +bool RecurrentCellTransformation::transform(ov::pass::pattern::Matcher& m) { const auto lstm = m.get_match_root(); const auto inputs = get_supported_precisions(lstm); for (const auto& input : inputs) { @@ -179,7 +179,7 @@ bool RecurrentCellTransformation::transform(TransformationContext& context, ov:: for (const auto& output : multiply->outputs()) { for (const auto& input : output.get_target_inputs()) { const auto input_node = input.get_node(); - propagate(context, input_node->shared_from_this()); + propagate(input_node->shared_from_this()); } } } diff --git a/src/common/low_precision_transformations/src/reduce_base_transformation.cpp b/src/common/low_precision_transformations/src/reduce_base_transformation.cpp index d6dfc0b24420f3..c39681bc660f21 100644 --- a/src/common/low_precision_transformations/src/reduce_base_transformation.cpp +++ b/src/common/low_precision_transformations/src/reduce_base_transformation.cpp @@ -16,7 +16,7 @@ namespace low_precision { ReduceBaseTransformation::ReduceBaseTransformation(const Params& params) : LayerTransformation(params) {} -bool ReduceBaseTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { +bool ReduceBaseTransformation::transform(ov::pass::pattern::Matcher& m) { if (!canBeTransformed(m.get_match_root())) { return false; } diff --git a/src/common/low_precision_transformations/src/reduce_max.cpp b/src/common/low_precision_transformations/src/reduce_max.cpp index ff5d83cca45174..65d021accf3452 100644 --- a/src/common/low_precision_transformations/src/reduce_max.cpp +++ b/src/common/low_precision_transformations/src/reduce_max.cpp @@ -23,7 +23,7 @@ ReduceMaxTransformation::ReduceMaxTransformation(const Params& params) : ReduceB if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); diff --git a/src/common/low_precision_transformations/src/reduce_mean.cpp b/src/common/low_precision_transformations/src/reduce_mean.cpp index 48b2536c22fb04..55f080587290b9 100644 --- a/src/common/low_precision_transformations/src/reduce_mean.cpp +++ b/src/common/low_precision_transformations/src/reduce_mean.cpp @@ -23,7 +23,7 @@ ReduceMeanTransformation::ReduceMeanTransformation(const Params& params) : Reduc if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); diff --git a/src/common/low_precision_transformations/src/reduce_min.cpp b/src/common/low_precision_transformations/src/reduce_min.cpp index 8bed438f8e3d15..6ad0cfea259b38 100644 --- a/src/common/low_precision_transformations/src/reduce_min.cpp +++ b/src/common/low_precision_transformations/src/reduce_min.cpp @@ -22,7 +22,7 @@ ReduceMinTransformation::ReduceMinTransformation(const Params& params) : ReduceB if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); diff --git a/src/common/low_precision_transformations/src/reduce_sum.cpp b/src/common/low_precision_transformations/src/reduce_sum.cpp index d7fac8eaea8be3..d28fbdc9c559e7 100644 --- a/src/common/low_precision_transformations/src/reduce_sum.cpp +++ b/src/common/low_precision_transformations/src/reduce_sum.cpp @@ -23,7 +23,7 @@ ReduceSumTransformation::ReduceSumTransformation(const Params& params) : ReduceB if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); diff --git a/src/common/low_precision_transformations/src/relu.cpp b/src/common/low_precision_transformations/src/relu.cpp index f5b8328881ab83..ca2de4e05f0b84 100644 --- a/src/common/low_precision_transformations/src/relu.cpp +++ b/src/common/low_precision_transformations/src/relu.cpp @@ -28,14 +28,14 @@ ReluTransformation::ReluTransformation(const Params& params) : LayerTransformati if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool ReluTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { +bool ReluTransformation::transform(ov::pass::pattern::Matcher &m) { std::shared_ptr relu = m.get_match_root(); if (!canBeTransformed(relu)) { return false; diff --git a/src/common/low_precision_transformations/src/reshape.cpp b/src/common/low_precision_transformations/src/reshape.cpp index c51c36e403ec2e..cf24edc18953b4 100644 --- a/src/common/low_precision_transformations/src/reshape.cpp +++ b/src/common/low_precision_transformations/src/reshape.cpp @@ -48,7 +48,7 @@ ReshapeTransformation::ReshapeTransformation(const Params& params) : LayerTransf } } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); @@ -146,7 +146,7 @@ void reshapeDequantizationConstant(const std::shared_ptr& r } // namespace -bool ReshapeTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { +bool ReshapeTransformation::transform(ov::pass::pattern::Matcher &m) { std::shared_ptr reshape = ov::as_type_ptr(m.get_match_root()); if (NetworkHelper::isConstantPath(reshape)) { return false; diff --git a/src/common/low_precision_transformations/src/shuffle_channels.cpp b/src/common/low_precision_transformations/src/shuffle_channels.cpp index 75abd781aa0330..67abf9b28db708 100644 --- a/src/common/low_precision_transformations/src/shuffle_channels.cpp +++ b/src/common/low_precision_transformations/src/shuffle_channels.cpp @@ -26,14 +26,14 @@ ShuffleChannelsTransformation::ShuffleChannelsTransformation(const Params& param if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool ShuffleChannelsTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { +bool ShuffleChannelsTransformation::transform(ov::pass::pattern::Matcher& m) { if (!canBeTransformed(m.get_match_root())) { return false; } diff --git a/src/common/low_precision_transformations/src/slice.cpp b/src/common/low_precision_transformations/src/slice.cpp index 595b94cb518df4..082c00f207a37a 100644 --- a/src/common/low_precision_transformations/src/slice.cpp +++ b/src/common/low_precision_transformations/src/slice.cpp @@ -26,14 +26,14 @@ SliceTransformation::SliceTransformation(const Params& params) : LayerTransforma if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool SliceTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { +bool SliceTransformation::transform(ov::pass::pattern::Matcher& m) { if (!SliceTransformation::canBeTransformed(m.get_match_root())) { return false; } diff --git a/src/common/low_precision_transformations/src/space_to_batch.cpp b/src/common/low_precision_transformations/src/space_to_batch.cpp index d5df2f206abfcb..20a5d1b863a18a 100644 --- a/src/common/low_precision_transformations/src/space_to_batch.cpp +++ b/src/common/low_precision_transformations/src/space_to_batch.cpp @@ -26,7 +26,7 @@ SpaceToBatchTransformation::SpaceToBatchTransformation(const Params& params) : L if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); @@ -46,7 +46,7 @@ bool SpaceToBatchTransformation::canBeTransformed(const std::shared_ptr& o return dequantization.isPerTensor(); } -bool SpaceToBatchTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { +bool SpaceToBatchTransformation::transform(ov::pass::pattern::Matcher& m) { if (!canBeTransformed(m.get_match_root())) { return false; } diff --git a/src/common/low_precision_transformations/src/split.cpp b/src/common/low_precision_transformations/src/split.cpp index 1c0fa6c69341e6..35b1ede004730e 100644 --- a/src/common/low_precision_transformations/src/split.cpp +++ b/src/common/low_precision_transformations/src/split.cpp @@ -24,14 +24,14 @@ SplitTransformation::SplitTransformation(const Params& params) : LayerTransforma if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool SplitTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { +bool SplitTransformation::transform(ov::pass::pattern::Matcher& m) { if (!canBeTransformed(m.get_match_root())) { return false; } @@ -120,7 +120,7 @@ bool SplitTransformation::transform(TransformationContext& context, ov::pass::pa } } - updateOutputs(context, lastNodes, newSplit); + updateOutputs(lastNodes, newSplit); OPENVINO_DEBUG("LPT: done: ", newSplit); return true; @@ -128,7 +128,6 @@ bool SplitTransformation::transform(TransformationContext& context, ov::pass::pa void SplitTransformation::updateOutputs( - TransformationContext& context, std::vector> lastNodes, std::shared_ptr originalNode) const { if (lastNodes.size() == 1ul) { diff --git a/src/common/low_precision_transformations/src/squeeze.cpp b/src/common/low_precision_transformations/src/squeeze.cpp index 9c084c977939b8..2ddef0b81be120 100644 --- a/src/common/low_precision_transformations/src/squeeze.cpp +++ b/src/common/low_precision_transformations/src/squeeze.cpp @@ -26,14 +26,14 @@ SqueezeTransformation::SqueezeTransformation(const Params& params) : LayerTransf if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool SqueezeTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { +bool SqueezeTransformation::transform(ov::pass::pattern::Matcher &m) { if (!canBeTransformed(m.get_match_root())) { return false; } diff --git a/src/common/low_precision_transformations/src/strided_slice.cpp b/src/common/low_precision_transformations/src/strided_slice.cpp index dc752048ec4dfd..046a1d65af6e50 100644 --- a/src/common/low_precision_transformations/src/strided_slice.cpp +++ b/src/common/low_precision_transformations/src/strided_slice.cpp @@ -107,14 +107,14 @@ StridedSliceTransformation::StridedSliceTransformation(const Params& params) : L if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool StridedSliceTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher& m) { +bool StridedSliceTransformation::transform(ov::pass::pattern::Matcher& m) { if (!StridedSliceTransformation::canBeTransformed(m.get_match_root())) { return false; } diff --git a/src/common/low_precision_transformations/src/subtract.cpp b/src/common/low_precision_transformations/src/subtract.cpp index 5cdc94a5f0ee85..b19add9fca1570 100644 --- a/src/common/low_precision_transformations/src/subtract.cpp +++ b/src/common/low_precision_transformations/src/subtract.cpp @@ -34,14 +34,14 @@ SubtractTransformation::SubtractTransformation(const Params& params) : LayerTran if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(subtract, matcher_name); this->register_matcher(m, callback); } -bool SubtractTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { +bool SubtractTransformation::transform(ov::pass::pattern::Matcher &m) { std::shared_ptr subtract = ov::as_type_ptr(m.get_match_root()); if (!canBeTransformed(subtract)) { return false; diff --git a/src/common/low_precision_transformations/src/transparent_base_transformation.cpp b/src/common/low_precision_transformations/src/transparent_base_transformation.cpp index aa7fc866ea1501..8b7a94f5ef966b 100644 --- a/src/common/low_precision_transformations/src/transparent_base_transformation.cpp +++ b/src/common/low_precision_transformations/src/transparent_base_transformation.cpp @@ -14,7 +14,7 @@ using namespace ov; using namespace ov::pass; using namespace ov::pass::low_precision; -bool TransparentBaseTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { +bool TransparentBaseTransformation::transform(ov::pass::pattern::Matcher &m) { std::shared_ptr op = m.get_match_root(); if (!canBeTransformed(op)) { return false; diff --git a/src/common/low_precision_transformations/src/transpose.cpp b/src/common/low_precision_transformations/src/transpose.cpp index 57400aaa9dca46..b210920ab5bc65 100644 --- a/src/common/low_precision_transformations/src/transpose.cpp +++ b/src/common/low_precision_transformations/src/transpose.cpp @@ -26,7 +26,7 @@ TransposeTransformation::TransposeTransformation(const Params& params) : LayerTr if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); @@ -83,7 +83,7 @@ void transposeDequantizationConstant(std::shared_ptr& transpose, const std } // namespace -bool TransposeTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { +bool TransposeTransformation::transform(ov::pass::pattern::Matcher &m) { std::shared_ptr transpose = m.get_match_root(); if (!canBeTransformed(transpose)) { return false; diff --git a/src/common/low_precision_transformations/src/unsqueeze.cpp b/src/common/low_precision_transformations/src/unsqueeze.cpp index 74090d6c00f8f0..32e3f89ab01e69 100644 --- a/src/common/low_precision_transformations/src/unsqueeze.cpp +++ b/src/common/low_precision_transformations/src/unsqueeze.cpp @@ -26,14 +26,14 @@ UnsqueezeTransformation::UnsqueezeTransformation(const Params& params) : LayerTr if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name); this->register_matcher(m, callback); } -bool UnsqueezeTransformation::transform(TransformationContext& context, ov::pass::pattern::Matcher &m) { +bool UnsqueezeTransformation::transform(ov::pass::pattern::Matcher &m) { if (!canBeTransformed(m.get_match_root())) { return false; } diff --git a/src/common/low_precision_transformations/src/variadic_split.cpp b/src/common/low_precision_transformations/src/variadic_split.cpp index fd719cb5fcdf05..e381fd2e58bd48 100644 --- a/src/common/low_precision_transformations/src/variadic_split.cpp +++ b/src/common/low_precision_transformations/src/variadic_split.cpp @@ -26,7 +26,7 @@ VariadicSplitTransformation::VariadicSplitTransformation(const Params& params) : if (transformation_callback(op)) { return false; } - return transform(*context, m); + return transform(m); }; auto m = std::make_shared(matcher, matcher_name);