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.
* Implementation of Resize-11
* Added support to sizes input
* Add tests to sizes input
* Added missing comment
* fixed tests
* fixed tests
* Fixed test. part 2.
* review remaks. part 1.
* review remarks. part 2.
Co-authored-by: Tomasz Socha <tomasz.socha@intel.com>
* Added more tests
Co-authored-by: Tomasz Socha <tomasz.socha@intel.com>
* [IE][VPU]: Moves UpgradeNMS4ToNMSDynamic transformation into myriad plugin
* [IE][VPU]: Moves UpgradeNMS4ToNMSDynamic from common to vpu folder
* [IE][VPU]: Moves Dynamic NMS from common folder to vpu
* [VPU]: Makes NMS conversion unconditional
* [VPU][NGraph]: Changes dynamic NMS base class from v3 to v4
* [VPU]: Moves NMS4toDynamic transformation before common optimization
* Try fix parsing error.
* Small exception refinements during importing model.
* More exception refinements.
* Skip segfaulting tests.
* More clear error types and messages. Func rename.
* Fix typo.
* Check on CI whether test_onnx will work.
* Add only those file which pass tests or have failing ones skipped.
* Add mish op to ngraph
* Update mish op
* Set v4 namespase for tests
* Add mish to cmake
* Add comments for mish op.
* Refactoring code style
* Update version to v1 for Mish op
* Add value propogation test for Mish op
* Refactoring mish op according to review
* Fix mish version
* Update cmake file
* Fix mish value propogation unit test
* Add unit test for mish op
Co-authored-by: Your Name <you@example.com>
Previously, if Reshape had input pattern with values [0, -1] - it
propagated dynamic shape through a function. At the same time,
taking "0" and "-1" interpretation into consideration, it turns out
in such cases we could just propagate the same input shape in case of
2D input.
For Faster-RCNN this fix makes static dimensions on dynamic paths static.
Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
* [IE][nGraph]: Introduces PartialShape ctor from values vector
Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
* [IE][VPU][nGraph]: Moves evaluateTargetShape to common utilities
The same functionality - get upper-bound shape estimation for dynamic
input - is needed in dynamic Reshape along with dynamic Broadcast.
Return value type has been changed from PartialShape to vector<int64_t>.
The reason is Reshape encodes special values (0, -1) into input values
that define output shape. Representing those values (which upper-bound
provides evaluateTargetShape) as PartialShape leads to incorrect
representation vector with -1 as dynamic shape - which is not expected.
Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
* [IE][VPU][nGraph]: Introduces StaticShapeReshape
In comparison with original Reshape StaticShapeReshape propagates
upper-bound shape through a function in case of dynamic input. To do so,
shape inference method gets upper-bound shape from evaluateTargetShape,
decodes special values (0, -1) in it and then propagate the result.
Output shape processing happens only once, because if shape inference
were called after ShapeOf operations have been optimized out on dynamic
path, then evaluateTargetShape will require evaluate method for all
operations that appear in function before current Reshape. Since
evaluate method is implemented not for all operations it lead to
Faster-RCNN compilation error.
Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
* [IE][VPU][nGraph]: Updates Reshape DTS on StaticShapeReshape
In case of non-const Reshape input that defines output shape DTS uses
StaticShapeReshape which propagates upper-bound shape evaluated from
this input through a function.
Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
* [IE][VPU][nGraph][Tests]: Refactoring DTS Reshape tests
The only changes are:
* header files include reordering
* indentation/wrapping fixing
Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
* [IE][VPU][nGraph]: Moves ShapeOf transformation out of DTS scope
In comparison with DTS ShapeOf transformation needs to work on whole
function. Separating these 2 transformations makes testing easier since
now it's possible to call specific DTS without ShapeOf transformation
and vice versa.
Also DynamicToStaticShapeOf has been renamed into
EliminateShapeOfAfterDSR since transformation doesn't introduce new DSR
operations.
Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
* [VPU][Tests]: Introduces DTS Reshape tests with non-const pattern
New StaticShapeReshape constructor has been added as well, since test
fixture should create it from reshape parameters, not reshape itself.
Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>