Class ov::pass::PassBase

class PassBase

Base class for transformation passes.

Subclassed by ngraph::pass::NodePass, ov::pass::MatcherPass, ov::pass::ModelPass

Public Functions

bool get_property(const PassPropertyMask &prop_mask) const

Check if this pass has all the pass properties.

void set_callback(const param_callback &callback)

Set callback for particular transformation type. This method set global callback. For more details see PassConfig class documentation.

Parameters

callback – lambda function that takes node and returns bool

inline virtual void set_pass_config(const std::shared_ptr<PassConfig> &pass_config)

Set PassConfig for particular transformation instance.

Parameters

pass_config – is a PassConfig shared_ptr

inline std::shared_ptr<PassConfig> get_pass_config()

Allows to access PassConfig shared instance.

Returns

Shared instance of PassConfig class

inline bool transformation_callback(const std::shared_ptr<const Node> &node)

Applies callback for given node. By default callback returns false.

Parameters

node – which will be used inside callback

Returns

result of callback execution for given node