Files
openvino/docs/Extensibility_UG/model_pass.md
T
Ilya Churaev 9da124544a Transformation guide (#10628)
* Fixed some comments about transformations

* Changed transformation guide

* Fixed typo

* Moved transformation doc to extensibility

* Moved images to Extensibility_UG

* Added separate document for each pass

* Added see also section

* Fixed comments
2022-03-01 09:03:59 +03:00

18 lines
911 B
Markdown

# OpenVINO Model Pass {#openvino_docs_Extensibility_UG_model_pass}
`ov::pass::ModelPass` is used for transformations that take entire `ov::Model` as an input and process it.
Template for ModelPass transformation class
@snippet src/transformations/template_model_transformation.hpp model_pass:template_transformation_hpp
@snippet src/transformations/template_model_transformation.cpp model_pass:template_transformation_cpp
Using `ov::pass::ModelPass`, you need to override the `run_on_model` method where you will write the transformation code.
Return value is `true` if the original model has changed during transformation (new operation was added, or operations replacement was made, or node attributes were changed); otherwise, it is `false`.
Also `ov::pass::ModelPass` based transformations can be executed via `ov::pass::Manager`.
## See Also
* [OpenVINO™ Transformations](./ov_transformations.md)