Class ov::pass::Manager#

class Manager#

Manager class allows to manage transformation passes.

Public Functions

template<typename T, bool Enable = true, class ...Args>
inline std::shared_ptr<T> register_pass(Args&&... args)#

Register given transformation class type to execution list Example below show the basic usage of pass::Manager.

pass::Manager manager;
manager.register_pass<MyTransformation>(/* transformation constructor args *&zwj;/);
manager.run_passes(f);
For some purposes transformation can be registered and disabled by default.
manager.register_pass<MyTransformation, false>();

Returns:

shared_ptr to the transformation instance

bool run_passes(const std::shared_ptr<Model> &model)#

Runs registered transformations on a given model.

Parameters:

modelInput model

Returns:

Returns true if the model was changed by transformations, false otherwise.

void set_per_pass_validation(bool new_state)#

Set flag to enable/disable running Validate pass after executing each registered pass.

Parameters:

new_state – Value “true” enables Validate pass run; “false”, otherwise

inline std::shared_ptr<PassConfig> get_pass_config()#
Returns:

PassConfig shared object. This object is used for transformations pipeline configuration. This object allows to disable/enable transformations execution, set callback to particular transformation. For mo details see PassConfig class.