Commit Graph

4 Commits

Author SHA1 Message Date
Gleb Kazantaev
bd42f09e98 nGraph Transformations refactoring (#931)
This PR introduces next changes:
1. Transformations *_tbl.hpp files were replaced with direct registration in cpp files.
2. Plugins use pass::Manager to call conversion passes.
3. Transformations callback was moved to PassBase class as there is no more need to keep it in separate class
4. All pattern based transformations must be inherited from MatcherPass class. GraphRewrite class will be used only for matchers registration and execution on function.
MatcherPass class adds new features to pattern-based transformations approach:
* Allows to run matcher pass on a single node.
* Operations that were created inside transformation callback can be added to execution list to be available for pattern matching within single GraphRewrite.
5. GraphRewrite MatchClosure was replaced with MatcherPass. So all matchers will be registered as a MatcherPass.
6. Added pass::Manager::clear_state() method to avoid dependency with nodes that no longer belongs to function after replacement.
7.  Some representative transformations were updated to use MatcherPass as an example.
8.  Mul->Add sequence fusion transformation was replaced with LinOpSequenceFusion.
9. Pattern and callback registration code was moved to class c-tors (will be finished for remaining passes in other PR) .
10. Updated pass::Manager to get pass names only when NGRAPH_PROFILE_PASS_ENABLE enabled.
11. Moving towards removing PassProperty.
12. Added ngraph::pattern::wrap_type<T>(inputs, pred) to simplify pattern creation.
13. GraphRewrite was updated to execute MatcherPass more efficient.
2020-07-27 19:47:37 +03:00
Ilya Churaev
5feeab37d4 Use ngraph.hpp in samples and documentation (#1240) 2020-07-09 06:09:28 +03:00
Gleb Kazantaev
b8b8a21dc7 Added nGraph transformations developer guide (#947)
* Added nGraph transformations developer guide

* Added some more chapters

* Added Transformation writing essentials chapter

* Added working with ngraph::Function chapter

* Added two chapters

* Fix comments

* Moved code snippets to source files

* Moved ngraph test utils to common. Added transformations test examples to template plugin

* Added Common mistake section

* Added doxygen for CommoOptimization passes

* Fixed doxygen comments; added links in md files; fixed typos

* Fixed review comments
2020-06-30 18:02:26 +03:00
Alexey Suhov
0064c299c3 add plugin template (#515) 2020-05-22 22:34:00 +03:00