Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RTTI] Add OPENVINO_MATCHER_PASS_RTTI definition #28113

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class LP_TRANSFORMATIONS_API BaseMatcherPass;

class LP_TRANSFORMATIONS_API ov::pass::low_precision::BaseMatcherPass : public ov::pass::MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("low_precision::BaseMatcherPass");
BaseMatcherPass(const AttributeParameters& params = AttributeParameters());
AttributeParameters params;
};
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ class LP_TRANSFORMATIONS_API ConvertSubtractConstant;
*/
class ov::pass::low_precision::ConvertSubtractConstant : public ov::pass::MatcherPass {
public:
OPENVINO_RTTI("ConvertSubtractConstant", "0");
OPENVINO_MATCHER_PASS_RTTI("low_precision::ConvertSubtractConstant");
ConvertSubtractConstant(const std::vector<ov::element::Type>& constantPrecisions = {});
};
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class CreatePrecisionsDependentAttribute;
template <typename AttributeType, typename OperationType>
class ov::pass::low_precision::CreatePrecisionsDependentAttribute : public ov::pass::MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("low_precision::CreatePrecisionsDependentAttribute");
CreatePrecisionsDependentAttribute() {
auto operation = pattern::wrap_type<OperationType>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ inline std::ostream &operator << (std::ostream &os, const DataPrecision& value)
*/
class LP_TRANSFORMATIONS_API LayerTransformation : public ov::pass::MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("low_precision::LayerTransformation");
class Params {
public:
Params(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ namespace low_precision {
*/
class LP_TRANSFORMATIONS_API MarkupBias : public ov::pass::MatcherPass {
public:
OPENVINO_RTTI("MarkupBias", "0");
OPENVINO_MATCHER_PASS_RTTI("low_precision::MarkupBias");
MarkupBias();
};

} // namespace low_precision
} // namespace pass
} // namespace ov
} // namespace ov
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ class PropagateThroughPrecisionPreserved;
template <typename AttributeType>
class ov::pass::low_precision::PropagateThroughPrecisionPreserved : public ov::pass::MatcherPass {
public:
PropagateThroughPrecisionPreserved(const std::vector<ov::element::Type>& defaultPrecisions = precision_set::get_int8_support()) {
OPENVINO_MATCHER_PASS_RTTI("low_precision::PropagateThroughPrecisionPreserved");
PropagateThroughPrecisionPreserved(
const std::vector<ov::element::Type>& defaultPrecisions = precision_set::get_int8_support()) {
ov::graph_rewrite_callback callback = [&](pattern::Matcher& m) {
auto node = m.get_match_root();
if (transformation_callback(node)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ class PropagateToInput;
template <typename AttributeType>
class ov::pass::low_precision::PropagateToInput : public ov::pass::MatcherPass {
public:
PropagateToInput(const std::vector<ov::element::Type>& defaultPrecisions = { ov::element::u8, ov::element::i8 }) {
OPENVINO_MATCHER_PASS_RTTI("low_precision::PropagateToInput");
PropagateToInput(const std::vector<ov::element::Type>& defaultPrecisions = {ov::element::u8, ov::element::i8}) {
ov::graph_rewrite_callback callback = [&](pattern::Matcher& m) {
auto node = m.get_match_root();
if (transformation_callback(node)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ class LP_TRANSFORMATIONS_API PullReshapeThroughDequantization;
*/
class ov::pass::low_precision::PullReshapeThroughDequantization : public ov::pass::MatcherPass {
public:
OPENVINO_RTTI("PullReshapeThroughDequantization", "0");
OPENVINO_MATCHER_PASS_RTTI("low_precision::PullReshapeThroughDequantization");
PullReshapeThroughDequantization(const std::vector<ov::element::Type>& inputPrecisions = {});
};
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ class LP_TRANSFORMATIONS_API PullTransposeThroughDequantization;
*/
class ov::pass::low_precision::PullTransposeThroughDequantization : public ov::pass::MatcherPass {
public:
OPENVINO_RTTI("PullTransposeThroughDequantization", "0");
OPENVINO_MATCHER_PASS_RTTI("low_precision::PullTransposeThroughDequantization");
PullTransposeThroughDequantization(const std::vector<ov::element::Type>& inputPrecisions = {});
};
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ class UpdateSharedPrecisionPreserved;
template <typename AttributeType, typename ExpectedAttributeType = AttributeType>
class ov::pass::low_precision::UpdateSharedPrecisionPreserved : public ov::pass::MatcherPass {
public:
UpdateSharedPrecisionPreserved(const std::vector<ov::element::Type>& defaultPrecisions = precision_set::get_int8_support()) {
OPENVINO_MATCHER_PASS_RTTI("low_precision::UpdateSharedPrecisionPreserved");
UpdateSharedPrecisionPreserved(
const std::vector<ov::element::Type>& defaultPrecisions = precision_set::get_int8_support()) {
ov::graph_rewrite_callback callback = [&](ov::pass::pattern::Matcher& m) {
auto node = m.get_match_root();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class CompressWeightsWithFakeConvert;
*/
class ov::pass::CompressWeightsWithFakeQuantize : public ov::pass::MatcherPass {
public:
OPENVINO_RTTI("CompressWeightsWithFakeQuantize", "0");
OPENVINO_MATCHER_PASS_RTTI("CompressWeightsWithFakeQuantize");

CompressWeightsWithFakeQuantize();
};
Expand Down Expand Up @@ -95,7 +95,7 @@ class ov::pass::CompressWeightsWithFakeQuantize : public ov::pass::MatcherPass {
*/
class ov::pass::CompressWeightsWithFakeConvert : public ov::pass::MatcherPass {
public:
OPENVINO_RTTI("CompressWeightsWithFakeConvert", "0");
OPENVINO_MATCHER_PASS_RTTI("CompressWeightsWithFakeConvert");

CompressWeightsWithFakeConvert();
};
Expand Down
2 changes: 1 addition & 1 deletion src/common/offline_transformations/include/pruning.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ov::pass::InitMasks : public ov::pass::GraphRewrite {
*/
class ov::pass::InitConstMask : public ov::pass::MatcherPass {
public:
OPENVINO_RTTI("InitConstMask", "0");
OPENVINO_MATCHER_PASS_RTTI("InitConstMask");
explicit InitConstMask(
const ov::AxisSet& dims,
const std::function<bool(const double& value)>& condition = [](const double& value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class InitMatMulMask;

class ov::pass::init_masks::InitConvMask : public MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("init_masks::InitConvMask");
InitConvMask() {
auto input = pattern::any_input();
auto weights = pattern::any_input();
Expand Down Expand Up @@ -59,6 +60,7 @@ class ov::pass::init_masks::InitConvMask : public MatcherPass {

class ov::pass::init_masks::InitMatMulMask : public MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("init_masks::InitMatMulMask");
InitMatMulMask() {
auto a = pattern::any_input();
auto b = pattern::any_input();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ static ov::Shape broadcast_shape_to_rank(ov::Shape shape_to_broadcast, int64_t d

class ov::pass::mask_propagation::MatMul : public MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("mask_propagation::MatMul");
MatMul() {
auto a = pattern::any_input(pattern::has_static_shape());
auto b = pattern::any_input(pattern::has_static_shape());
Expand Down Expand Up @@ -201,6 +202,7 @@ class ov::pass::mask_propagation::MatMul : public MatcherPass {

class ov::pass::mask_propagation::Convolution : public MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("mask_propagation::Convolution");
Convolution() {
auto input = pattern::any_input();
auto weights = pattern::any_input(pattern::has_static_shape());
Expand Down Expand Up @@ -280,6 +282,7 @@ class ov::pass::mask_propagation::Convolution : public MatcherPass {

class ov::pass::mask_propagation::GroupConvolution : public MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("mask_propagation::GroupConvolution");
GroupConvolution() {
auto input = pattern::any_input(pattern::has_static_dim(1));
auto weights = pattern::any_input(pattern::has_static_shape());
Expand Down Expand Up @@ -366,6 +369,7 @@ class ov::pass::mask_propagation::GroupConvolution : public MatcherPass {

class ov::pass::mask_propagation::GroupConvolutionReshape : public MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("mask_propagation::GroupConvolutionReshape");
GroupConvolutionReshape() {
auto input = pattern::any_input(pattern::has_static_shape());
auto shape = pattern::any_input();
Expand Down Expand Up @@ -456,6 +460,7 @@ class ov::pass::mask_propagation::GroupConvolutionReshape : public MatcherPass {

class ov::pass::mask_propagation::Elementwise : public MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("mask_propagation::Elementwise");
Elementwise() {
auto input = pattern::any_input();
auto weights = pattern::any_input();
Expand Down Expand Up @@ -646,6 +651,7 @@ class ov::pass::mask_propagation::Elementwise : public MatcherPass {

class ov::pass::mask_propagation::FakeQuantize : public MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("mask_propagation::FakeQuantize");
FakeQuantize() {
auto input = pattern::any_input(pattern::has_static_shape());
auto input_low = pattern::any_input(pattern::has_static_shape());
Expand Down Expand Up @@ -758,6 +764,7 @@ class ov::pass::mask_propagation::FakeQuantize : public MatcherPass {

class ov::pass::mask_propagation::Concat : public MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("mask_propagation::Concat");
Concat() {
auto concat = pattern::wrap_type<opset10::Concat>(pattern::has_static_shape());

Expand Down Expand Up @@ -864,6 +871,7 @@ class ov::pass::mask_propagation::Concat : public MatcherPass {

class ov::pass::mask_propagation::PassThrough : public MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("mask_propagation::PassThrough");
PassThrough() {
auto unary_op = pattern::wrap_type<op::util::UnaryElementwiseArithmetic,
opset10::Clamp,
Expand Down Expand Up @@ -906,6 +914,7 @@ class ov::pass::mask_propagation::PassThrough : public MatcherPass {

class ov::pass::mask_propagation::Reduce : public MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("mask_propagation::Reduce");
Reduce() {
auto inputs = pattern::any_input();
auto weights = pattern::wrap_type<opset10::Constant>();
Expand Down Expand Up @@ -1117,6 +1126,7 @@ static std::vector<DimsAttr> collect_dims_attrs(const std::vector<dims_vec> dims

class ov::pass::mask_propagation::Reshape : public MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("mask_propagation::Reshape");
Reshape() {
auto inputs = pattern::any_input(pattern::has_static_shape());
auto weights = pattern::any_input();
Expand Down Expand Up @@ -1373,6 +1383,7 @@ class ov::pass::mask_propagation::Reshape : public MatcherPass {

class ov::pass::mask_propagation::Transpose : public MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("mask_propagation::Transpose");
Transpose() {
auto input = pattern::any_input();
auto weights = pattern::any_input();
Expand Down Expand Up @@ -1480,6 +1491,7 @@ static ov::Mask::Ptr create_connect_split_output_mask(ov::Mask::Ptr input_mask,

class ov::pass::mask_propagation::VariadicSplit : public MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("mask_propagation::VariadicSplit");
VariadicSplit() {
auto input_pattern = pattern::any_input(pattern::has_static_rank());
auto axis_pattern = pattern::wrap_type<ov::opset10::Constant>();
Expand Down Expand Up @@ -1547,6 +1559,7 @@ class ov::pass::mask_propagation::VariadicSplit : public MatcherPass {

class ov::pass::mask_propagation::Split : public MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("mask_propagation::Split");
Split() {
auto input_pattern = pattern::any_input(pattern::has_static_rank());
auto axis_pattern = pattern::wrap_type<ov::opset10::Constant>();
Expand Down Expand Up @@ -1597,6 +1610,7 @@ class ov::pass::mask_propagation::Split : public MatcherPass {

class ov::pass::mask_propagation::StopPropagation : public MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("mask_propagation::StopPropagation");
StopPropagation() {
auto any_node = pattern::any_input();

Expand Down Expand Up @@ -1654,6 +1668,7 @@ class ov::pass::mask_propagation::StopPropagation : public MatcherPass {

class ov::pass::mask_propagation::SkipPropagation : public MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("mask_propagation::SkipPropagation");
SkipPropagation() {
// Skip mask propagation for ShapeOf operation to prevent this opearation to be
// processed as stop op.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ namespace pass {
*/
class BroadcastToMoveBroadcast: public ov::pass::MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("snippets::pass::BroadcastToMoveBroadcast");
BroadcastToMoveBroadcast();
};


} // namespace pass
} // namespace snippets
} // namespace ov
} // namespace ov
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace pass {
*/
class TokenizeSnippets: public ov::pass::MatcherPass {
public:
OPENVINO_RTTI("TokenizeSnippets", "0");
OPENVINO_MATCHER_PASS_RTTI("snippets::pass::TokenizeSnippets");
explicit TokenizeSnippets(const SnippetsTokenization::Config& config);

static bool AppropriateForSubgraph(const std::shared_ptr<const Node>&);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CommonOptimizations : public ov::pass::MatcherPass {
friend class SplitDimensionM;

public:
OPENVINO_RTTI("CommonOptimizations", "0");
OPENVINO_MATCHER_PASS_RTTI("snippets::pass::CommonOptimizations");
CommonOptimizations(const SnippetsTokenization::Config& config);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ namespace pass {
*/
class ConvertConstantsToScalars: public ov::pass::MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("snippets::pass::ConvertConstantsToScalars");
ConvertConstantsToScalars();
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ namespace pass {
*/
class ConvertPowerToPowerStatic: public ov::pass::MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("snippets::pass::ConvertPowerToPowerStatic");
ConvertPowerToPowerStatic();
};

} // namespace pass
} // namespace snippets
} // namespace ov
} // namespace ov
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace pass {
*/
class ExplicitTransposeMatMulInputs: public ov::pass::MatcherPass {
public:
OPENVINO_RTTI("ExplicitTransposeMatMulInputs", "0");
OPENVINO_MATCHER_PASS_RTTI("snippets::pass::ExplicitTransposeMatMulInputs");
ExplicitTransposeMatMulInputs();

// Return `True` if all inputs (except 0-th input) have scalar shape. Otherwise returns `False`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace pass {
*/
class ExtractReshapesFromMHA: public ov::pass::MatcherPass {
public:
OPENVINO_RTTI("ExtractReshapesFromMHA", "0");
OPENVINO_MATCHER_PASS_RTTI("snippets::pass::ExtractReshapesFromMHA");
ExtractReshapesFromMHA();
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace pass {
*/
class TokenizeFCSnippets: public ov::pass::MatcherPass {
public:
OPENVINO_RTTI("TokenizeFCSnippets", "0");
OPENVINO_MATCHER_PASS_RTTI("snippets::pass::TokenizeFCSnippets");
TokenizeFCSnippets(const SnippetsTokenization::Config& config);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ namespace pass {

class FakeQuantizeDecomposition : public ov::pass::MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("snippets::pass::FakeQuantizeDecomposition");
FakeQuantizeDecomposition();

static bool getScalesAndShifts(const std::shared_ptr<const ov::op::v0::FakeQuantize>& fq_node,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace pass {
*/
class FuseTransposeBrgemm: public ov::pass::MatcherPass {
public:
OPENVINO_RTTI("FuseTransposeBrgemm", "0");
OPENVINO_MATCHER_PASS_RTTI("snippets::pass::FuseTransposeBrgemm");
FuseTransposeBrgemm();

static bool is_supported_transpose(const Output<Node>& transpose_out);
Expand All @@ -32,4 +32,4 @@ class FuseTransposeBrgemm: public ov::pass::MatcherPass {

} // namespace pass
} // namespace snippets
} // namespace ov
} // namespace ov
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ namespace pass {
*/
class GNDecomposition: public ov::pass::MatcherPass {
public:
OPENVINO_RTTI("GNDecomposition", "0");
OPENVINO_MATCHER_PASS_RTTI("snippets::pass::GNDecomposition");
GNDecomposition();
};

} // namespace pass
} // namespace snippets
} // namespace ov
} // namespace ov
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ namespace pass {
*/
class TokenizeGNSnippets : public ov::pass::MatcherPass {
public:
OPENVINO_RTTI("TokenizeGNSnippets", "0");
OPENVINO_MATCHER_PASS_RTTI("snippets::pass::TokenizeGNSnippets");
TokenizeGNSnippets();
};

} // namespace pass
} // namespace snippets
} // namespace ov
} // namespace ov
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace pass {
*/
class InsertMoveBroadcast: public ov::pass::MatcherPass {
public:
OPENVINO_MATCHER_PASS_RTTI("snippets::pass::InsertMoveBroadcast");
InsertMoveBroadcast();

static Output<ov::Node> BroadcastNodeLastDim(const ov::Output<ov::Node>& value,
Expand Down
Loading
Loading