Reference implementations for Loop and TensorIterator ops (#2978)
authorIvan Tikhonov <ivan.tikhonov@intel.com>
Tue, 10 Nov 2020 12:49:59 +0000 (15:49 +0300)
committerGitHub <noreply@github.com>
Tue, 10 Nov 2020 12:49:59 +0000 (15:49 +0300)
commitc309bb77d2de2770696d7013fbda1d3a7f3bef39
tree0acc9efa577a3451f184fbc461cf63734dd35a0d
parentb6e2cd692bfb5db32f40a13554d1474e9f751f0b
Reference implementations for Loop and TensorIterator ops (#2978)

* 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

* reference implementation for ngraph::function

* update loop reference implementation

* Refactor loop reference implementation

* ngraph codestyle

* Refactoring

* Submodule update

* Skip check for Reduce ops in mkl for scalar cases, support for yolov3

* fix ngraph reader tests

* revert ceiling op, renaming

* Add allias(Ceiling) for Ceil op in mkl

* delete xfails

* fix build

* single layer tests for tensor iterarator

* Refactor TensorIterator and Loop ref impls

* revert dynamic tensor creation, disable some dynamic test cases

* fix warning

* Resolve review remarks

* revert Predefined values in Loop tests

Co-authored-by: Mateusz Bencer <mateusz.bencer@intel.com>
49 files changed:
inference-engine/src/mkldnn_plugin/nodes/list_tbl.hpp
inference-engine/src/mkldnn_plugin/nodes/math.cpp
inference-engine/src/mkldnn_plugin/nodes/mkldnn_reduce_node.cpp
inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/gru_cell.cpp
inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/gru_sequence.cpp
inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/lstm_cell.cpp
inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/lstm_sequence.cpp
inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/reduce_ops.cpp
inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/rnn_cell.cpp
inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/rnn_sequence.cpp
inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/tensor_iterator.cpp [new file with mode: 0644]
inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gru_cell.hpp
inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gru_sequence.hpp
inference-engine/tests/functional/plugin/shared/include/single_layer_tests/loop.hpp
inference-engine/tests/functional/plugin/shared/include/single_layer_tests/lstm_cell.hpp
inference-engine/tests/functional/plugin/shared/include/single_layer_tests/lstm_sequence.hpp
inference-engine/tests/functional/plugin/shared/include/single_layer_tests/rnn_cell.hpp
inference-engine/tests/functional/plugin/shared/include/single_layer_tests/rnn_sequence.hpp
inference-engine/tests/functional/plugin/shared/include/single_layer_tests/tensor_iterator.hpp [new file with mode: 0644]
inference-engine/tests/functional/plugin/shared/src/single_layer_tests/gru_cell.cpp
inference-engine/tests/functional/plugin/shared/src/single_layer_tests/gru_sequence.cpp
inference-engine/tests/functional/plugin/shared/src/single_layer_tests/loop.cpp
inference-engine/tests/functional/plugin/shared/src/single_layer_tests/lstm_cell.cpp
inference-engine/tests/functional/plugin/shared/src/single_layer_tests/lstm_sequence.cpp
inference-engine/tests/functional/plugin/shared/src/single_layer_tests/rnn_cell.cpp
inference-engine/tests/functional/plugin/shared/src/single_layer_tests/rnn_sequence.cpp
inference-engine/tests/functional/plugin/shared/src/single_layer_tests/tensor_iterator.cpp [new file with mode: 0644]
inference-engine/tests/ngraph_functions/include/ngraph_functions/utils/ngraph_helpers.hpp
inference-engine/tests/ngraph_functions/src/utils/ngraph_helpers.cpp
ngraph/core/include/ngraph/op/loop.hpp
ngraph/core/include/ngraph/op/util/sub_graph_base.hpp
ngraph/core/reference/include/ngraph/runtime/reference/function.hpp [new file with mode: 0644]
ngraph/core/reference/include/ngraph/runtime/reference/loop.hpp [new file with mode: 0644]
ngraph/core/reference/include/ngraph/runtime/reference/tensor_iterator.hpp [new file with mode: 0644]
ngraph/core/reference/src/runtime/reference/function.cpp [new file with mode: 0644]
ngraph/core/reference/src/runtime/reference/loop.cpp [new file with mode: 0644]
ngraph/core/reference/src/runtime/reference/tensor_iterator.cpp [new file with mode: 0644]
ngraph/core/src/op/loop.cpp
ngraph/frontend/onnx_import/src/op/loop.cpp
ngraph/python/tests/__init__.py
ngraph/python/tests/test_ngraph/test_ops.py
ngraph/python/tests/test_ngraph/test_ops_unary.py
ngraph/python/tests/test_onnx/test_backend.py
ngraph/test/runtime/interpreter/int_backend.cpp
ngraph/test/runtime/interpreter/int_backend.hpp
ngraph/test/runtime/interpreter/int_executable.cpp
ngraph/test/runtime/interpreter/int_executable.hpp
ngraph/test/runtime/interpreter/opset_int_tbl.hpp
ngraph/test/runtime/interpreter/unit_test.manifest