ONNX Loop (#2847)
authorMateusz Bencer <mateusz.bencer@intel.com>
Thu, 29 Oct 2020 06:51:51 +0000 (07:51 +0100)
committerGitHub <noreply@github.com>
Thu, 29 Oct 2020 06:51:51 +0000 (09:51 +0300)
commit53b865eb58f79f5ba1c57a1f0c7bf4dd2a87fe60
tree580f2a2fbf7f3e2f19c15e739b567db67aba381e
parentc95d8e242de36149790adfda20258b1b44912185
ONNX Loop (#2847)

* Loop op ngraph implementation, update IE IR Reader and ngraph to cnn converter

* refactoring SubGraphOp class

* type prop unit tests

* ngraph code style

* update comment

* single layer tests for Loop operation

* fix file name

* Add SpecialBodyPorts attribute in Loop op, update single layer tests

* first debug version

* more tests

* missing test file

* removed not needed shapes from test data

* move test data to new folder

* shape infer tests

* Added execution tests

* add several new tests cases, strict checks in Loop impl, temporary disable single layer tests

* ngraph codestyle, refactoring, clone_new_args test

* resolve review remarks

* fix build

* fix tests

* more execution tests

* add a new constructor of Loop op, resolve review remarks

* execution tests

* synchro with current version

* handle scalars and more tests

* scalar test enabled

* loop reference impl

* bug fixes in tests, onnx importer part and in the ref implementation of the Loop op

* applied remarks

* handle unsupported cases

* rewrite unit tests

* update INTERPRETER manifest

* is_termination_condition_always_true simplification

* [TEST] update python models tests

* review remarks

* added xfail to tiny_yolov3

* missing model test

* revert test data

* fixed numbers of failing tests

* fixed failed test description

* fix test message

* fix xfail test

* zoo models tests clean-up

* missing comma

Co-authored-by: Ivan Tikhonov <ivan.tikhonov@intel.com>
24 files changed:
ngraph/frontend/onnx_import/src/op/loop.cpp
ngraph/frontend/onnx_import/src/ops_bridge.cpp
ngraph/python/tests/__init__.py
ngraph/python/tests/test_onnx/test_zoo_models.py
ngraph/test/models/onnx/loop/loop_2d_add.prototxt [moved from ngraph/test/models/onnx/loop_2d_add.prototxt with 81% similarity]
ngraph/test/models/onnx/loop/loop_2d_add_cond_and_trip_count_as_inputs.prototxt [new file with mode: 0644]
ngraph/test/models/onnx/loop/loop_2d_add_const_cond.prototxt [moved from ngraph/test/models/onnx/loop_2d_add_const_cond.prototxt with 78% similarity]
ngraph/test/models/onnx/loop/loop_2d_add_const_no_identity_termination_cond.prototxt [new file with mode: 0644]
ngraph/test/models/onnx/loop/loop_2d_add_incorrect_access_body_scope.prototxt [moved from ngraph/test/models/onnx/loop_2d_add_incorrect_access_body_scope.prototxt with 72% similarity]
ngraph/test/models/onnx/loop/loop_2d_add_initializer_from_parent_scope.prototxt [moved from ngraph/test/models/onnx/loop_2d_add_initializer_from_parent_scope.prototxt with 77% similarity]
ngraph/test/models/onnx/loop/loop_2d_add_no_identity_termination_cond.prototxt [moved from ngraph/test/models/onnx/loop_2d_add_no_identity_cond.prototxt with 80% similarity]
ngraph/test/models/onnx/loop/loop_2d_add_no_identity_termination_cond_false.prototxt [new file with mode: 0644]
ngraph/test/models/onnx/loop/loop_2d_add_node_from_parent_scope.prototxt [moved from ngraph/test/models/onnx/loop_2d_add_input_from_parent_scope.prototxt with 71% similarity]
ngraph/test/models/onnx/loop/loop_2d_add_the_same_name.prototxt [moved from ngraph/test/models/onnx/loop_2d_add_the_same_name.prototxt with 78% similarity]
ngraph/test/models/onnx/loop/loop_2d_add_trip_count_and_cond_skipped.prototxt [new file with mode: 0644]
ngraph/test/models/onnx/loop/loop_2d_add_trip_count_dynamic.prototxt [new file with mode: 0644]
ngraph/test/models/onnx/loop/loop_concat_values.prototxt [new file with mode: 0644]
ngraph/test/models/onnx/loop/loop_infinite.prototxt [moved from ngraph/test/models/onnx/loop_2d_add_node_from_parent_scope.prototxt with 64% similarity]
ngraph/test/models/onnx/loop/loop_no_variadic_inputs_and_outputs.prototxt [new file with mode: 0644]
ngraph/test/models/onnx/loop/loop_pow.prototxt [new file with mode: 0644]
ngraph/test/models/onnx/loop/loop_scalars_add.prototxt [moved from ngraph/test/models/onnx/loop_scalars_add.prototxt with 100% similarity]
ngraph/test/onnx/onnx_import_controlflow.in.cpp
ngraph/test/runtime/ie/unit_test.manifest
ngraph/test/runtime/interpreter/unit_test.manifest