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>
This commit is contained in:
Ivan Tikhonov
2020-11-10 15:49:59 +03:00
committed by GitHub
parent b6e2cd692b
commit c309bb77d2
49 changed files with 1199 additions and 65 deletions

View File

@@ -98,8 +98,6 @@ xfail_issue_36478 = xfail_test(reason="RuntimeError: [NOT_IMPLEMENTED] Input ima
"not supported yet...")
xfail_issue_36480 = xfail_test(reason="RuntimeError: [NOT_FOUND] Unsupported property dummy_option "
"by CPU plugin")
xfail_issue_36483 = xfail_test(reason="RuntimeError: Unsupported primitive of type: "
"Ceiling name: <value>")
xfail_issue_36485 = xfail_test(reason="RuntimeError: Check 'm_group >= 1' failed at "
"/openvino/ngraph/core/src/op/shuffle_channels.cpp:77:")
xfail_issue_36486 = xfail_test(reason="RuntimeError: HardSigmoid operation should be converted "

View File

@@ -20,7 +20,7 @@ import ngraph as ng
from ngraph.impl import AxisSet, Function, Shape, Type
from ngraph.impl.op import Constant, Parameter
from tests.runtime import get_runtime
from tests import xfail_issue_36483, xfail_issue_34323
from tests import xfail_issue_34323
def binary_op(op_str, a, b):
@@ -370,7 +370,6 @@ def test_atanh():
unary_op_exec(op_str, input_list)
@xfail_issue_36483
def test_ceiling():
input_list = [0.5, 0, 0.4, 0.5]
op_str = "Ceiling"

View File

@@ -19,7 +19,7 @@ import pytest
import ngraph as ng
from ngraph.impl import Shape, Type
from tests.test_ngraph.util import run_op_node
from tests import xfail_issue_35929, xfail_issue_36483
from tests import xfail_issue_35929
@xfail_issue_35929
@@ -67,8 +67,8 @@ def test_unary_op_array(ng_api_fn, numpy_fn, range_start, range_end):
pytest.param(ng.acos, np.arccos, np.float32(-0.5)),
pytest.param(ng.asin, np.arcsin, np.float32(-0.5)),
pytest.param(ng.atan, np.arctan, np.float32(-0.5)),
pytest.param(ng.ceiling, np.ceil, np.float32(1.5), marks=xfail_issue_36483),
pytest.param(ng.ceil, np.ceil, np.float32(1.5), marks=xfail_issue_36483),
pytest.param(ng.ceiling, np.ceil, np.float32(1.5)),
pytest.param(ng.ceil, np.ceil, np.float32(1.5)),
pytest.param(ng.cos, np.cos, np.float32(np.pi / 4.0)),
pytest.param(ng.cosh, np.cosh, np.float32(np.pi / 4.0)),
pytest.param(ng.exp, np.exp, np.float32(1.5)),

View File

@@ -38,7 +38,6 @@ from tests import (BACKEND_NAME,
xfail_issue_33616,
xfail_issue_38086,
xfail_issue_38087,
xfail_issue_36483,
xfail_issue_34323,
xfail_issue_35915,
xfail_issue_34310,
@@ -205,9 +204,6 @@ tests_expected_to_fail = [
"OnnxBackendNodeModelTest.test_quantizelinear_cpu"),
(xfail_issue_38087,
"OnnxBackendNodeModelTest.test_convtranspose_1d_cpu"),
(xfail_issue_36483,
"OnnxBackendNodeModelTest.test_ceil_cpu",
"OnnxBackendNodeModelTest.test_ceil_example_cpu"),
(xfail_issue_34323,
"OnnxBackendNodeModelTest.test_constant_cpu",
"OnnxBackendNodeModelTest.test_eyelike_populate_off_main_diagonal_cpu",