Update of ONNX submodule to v1.10.2 (#8383)

* Update of ONNX submodule to v1.10.0

* Update of ONNX to 1.10.2

* Adaptation of the ONNX FE to ONNX 1.10

* ConstantOfShape XFAIL removal

* SCEL reference model updated to the new ONNX functions expansion behavior

* UnXFAIL more ONNX tests

* UnXFAIL even more ONNX tests
This commit is contained in:
Tomasz Dołbniak 2021-11-09 10:53:34 +01:00 committed by GitHub
parent 2b9b30f6b5
commit 6780dfcba7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 204 additions and 83 deletions

View File

@ -22,7 +22,8 @@ enum Field {
GRAPH = 7,
OPSET_IMPORT = 8,
METADATA_PROPS = 14,
TRAINING_INFO = 20
TRAINING_INFO = 20,
FUNCTIONS = 25
};
enum WireType { VARINT = 0, BITS_64 = 1, LENGTH_DELIMITED = 2, START_GROUP = 3, END_GROUP = 4, BITS_32 = 5 };
@ -46,6 +47,7 @@ bool is_correct_onnx_field(const PbKey& decoded_key) {
{OPSET_IMPORT, LENGTH_DELIMITED},
{METADATA_PROPS, LENGTH_DELIMITED},
{TRAINING_INFO, LENGTH_DELIMITED},
{FUNCTIONS, LENGTH_DELIMITED},
};
if (!onnx_fields.count(static_cast<Field>(decoded_key.first))) {

View File

@ -2,58 +2,80 @@ ir_version: 7
producer_name: "nGraph ONNX Importer"
graph {
node {
output: "Func_SoftmaxCrossEntropyLoss0x557617acabe0axes"
output: "Func_SoftmaxCrossEntropyLoss0x7ffe150df640Shape3D"
op_type: "Constant"
attribute {
name: "value"
t {
dims: 1
dims: 3
data_type: 7
int64_data: 1
int64_data: 0
int64_data: 0
int64_data: -1
}
type: TENSOR
}
domain: ""
}
node {
input: "x"
output: "Func_SoftmaxCrossEntropyLoss0x557617acabe0X_Max"
op_type: "ReduceMax"
input: "Func_SoftmaxCrossEntropyLoss0x7ffe150df640Shape3D"
output: "Func_SoftmaxCrossEntropyLoss0x7ffe150df640X_NCD"
op_type: "Reshape"
domain: ""
}
node {
input: "Func_SoftmaxCrossEntropyLoss0x7ffe150df640X_NCD"
output: "Func_SoftmaxCrossEntropyLoss0x7ffe150df640X_NDC"
op_type: "Transpose"
attribute {
name: "axes"
name: "perm"
ints: 0
ints: 2
ints: 1
type: INTS
}
domain: ""
}
node {
input: "Func_SoftmaxCrossEntropyLoss0x7ffe150df640X_NDC"
output: "Func_SoftmaxCrossEntropyLoss0x7ffe150df640X_LogSM"
op_type: "LogSoftmax"
attribute {
name: "axis"
i: 2
type: INT
}
domain: ""
}
node {
input: "Func_SoftmaxCrossEntropyLoss0x7ffe150df640X_LogSM"
output: "Func_SoftmaxCrossEntropyLoss0x7ffe150df640X_LogSM_NCD"
op_type: "Transpose"
attribute {
name: "perm"
ints: 0
ints: 2
ints: 1
type: INTS
}
domain: ""
}
node {
input: "x"
input: "Func_SoftmaxCrossEntropyLoss0x557617acabe0X_Max"
output: "Func_SoftmaxCrossEntropyLoss0x557617acabe0X_Sub"
op_type: "Sub"
output: "Func_SoftmaxCrossEntropyLoss0x7ffe150df640X_shape"
op_type: "Shape"
domain: ""
}
node {
input: "Func_SoftmaxCrossEntropyLoss0x557617acabe0X_Sub"
output: "Func_SoftmaxCrossEntropyLoss0x557617acabe0X_Exp"
op_type: "Exp"
input: "Func_SoftmaxCrossEntropyLoss0x7ffe150df640X_LogSM_NCD"
input: "Func_SoftmaxCrossEntropyLoss0x7ffe150df640X_shape"
output: "Func_SoftmaxCrossEntropyLoss0x7ffe150df640X_Log"
op_type: "Reshape"
domain: ""
}
node {
input: "Func_SoftmaxCrossEntropyLoss0x557617acabe0X_Exp"
input: "Func_SoftmaxCrossEntropyLoss0x557617acabe0axes"
output: "Func_SoftmaxCrossEntropyLoss0x557617acabe0X_RS"
op_type: "ReduceSum"
}
node {
input: "Func_SoftmaxCrossEntropyLoss0x557617acabe0X_Exp"
input: "Func_SoftmaxCrossEntropyLoss0x557617acabe0X_RS"
output: "Func_SoftmaxCrossEntropyLoss0x557617acabe0X_Div"
op_type: "Div"
}
node {
input: "Func_SoftmaxCrossEntropyLoss0x557617acabe0X_Div"
output: "Func_SoftmaxCrossEntropyLoss0x557617acabe0X_Log"
op_type: "Log"
}
node {
output: "Func_NegativeLogLikelihoodLoss0x557617d1bba0const_zero"
output: "Func_NegativeLogLikelihoodLoss0x7ffe150df640const_zero"
op_type: "Constant"
attribute {
name: "value"
@ -64,9 +86,10 @@ graph {
}
type: TENSOR
}
domain: ""
}
node {
output: "Func_NegativeLogLikelihoodLoss0x557617d1bba0const_one"
output: "Func_NegativeLogLikelihoodLoss0x7ffe150df640const_one"
op_type: "Constant"
attribute {
name: "value"
@ -77,9 +100,10 @@ graph {
}
type: TENSOR
}
domain: ""
}
node {
output: "Func_NegativeLogLikelihoodLoss0x557617d1bba0axes"
output: "Func_NegativeLogLikelihoodLoss0x7ffe150df640axes"
op_type: "Constant"
attribute {
name: "value"
@ -90,45 +114,51 @@ graph {
}
type: TENSOR
}
domain: ""
}
node {
input: "y"
input: "Func_NegativeLogLikelihoodLoss0x557617d1bba0axes"
output: "Func_NegativeLogLikelihoodLoss0x557617d1bba0expanded_target"
input: "Func_NegativeLogLikelihoodLoss0x7ffe150df640axes"
output: "Func_NegativeLogLikelihoodLoss0x7ffe150df640expanded_target"
op_type: "Unsqueeze"
domain: ""
}
node {
input: "Func_SoftmaxCrossEntropyLoss0x557617acabe0X_Log"
input: "Func_NegativeLogLikelihoodLoss0x557617d1bba0expanded_target"
output: "Func_NegativeLogLikelihoodLoss0x557617d1bba0input_gather_element"
input: "Func_SoftmaxCrossEntropyLoss0x7ffe150df640X_Log"
input: "Func_NegativeLogLikelihoodLoss0x7ffe150df640expanded_target"
output: "Func_NegativeLogLikelihoodLoss0x7ffe150df640input_gather_element"
op_type: "GatherElements"
attribute {
name: "axis"
i: 1
type: INT
}
domain: ""
}
node {
input: "Func_NegativeLogLikelihoodLoss0x557617d1bba0input_gather_element"
output: "Func_NegativeLogLikelihoodLoss0x557617d1bba0loss_NCdd"
input: "Func_NegativeLogLikelihoodLoss0x7ffe150df640input_gather_element"
output: "Func_NegativeLogLikelihoodLoss0x7ffe150df640loss_NCdd"
op_type: "Neg"
domain: ""
}
node {
input: "Func_NegativeLogLikelihoodLoss0x557617d1bba0loss_NCdd"
input: "Func_NegativeLogLikelihoodLoss0x557617d1bba0const_zero"
input: "Func_NegativeLogLikelihoodLoss0x557617d1bba0const_one"
input: "Func_NegativeLogLikelihoodLoss0x557617d1bba0const_one"
output: "Func_NegativeLogLikelihoodLoss0x557617d1bba0loss_N1dd"
input: "Func_NegativeLogLikelihoodLoss0x7ffe150df640loss_NCdd"
input: "Func_NegativeLogLikelihoodLoss0x7ffe150df640const_zero"
input: "Func_NegativeLogLikelihoodLoss0x7ffe150df640const_one"
input: "Func_NegativeLogLikelihoodLoss0x7ffe150df640const_one"
output: "Func_NegativeLogLikelihoodLoss0x7ffe150df640loss_N1dd"
op_type: "Slice"
domain: ""
}
node {
input: "Func_NegativeLogLikelihoodLoss0x557617d1bba0loss_N1dd"
input: "Func_NegativeLogLikelihoodLoss0x557617d1bba0axes"
output: "Func_NegativeLogLikelihoodLoss0x557617d1bba0loss_Ndd"
input: "Func_NegativeLogLikelihoodLoss0x7ffe150df640loss_N1dd"
input: "Func_NegativeLogLikelihoodLoss0x7ffe150df640axes"
output: "Func_NegativeLogLikelihoodLoss0x7ffe150df640loss_Ndd"
op_type: "Squeeze"
domain: ""
}
node {
input: "Func_NegativeLogLikelihoodLoss0x557617d1bba0loss_Ndd"
input: "Func_NegativeLogLikelihoodLoss0x7ffe150df640loss_Ndd"
output: "z"
op_type: "ReduceMean"
attribute {
@ -136,6 +166,7 @@ graph {
i: 0
type: INT
}
domain: ""
}
node {
input: "z"
@ -186,6 +217,126 @@ graph {
}
}
}
value_info {
name: "z"
type {
tensor_type {
elem_type: 1
shape {
}
}
}
}
value_info {
name: "Func_SoftmaxCrossEntropyLoss0x7ffe150df640Shape3D"
type {
tensor_type {
elem_type: 7
shape {
dim {
dim_value: 3
}
}
}
}
}
value_info {
name: "Func_SoftmaxCrossEntropyLoss0x7ffe150df640X_NCD"
type {
tensor_type {
elem_type: 1
shape {
dim {
dim_value: 3
}
dim {
dim_value: 5
}
dim {
dim_value: 1
}
}
}
}
}
value_info {
name: "Func_SoftmaxCrossEntropyLoss0x7ffe150df640X_NDC"
type {
tensor_type {
elem_type: 1
shape {
dim {
dim_value: 3
}
dim {
dim_value: 1
}
dim {
dim_value: 5
}
}
}
}
}
value_info {
name: "Func_SoftmaxCrossEntropyLoss0x7ffe150df640X_LogSM"
type {
tensor_type {
elem_type: 1
shape {
dim {
dim_value: 3
}
dim {
dim_value: 1
}
dim {
dim_value: 5
}
}
}
}
}
value_info {
name: "Func_SoftmaxCrossEntropyLoss0x7ffe150df640X_LogSM_NCD"
type {
tensor_type {
elem_type: 1
shape {
dim {
dim_value: 3
}
dim {
dim_value: 5
}
dim {
dim_value: 1
}
}
}
}
}
value_info {
name: "Func_SoftmaxCrossEntropyLoss0x7ffe150df640X_shape"
type {
tensor_type {
elem_type: 7
shape {
dim {
dim_value: 2
}
}
}
}
}
value_info {
name: "Func_SoftmaxCrossEntropyLoss0x7ffe150df640X_Log"
type {
tensor_type {
elem_type: 1
}
}
}
}
opset_import {
version: 13

View File

@ -21,7 +21,7 @@ NGRAPH_TEST(onnx, check_ir_version_support) {
//
// The last step is to also update the details::onnx::contains_onnx_model_keys() function
// in the same file to make sure that prototxt format validation also covers the changes in ONNX
EXPECT_EQ(ONNX_NAMESPACE::Version::IR_VERSION, 7)
EXPECT_EQ(ONNX_NAMESPACE::Version::IR_VERSION, 8)
<< "The IR_VERSION defined in ONNX does not match the version that OpenVINO supports. "
"Please check the source code of this test for details and explanation how to proceed.";
}

View File

@ -108,8 +108,6 @@ xfail_issue_36538 = xfail_test(reason="RuntimeError: Check 'PartialShape::broadc
"/openvino/ngraph/src/ngraph/op/util/elementwise_args.cpp:48:")
xfail_issue_39658 = xfail_test(reason="RuntimeError: Tile operation has a form that is not supported."
" z should be converted to TileIE operation.")
xfail_issue_39659 = xfail_test(reason="RuntimeError: Broadcast operation has a form that is not supported."
" y should be converted to Tile operation.")
xfail_issue_39662 = xfail_test(reason="RuntimeError: 'ScatterElementsUpdate' layer with name 'y' have "
"indices value that points to non-existing output tensor element")

View File

@ -29,7 +29,6 @@ from tests import (
xfail_issue_38734,
xfail_issue_38735,
xfail_issue_39658,
xfail_issue_39659,
xfail_issue_39662,
xfail_issue_44854,
xfail_issue_44858,
@ -139,10 +138,6 @@ tests_expected_to_fail = [
"OnnxBackendNodeModelTest.test_tile_cpu",
"OnnxBackendNodeModelTest.test_tile_precomputed_cpu",
),
(
xfail_issue_39659,
"OnnxBackendNodeModelTest.test_constantofshape_int_shape_zero_cpu",
),
(
xfail_issue_39662,
"OnnxBackendNodeModelTest.test_scatter_elements_with_negative_indices_cpu",
@ -250,15 +245,6 @@ tests_expected_to_fail = [
"OnnxBackendNodeModelTest.test_resize_downsample_scales_cubic_align_corners_cpu",
"OnnxBackendNodeModelTest.test_resize_downsample_scales_cubic_A_n0p5_exclude_outside_cpu",
"OnnxBackendNodeModelTest.test_resize_upsample_scales_cubic_A_n0p5_exclude_outside_cpu",
"OnnxBackendNodeModelTest.test_resize_downsample_sizes_cubic_cpu",
"OnnxBackendNodeModelTest.test_resize_upsample_sizes_nearest_round_prefer_ceil_asymmetric_cpu",
"OnnxBackendNodeModelTest.test_resize_upsample_sizes_nearest_floor_align_corners_cpu",
"OnnxBackendNodeModelTest.test_resize_upsample_sizes_nearest_cpu",
"OnnxBackendNodeModelTest.test_resize_upsample_sizes_nearest_ceil_half_pixel_cpu",
"OnnxBackendNodeModelTest.test_resize_upsample_sizes_cubic_cpu",
"OnnxBackendNodeModelTest.test_resize_downsample_sizes_linear_pytorch_half_pixel_cpu",
"OnnxBackendNodeModelTest.test_resize_downsample_sizes_nearest_cpu",
"OnnxBackendNodeModelTest.test_resize_downsample_sizes_nearest_tf_half_pixel_for_nn_cpu",
),
(
xfail_issue_33581,

View File

@ -114,8 +114,6 @@ xfail_issue_36538 = xfail_test(reason="RuntimeError: Check 'PartialShape::broadc
"/openvino/ngraph/src/ngraph/op/util/elementwise_args.cpp:48:")
xfail_issue_39658 = xfail_test(reason="RuntimeError: Tile operation has a form that is not supported."
" z should be converted to TileIE operation.")
xfail_issue_39659 = xfail_test(reason="RuntimeError: Broadcast operation has a form that is not supported."
" y should be converted to Tile operation.")
xfail_issue_39662 = xfail_test(reason="RuntimeError: 'ScatterElementsUpdate' layer with name 'y' have "
"indices value that points to non-existing output tensor element")

View File

@ -28,7 +28,6 @@ from tests_compatibility import (
xfail_issue_38734,
xfail_issue_38735,
xfail_issue_39658,
xfail_issue_39659,
xfail_issue_39662,
xfail_issue_44854,
xfail_issue_44858,
@ -128,10 +127,6 @@ tests_expected_to_fail = [
"OnnxBackendNodeModelTest.test_tile_cpu",
"OnnxBackendNodeModelTest.test_tile_precomputed_cpu",
),
(
xfail_issue_39659,
"OnnxBackendNodeModelTest.test_constantofshape_int_shape_zero_cpu",
),
(
xfail_issue_39662,
"OnnxBackendNodeModelTest.test_scatter_elements_with_negative_indices_cpu",
@ -239,15 +234,6 @@ tests_expected_to_fail = [
"OnnxBackendNodeModelTest.test_resize_downsample_scales_cubic_align_corners_cpu",
"OnnxBackendNodeModelTest.test_resize_downsample_scales_cubic_A_n0p5_exclude_outside_cpu",
"OnnxBackendNodeModelTest.test_resize_upsample_scales_cubic_A_n0p5_exclude_outside_cpu",
"OnnxBackendNodeModelTest.test_resize_downsample_sizes_cubic_cpu",
"OnnxBackendNodeModelTest.test_resize_upsample_sizes_nearest_round_prefer_ceil_asymmetric_cpu",
"OnnxBackendNodeModelTest.test_resize_upsample_sizes_nearest_floor_align_corners_cpu",
"OnnxBackendNodeModelTest.test_resize_upsample_sizes_nearest_cpu",
"OnnxBackendNodeModelTest.test_resize_upsample_sizes_nearest_ceil_half_pixel_cpu",
"OnnxBackendNodeModelTest.test_resize_upsample_sizes_cubic_cpu",
"OnnxBackendNodeModelTest.test_resize_downsample_sizes_linear_pytorch_half_pixel_cpu",
"OnnxBackendNodeModelTest.test_resize_downsample_sizes_nearest_cpu",
"OnnxBackendNodeModelTest.test_resize_downsample_sizes_nearest_tf_half_pixel_for_nn_cpu",
),
(
xfail_issue_33581,

@ -1 +1 @@
Subproject commit 1089b9e8045a3a2882d7bb6a1dbaeaf9cae131da
Subproject commit da889e6b95750350726d149bf447bf0cd1245964