From 77b6a3db372e8e6608179c39c9bc6a9d99dba5e5 Mon Sep 17 00:00:00 2001 From: Przemyslaw Wysocki Date: Fri, 19 Apr 2024 15:13:27 +0200 Subject: [PATCH] Bump ONNX to 1.13, Tensorflow to 2.12 and protobuf to 3.20.3 (#23992) ### Details: - Cherry-pick https://github.com/openvinotoolkit/openvino/pull/23990 - Backport https://github.com/openvinotoolkit/openvino/pull/14773 ### Tickets: - N/A --------- Co-authored-by: Anastasia Kuporosova --- .ci/azure/linux.yml | 7 +- .ci/azure/windows.yml | 7 +- src/bindings/python/requirements_test.txt | 4 +- src/bindings/python/tests/__init__.py | 23 ++ .../python/tests/test_onnx/test_backend.py | 209 ++++++++++++++++ .../tests/test_onnx/test_ops_reduction.py | 12 + .../python/tests/test_onnx/test_ops_unary.py | 12 +- .../tests/test_onnx/utils/onnx_backend.py | 12 +- .../tests/test_onnx/utils/onnx_helpers.py | 10 - .../python/tests_compatibility/__init__.py | 23 ++ .../test_onnx/test_backend.py | 231 +++++++++++++++++- .../test_onnx/test_ops_reduction.py | 8 + .../test_onnx/test_ops_unary.py | 12 +- .../test_onnx/utils/onnx_backend.py | 12 +- .../test_onnx/utils/onnx_helpers.py | 11 - src/frontends/onnx/frontend/CMakeLists.txt | 2 +- src/frontends/onnx/tests/requirements.txt | 2 +- .../tensorflow/tests/requirements.txt | 2 +- .../tensorflow_lite/tests/requirements.txt | 2 + .../tests/frontend/shared/src/conversion.cpp | 1 + .../frontend/shared/src/convert_model.cpp | 2 + .../mo_python_api_tests/test_mo_convert_tf.py | 1 + tests/layer_tests/onnx_tests/test_reduce.py | 6 + .../layer_tests/onnx_tests/test_reduce_lp.py | 4 + thirdparty/CMakeLists.txt | 2 +- thirdparty/onnx/CMakeLists.txt | 3 + thirdparty/onnx/onnx | 2 +- thirdparty/open_model_zoo | 2 +- thirdparty/protobuf/protobuf | 2 +- tools/mo/requirements.txt | 6 +- tools/mo/requirements_onnx.txt | 2 +- tools/mo/requirements_tf.txt | 2 +- tools/mo/requirements_tf2.txt | 2 +- tools/pot/setup.py | 2 +- 34 files changed, 572 insertions(+), 68 deletions(-) create mode 100644 src/frontends/tensorflow_lite/tests/requirements.txt diff --git a/.ci/azure/linux.yml b/.ci/azure/linux.yml index eaa30283baae1e..2ffc09a70f8862 100644 --- a/.ci/azure/linux.yml +++ b/.ci/azure/linux.yml @@ -400,9 +400,10 @@ jobs: displayName: 'ONNX Frontend Tests' continueOnError: false - - script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/paddle_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Paddle.xml - displayName: 'Paddle Frontend UT' - continueOnError: false + # TODO Reenable PDPD after paddlepaddle==2.5.0 with compliant protobuf is released (ticket 95904) + # - script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/paddle_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Paddle.xml + # displayName: 'Paddle Frontend UT' + # continueOnError: false - script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ov_tensorflow_frontend_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Tensorflow.xml displayName: 'TensorFlow Frontend Unit Tests' diff --git a/.ci/azure/windows.yml b/.ci/azure/windows.yml index bf95f63ad22619..51340b53e71f7e 100644 --- a/.ci/azure/windows.yml +++ b/.ci/azure/windows.yml @@ -278,9 +278,10 @@ jobs: displayName: 'ONNX Frontend Tests' continueOnError: false - - script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\paddle_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-Paddle.xml - displayName: 'Paddle Frontend UT' - continueOnError: false + # TODO Reenable PDPD after paddlepaddle==2.5.0 with compliant protobuf is released (ticket 95904) + # - script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\paddle_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-Paddle.xml + # displayName: 'Paddle Frontend UT' + # continueOnError: false - script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ov_tensorflow_frontend_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-Tensorflow.xml displayName: 'TensorFlow Frontend Unit Tests' diff --git a/src/bindings/python/requirements_test.txt b/src/bindings/python/requirements_test.txt index 44e8af8d794df4..3b0fcef8c877ed 100644 --- a/src/bindings/python/requirements_test.txt +++ b/src/bindings/python/requirements_test.txt @@ -24,7 +24,7 @@ flake8_commas flake8_pep3101 flake8_quotes mypy -onnx==1.12.0 +onnx==1.13.1 Pep8-naming pydocstyle pytest-forked; platform_system != "Windows" @@ -36,4 +36,4 @@ retrying tox types-pkg_resources wheel>=0.38.1,<=0.41.0 -protobuf~=3.18.1 +protobuf~=3.20.3 diff --git a/src/bindings/python/tests/__init__.py b/src/bindings/python/tests/__init__.py index 24031d9f3623cd..6be1e14f9f1c96 100644 --- a/src/bindings/python/tests/__init__.py +++ b/src/bindings/python/tests/__init__.py @@ -58,6 +58,28 @@ def xfail_test(reason="Mark the test as expected to fail", strict=True): xfail_issue_38706 = xfail_test(reason="RuntimeError: output_3.0 has zero dimension which is not allowed") xfail_issue_38708 = xfail_test(reason="RuntimeError: While validating ONNX node '': " "Axes input must be constant") +xfail_issue_99949 = xfail_test(reason="Bitwise operators are not supported") +xfail_issue_99950 = xfail_test(reason="CenterCropPad func is not supported") +xfail_issue_99952 = xfail_test(reason="Col2Im operator is not supported") +xfail_issue_99954 = xfail_test(reason="Constant Pad - RuntimeError: Shape inference of Reference node with name y failed") +xfail_issue_99955 = xfail_test(reason="GroupNorm is not supported") +xfail_issue_99957 = xfail_test(reason="LayerNorm - RuntimeError: While validating node ''") +xfail_issue_99958 = xfail_test(reason="LogSoftmax - Results mismatch") +xfail_issue_99959 = xfail_test(reason="Mish function is not supported") +xfail_issue_99960 = xfail_test(reason="MVN - Results mismatch") +xfail_issue_99961 = xfail_test(reason="Optional has/get element operators are not supported)'") +xfail_issue_99962 = pytest.mark.skip(reason="ReduceL1/L2 - Unrecognized attribute: axes for operator ReduceL1/L2") +xfail_issue_99968 = xfail_test(reason="ReduceL1/L2 - Results mismatch or unsupported ReduceSum with " + "dynamic rank by CPU plugin") +xfail_issue_99969 = xfail_test(reason="Resize - Results mismatch / " + "RuntimeError: While validating ONNX node '' / " + "RuntimeError: Check '(false)' failed at onnx/frontend/src/op/resize.cpp") +xfail_issue_99970 = xfail_test(reason="Scatter and ScatterND - RuntimeError: Check '(reduction == none)' failed at " + "src/frontends/onnx/frontend/src/op/scatter_elements.cpp OR at " + "src/frontends/onnx/frontend/src/op/scatter_nd") +xfail_issue_99972 = xfail_test(reason="Softmax - Results mismatch") +xfail_issue_99973 = xfail_test(reason="Split - RuntimeError: While validating ONNX node " + "''") xfail_issue_38710 = xfail_test(reason="RuntimeError: data has zero dimension which is not allowed") xfail_issue_38713 = xfail_test(reason="RuntimeError: OV does not support the following ONNX operations: " "ai.onnx.preview.training.Momentum") @@ -135,3 +157,4 @@ def xfail_test(reason="Mark the test as expected to fail", strict=True): xfail_issue_86911 = xfail_test(reason="LSTM_Seq_len_unpacked - AssertionError: zoo models results mismatch") xfail_issue_91151 = xfail_test(reason="RuntimeError: model input (shape={3,4}) and blob (shape=(1)) are incompatible") xfail_issue_91490 = xfail_test(reason="y has zero dimension which is not allowed") +xfail_issue_101965 = xfail_test(reason="Mismatch with numpy-based expected results.") diff --git a/src/bindings/python/tests/test_onnx/test_backend.py b/src/bindings/python/tests/test_onnx/test_backend.py index 7c8a6c13c15daf..ce2c3ac763fe4c 100644 --- a/src/bindings/python/tests/test_onnx/test_backend.py +++ b/src/bindings/python/tests/test_onnx/test_backend.py @@ -49,6 +49,22 @@ xfail_issue_90649, xfail_issue_91151, xfail_issue_91490, + xfail_issue_99949, + xfail_issue_99950, + xfail_issue_99952, + xfail_issue_99954, + xfail_issue_99955, + xfail_issue_99957, + xfail_issue_99958, + xfail_issue_99959, + xfail_issue_99960, + xfail_issue_99961, + xfail_issue_99968, + xfail_issue_99969, + xfail_issue_99970, + xfail_issue_99972, + xfail_issue_99973, + xfail_issue_101965, ) from tests.test_onnx.utils.onnx_backend import OpenVinoTestBackend @@ -399,6 +415,199 @@ def expect_fail(test_case_path, xfail): # type: (str) -> None "OnnxBackendNodeModelTest.test_castlike_BFLOAT16_to_FLOAT_cpu", "OnnxBackendNodeModelTest.test_castlike_FLOAT_to_BFLOAT16_cpu", ), + ( + xfail_issue_99949, + "OnnxBackendNodeModelTest.test_bitwise_and_i16_3d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_and_i32_2d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_and_ui64_bcast_3v1d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_not_2d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_not_3d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_not_4d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_or_i16_4d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_or_i32_2d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_or_ui64_bcast_3v1d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_xor_ui8_bcast_4v3d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_xor_i16_3d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_xor_i32_2d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_and_ui8_bcast_4v3d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_or_ui8_bcast_4v3d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_xor_ui64_bcast_3v1d_cpu", + ), + ( + xfail_issue_99950, + "OnnxBackendNodeModelTest.test_center_crop_pad_crop_and_pad_cpu", + "OnnxBackendNodeModelTest.test_center_crop_pad_crop_axes_chw_cpu", + "OnnxBackendNodeModelTest.test_center_crop_pad_crop_axes_chw_expanded_cpu", + "OnnxBackendNodeModelTest.test_center_crop_pad_crop_axes_hwc_cpu", + "OnnxBackendNodeModelTest.test_center_crop_pad_crop_axes_hwc_expanded_cpu", + "OnnxBackendNodeModelTest.test_center_crop_pad_crop_cpu", + "OnnxBackendNodeModelTest.test_center_crop_pad_pad_cpu", + ), + ( + xfail_issue_99952, + "OnnxBackendNodeModelTest.test_col2im_5d_cpu", + "OnnxBackendNodeModelTest.test_col2im_cpu", + "OnnxBackendNodeModelTest.test_col2im_dilations_cpu", + "OnnxBackendNodeModelTest.test_col2im_pads_cpu", + "OnnxBackendNodeModelTest.test_col2im_strides_cpu", + ), + ( + xfail_issue_99954, + "OnnxBackendNodeModelTest.test_constant_pad_axes_cpu", + ), + ( + xfail_issue_99955, + "OnnxBackendNodeModelTest.test_group_normalization_epsilon_cpu", + "OnnxBackendNodeModelTest.test_group_normalization_epsilon_expanded_cpu", + "OnnxBackendNodeModelTest.test_group_normalization_example_cpu", + "OnnxBackendNodeModelTest.test_group_normalization_example_expanded_cpu", + ), + ( + xfail_issue_99957, + "OnnxBackendNodeModelTest.test_layer_normalization_2d_axis1_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_2d_axis_negative_1_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_3d_axis1_epsilon_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_3d_axis2_epsilon_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_3d_axis_negative_1_epsilon_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_3d_axis_negative_2_epsilon_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_4d_axis1_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_4d_axis2_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_4d_axis3_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_4d_axis_negative_1_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_4d_axis_negative_2_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_4d_axis_negative_3_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_default_axis_expanded_ver18_cpu", + ), + ( + xfail_issue_99958, + "OnnxBackendNodeModelTest.test_logsoftmax_large_number_expanded_ver18_cpu", + ), + ( + xfail_issue_99959, + "OnnxBackendNodeModelTest.test_mish_cpu", + ), + ( + xfail_issue_99960, + "OnnxBackendNodeModelTest.test_mvn_expanded_ver18_cpu", + ), + ( + xfail_issue_99961, + "OnnxBackendNodeModelTest.test_optional_get_element_optional_sequence_cpu", + "OnnxBackendNodeModelTest.test_optional_get_element_optional_tensor_cpu", + "OnnxBackendNodeModelTest.test_optional_get_element_tensor_cpu", + "OnnxBackendNodeModelTest.test_optional_has_element_empty_no_input_name_optional_input_cpu", + "OnnxBackendNodeModelTest.test_optional_has_element_empty_no_input_name_tensor_input_cpu", + "OnnxBackendNodeModelTest.test_optional_has_element_empty_no_input_optional_input_cpu", + "OnnxBackendNodeModelTest.test_optional_has_element_empty_no_input_tensor_input_cpu", + "OnnxBackendNodeModelTest.test_optional_has_element_empty_optional_input_cpu", + "OnnxBackendNodeModelTest.test_optional_has_element_optional_input_cpu", + "OnnxBackendNodeModelTest.test_optional_has_element_tensor_input_cpu", + ), + ( + xfail_issue_99968, + "OnnxBackendNodeModelTest.test_reduce_l1_do_not_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_l1_do_not_keepdims_example_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_l1_do_not_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_l1_do_not_keepdims_random_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_l1_keep_dims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_l1_keep_dims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_l1_negative_axes_keep_dims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_l1_negative_axes_keep_dims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_l2_do_not_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_l2_do_not_keepdims_example_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_l2_do_not_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_l2_do_not_keepdims_random_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_l2_keep_dims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_l2_keep_dims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_l2_negative_axes_keep_dims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_l2_negative_axes_keep_dims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_asc_axes_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_asc_axes_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_desc_axes_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_desc_axes_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_exp_do_not_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_exp_do_not_keepdims_example_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_exp_do_not_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_exp_do_not_keepdims_random_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_l1_do_not_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_exp_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_exp_negative_axes_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_exp_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_negative_axes_cpu", + "OnnxBackendNodeModelTest.test_reduce_max_do_not_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_max_do_not_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_max_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_max_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_max_negative_axes_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_max_negative_axes_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_mean_do_not_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_exp_negative_axes_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_mean_do_not_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_mean_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_mean_negative_axes_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_mean_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_mean_negative_axes_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_min_do_not_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_min_do_not_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_min_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_min_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_min_negative_axes_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_min_negative_axes_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_prod_do_not_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_prod_do_not_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_prod_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_prod_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_prod_negative_axes_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_prod_negative_axes_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_square_do_not_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_square_do_not_keepdims_example_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_square_do_not_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_square_do_not_keepdims_random_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_square_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_square_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_square_negative_axes_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_square_negative_axes_keepdims_random_cpu", + ), + ( + xfail_issue_99969, + "OnnxBackendNodeModelTest.test_resize_downsample_scales_cubic_antialias_cpu", + "OnnxBackendNodeModelTest.test_resize_downsample_scales_linear_antialias_cpu", + "OnnxBackendNodeModelTest.test_resize_downsample_sizes_cubic_antialias_cpu", + "OnnxBackendNodeModelTest.test_resize_downsample_sizes_linear_antialias_cpu", + "OnnxBackendNodeModelTest.test_resize_downsample_sizes_nearest_not_smaller_cpu", + "OnnxBackendNodeModelTest.test_resize_downsample_sizes_nearest_not_larger_cpu", + "OnnxBackendNodeModelTest.test_resize_tf_crop_and_resize_axes_2_3_cpu", + "OnnxBackendNodeModelTest.test_resize_tf_crop_and_resize_axes_3_2_cpu", + "OnnxBackendNodeModelTest.test_resize_upsample_scales_nearest_axes_2_3_cpu", + "OnnxBackendNodeModelTest.test_resize_upsample_scales_nearest_axes_3_2_cpu", + "OnnxBackendNodeModelTest.test_resize_upsample_sizes_nearest_axes_2_3_cpu", + "OnnxBackendNodeModelTest.test_resize_upsample_sizes_nearest_axes_3_2_cpu", + "OnnxBackendNodeModelTest.test_resize_upsample_sizes_nearest_not_larger_cpu", + ), + ( + xfail_issue_99970, + "OnnxBackendNodeModelTest.test_scatter_elements_with_reduction_max_cpu", + "OnnxBackendNodeModelTest.test_scatter_elements_with_reduction_min_cpu", + "OnnxBackendNodeModelTest.test_scatternd_max_cpu", + "OnnxBackendNodeModelTest.test_scatternd_min_cpu", + ), + ( + xfail_issue_99972, + "OnnxBackendNodeModelTest.test_softmax_large_number_expanded_ver18_cpu", + ), + ( + xfail_issue_99973, + "OnnxBackendNodeModelTest.test_split_1d_uneven_split_opset18_cpu", + "OnnxBackendNodeModelTest.test_split_2d_uneven_split_opset18_cpu", + "OnnxBackendNodeModelTest.test_split_zero_size_splits_opset13_cpu", + "OnnxBackendNodeModelTest.test_split_zero_size_splits_opset18_cpu", + ), + ( + xfail_issue_101965, + "OnnxBackendNodeModelTest.test_dft_axis_cpu", + "OnnxBackendNodeModelTest.test_dft_cpu", + "OnnxBackendNodeModelTest.test_dft_inverse_cpu", + ), ] for test_group in tests_expected_to_fail: diff --git a/src/bindings/python/tests/test_onnx/test_ops_reduction.py b/src/bindings/python/tests/test_onnx/test_ops_reduction.py index f9fe00ddb43fcb..9d2a06e9042b6b 100644 --- a/src/bindings/python/tests/test_onnx/test_ops_reduction.py +++ b/src/bindings/python/tests/test_onnx/test_ops_reduction.py @@ -6,6 +6,7 @@ import onnx import pytest +from tests import xfail_issue_99962 from tests.runtime import get_runtime from tests.test_onnx.utils import ( run_node, @@ -80,6 +81,7 @@ def test_reduce_operation_keepdims_none_axes(operation, ref_operation): @pytest.mark.parametrize(("operation", "ref_operation"), reduce_operation_parameters_as_attr) @pytest.mark.parametrize("axes", reduce_axis_parameters) +@xfail_issue_99962 def test_reduce_operation_keepdims_with_axes_as_attr(operation, ref_operation, axes): assert np.array_equal(import_and_compute(operation, reduce_data, axes=axes, keepdims=True), ref_operation(reduce_data, keepdims=True, axis=axes)) @@ -102,6 +104,7 @@ def test_reduce_operation_keepdims_with_axes_as_const(operation, ref_operation, (1, 2), (0, 1, 2)]) @pytest.mark.parametrize(("operation", "ref_operation"), reduce_operation_parameters_as_attr) +@xfail_issue_99962 def test_reduce_operation_no_keepdims_axes_as_attr(operation, ref_operation, axes): if axes: assert np.array_equal(import_and_compute(operation, reduce_data, axes=axes, keepdims=False), @@ -133,6 +136,7 @@ def test_reduce_operation_no_keepdims_axes_as_const(operation, ref_operation, ax ref_operation(reduce_data, keepdims=False)) +@xfail_issue_99962 @pytest.mark.parametrize("reduction_axes", [(0,), (0, 2), (0, 1, 2)]) def test_reduce_l1(reduction_axes): shape = [2, 4, 3, 2] @@ -152,6 +156,7 @@ def test_reduce_l1(reduction_axes): assert np.allclose(expected, graph_result) +@xfail_issue_99962 def test_reduce_l1_default_axes(): shape = [2, 4, 3, 2] np.random.seed(133391) @@ -170,6 +175,7 @@ def test_reduce_l1_default_axes(): assert np.allclose(expected, graph_result) +@xfail_issue_99962 @pytest.mark.parametrize("reduction_axes", [(0,), (0, 2), (0, 1, 2)]) def test_reduce_l2(reduction_axes): shape = [2, 4, 3, 2] @@ -190,6 +196,7 @@ def test_reduce_l2(reduction_axes): assert np.allclose(expected, graph_result) +@xfail_issue_99962 def test_reduce_l2_default_axes(): shape = [2, 4, 3, 2] np.random.seed(133391) @@ -208,6 +215,7 @@ def test_reduce_l2_default_axes(): assert np.allclose(expected, graph_result) +@xfail_issue_99962 @pytest.mark.parametrize("reduction_axes", [(0,), (0, 2), (0, 1, 2)]) def test_reduce_log_sum(reduction_axes): shape = [2, 4, 3, 2] @@ -227,6 +235,7 @@ def test_reduce_log_sum(reduction_axes): assert np.allclose(expected, graph_result) +@xfail_issue_99962 def test_reduce_log_sum_default_axes(): shape = [2, 4, 3, 2] np.random.seed(133391) @@ -245,6 +254,7 @@ def test_reduce_log_sum_default_axes(): assert np.allclose(expected, graph_result) +@xfail_issue_99962 def test_reduce_log_sum_exp(): def logsumexp(data, axis=None, keepdims=True): return np.log(np.sum(np.exp(data), axis=axis, keepdims=keepdims)) @@ -276,6 +286,7 @@ def logsumexp(data, axis=None, keepdims=True): ) +@xfail_issue_99962 @pytest.mark.parametrize("reduction_axes", [(0,), (0, 2), (0, 1, 2)]) def test_reduce_sum_square(reduction_axes): shape = [2, 4, 3, 2] @@ -295,6 +306,7 @@ def test_reduce_sum_square(reduction_axes): assert np.allclose(expected, graph_result) +@xfail_issue_99962 def test_reduce_sum_square_default_axes(): shape = [2, 4, 3, 2] np.random.seed(133391) diff --git a/src/bindings/python/tests/test_onnx/test_ops_unary.py b/src/bindings/python/tests/test_onnx/test_ops_unary.py index f02110e3771ab2..847009cbc769f8 100644 --- a/src/bindings/python/tests/test_onnx/test_ops_unary.py +++ b/src/bindings/python/tests/test_onnx/test_ops_unary.py @@ -327,7 +327,7 @@ def test_identity(): def test_cast_to_bool(val_type, input_data): expected = np.array(input_data, dtype=val_type) - model = get_node_model("Cast", input_data, opset=6, to=onnx.mapping.NP_TYPE_TO_TENSOR_TYPE[val_type]) + model = get_node_model("Cast", input_data, opset=6, to=onnx.helper.np_dtype_to_tensor_dtype(val_type)) result = run_model(model, [input_data]) assert np.allclose(result, expected) @@ -344,7 +344,7 @@ def test_cast_to_float(val_type, range_start, range_end, in_dtype): input_data = np.random.randint(range_start, range_end, size=(2, 2), dtype=in_dtype) expected = np.array(input_data, dtype=val_type) - model = get_node_model("Cast", input_data, opset=6, to=onnx.mapping.NP_TYPE_TO_TENSOR_TYPE[val_type]) + model = get_node_model("Cast", input_data, opset=6, to=onnx.helper.np_dtype_to_tensor_dtype(val_type)) result = run_model(model, [input_data]) assert np.allclose(result, expected) @@ -361,7 +361,7 @@ def test_cast_to_int(val_type): input_data = np.ceil(-8 + random_data).astype(val_type) expected = np.array(input_data, dtype=val_type) - model = get_node_model("Cast", input_data, opset=6, to=onnx.mapping.NP_TYPE_TO_TENSOR_TYPE[val_type]) + model = get_node_model("Cast", input_data, opset=6, to=onnx.helper.np_dtype_to_tensor_dtype(val_type)) result = run_model(model, [input_data]) assert np.allclose(result, expected) @@ -374,7 +374,7 @@ def test_cast_to_uint(val_type): input_data = np.ceil(np.random.rand(2, 3, 4) * 16).astype(val_type) expected = np.array(input_data, dtype=val_type) - model = get_node_model("Cast", input_data, opset=6, to=onnx.mapping.NP_TYPE_TO_TENSOR_TYPE[val_type]) + model = get_node_model("Cast", input_data, opset=6, to=onnx.helper.np_dtype_to_tensor_dtype(val_type)) result = run_model(model, [input_data]) assert np.allclose(result, expected) @@ -449,7 +449,7 @@ def test_constant(value_type): outputs=["values"], value=onnx.helper.make_tensor( name="const_tensor", - data_type=onnx.mapping.NP_TYPE_TO_TENSOR_TYPE[np.dtype(value_type)], + data_type=onnx.helper.np_dtype_to_tensor_dtype(np.dtype(value_type)), dims=values.shape, vals=values.flatten(), ), @@ -467,7 +467,7 @@ def test_constant_err(): outputs=["values"], value=onnx.helper.make_tensor( name="const_tensor", - data_type=onnx.mapping.NP_TYPE_TO_TENSOR_TYPE[np.dtype(np.float16)], + data_type=onnx.helper.np_dtype_to_tensor_dtype(np.dtype(np.float16)), dims=values.shape, vals=values.flatten(), ), diff --git a/src/bindings/python/tests/test_onnx/utils/onnx_backend.py b/src/bindings/python/tests/test_onnx/utils/onnx_backend.py index 11609f5308d035..eb7e37e225f95f 100644 --- a/src/bindings/python/tests/test_onnx/utils/onnx_backend.py +++ b/src/bindings/python/tests/test_onnx/utils/onnx_backend.py @@ -13,11 +13,11 @@ import numpy import onnx from onnx.backend.base import Backend, BackendRep -from onnx.helper import make_graph, make_model, make_tensor_value_info +from onnx.helper import make_graph, make_model, make_tensor_value_info, np_dtype_to_tensor_dtype from openvino.runtime import Model from tests.runtime import get_runtime -from tests.test_onnx.utils.onnx_helpers import import_onnx_model, np_dtype_to_tensor_type +from tests.test_onnx.utils.onnx_helpers import import_onnx_model class OpenVinoOnnxBackendRep(BackendRep): @@ -80,15 +80,15 @@ def run_node( ): # type: (...) -> Optional[Tuple[Any, ...]] """Prepare and run a computation on an ONNX node.""" # default values for input/output tensors - input_tensor_types = [np_dtype_to_tensor_type(node_input.dtype) for node_input in inputs] - output_tensor_types = [onnx.TensorProto.FLOAT for idx in range(len(node.output))] + input_tensor_types = [np_dtype_to_tensor_dtype(node_input.dtype) for node_input in inputs] + output_tensor_types = [onnx.TensorProto.FLOAT for _ in range(len(node.output))] output_tensor_shapes = [()] # type: List[Tuple[int, ...]] if outputs_info is not None: output_tensor_types = [ - np_dtype_to_tensor_type(dtype) for (dtype, shape) in outputs_info + np_dtype_to_tensor_dtype(dtype) for (dtype, _) in outputs_info ] - output_tensor_shapes = [shape for (dtype, shape) in outputs_info] + output_tensor_shapes = [shape for (_, shape) in outputs_info] input_tensors = [ make_tensor_value_info(name, tensor_type, value.shape) diff --git a/src/bindings/python/tests/test_onnx/utils/onnx_helpers.py b/src/bindings/python/tests/test_onnx/utils/onnx_helpers.py index 061e7912e26680..15970e5d43a514 100644 --- a/src/bindings/python/tests/test_onnx/utils/onnx_helpers.py +++ b/src/bindings/python/tests/test_onnx/utils/onnx_helpers.py @@ -4,20 +4,10 @@ import numpy as np import onnx -from onnx.mapping import NP_TYPE_TO_TENSOR_TYPE from openvino.runtime import Core, Tensor, Model -def np_dtype_to_tensor_type(data_type: np.dtype) -> int: - """Return TensorProto type for provided numpy dtype. - - :param data_type: Numpy data type object. - :return: TensorProto.DataType enum value for corresponding type. - """ - return NP_TYPE_TO_TENSOR_TYPE[data_type] - - def import_onnx_model(model: onnx.ModelProto) -> Model: onnx.checker.check_model(model) model_byte_string = model.SerializeToString() diff --git a/src/bindings/python/tests_compatibility/__init__.py b/src/bindings/python/tests_compatibility/__init__.py index 7223a6e346d66f..150017007aa76c 100644 --- a/src/bindings/python/tests_compatibility/__init__.py +++ b/src/bindings/python/tests_compatibility/__init__.py @@ -86,6 +86,28 @@ def xfail_test(reason="Mark the test as expected to fail", strict=True): xfail_issue_47323 = xfail_test(reason="RuntimeError: The plugin does not support FP64") xfail_issue_73538 = xfail_test(reason="OneHot: Unsupported negative indices, " "AssertionError: Mismatched elements.") +xfail_issue_99949 = xfail_test(reason="Bitwise operators are not supported") +xfail_issue_99950 = xfail_test(reason="CenterCropPad func is not supported") +xfail_issue_99952 = xfail_test(reason="Col2Im operator is not supported") +xfail_issue_99954 = xfail_test(reason="Constant Pad - RuntimeError: Shape inference of Reference node with name y failed") +xfail_issue_99955 = xfail_test(reason="GroupNorm is not supported") +xfail_issue_99957 = xfail_test(reason="LayerNorm - RuntimeError: While validating node ''") +xfail_issue_99958 = xfail_test(reason="LogSoftmax - Results mismatch") +xfail_issue_99959 = xfail_test(reason="Mish function is not supported") +xfail_issue_99960 = xfail_test(reason="MVN - Results mismatch") +xfail_issue_99961 = xfail_test(reason="Optional has/get element operators are not supported)'") +xfail_issue_99962 = pytest.mark.skip(reason="ReduceL1/L2 - Unrecognized attribute: axes for operator ReduceL1/L2") +xfail_issue_99968 = xfail_test(reason="ReduceL1/L2 - Results mismatch or unsupported ReduceSum with " + "dynamic rank by CPU plugin") +xfail_issue_99969 = xfail_test(reason="Resize - Results mismatch / " + "RuntimeError: While validating ONNX node '' / " + "RuntimeError: Check '(false)' failed at onnx/frontend/src/op/resize.cpp") +xfail_issue_99970 = xfail_test(reason="Scatter and ScatterND - RuntimeError: Check '(reduction == none)' failed at " + "src/frontends/onnx/frontend/src/op/scatter_elements.cpp OR at " + "src/frontends/onnx/frontend/src/op/scatter_nd") +xfail_issue_99972 = xfail_test(reason="Softmax - Results mismatch") +xfail_issue_99973 = xfail_test(reason="Split - RuntimeError: While validating ONNX node " + "''") # Model MSFT issues: xfail_issue_37957 = xfail_test(reason="RuntimeError: nGraph does not support the following ONNX operations: " @@ -137,6 +159,7 @@ def xfail_test(reason="Mark the test as expected to fail", strict=True): xfail_issue_82038 = xfail_test(reason="ScatterElements, ScatterND, AssertionError: Result mismatch") xfail_issue_82039 = xfail_test(reason="Unsupported data type Optional, RuntimeError: [ NOT_IMPLEMENTED ] " "CPU plugin: Input image format UNSPECIFIED is not supported yet...") +xfail_issue_101965 = xfail_test(reason="Mismatch with numpy-based expected results.") xfail_issue_90649 = xfail_test(reason="RuntimeError: OV does not support the following ONNX operations:" "BlackmanWindow, DFT, HammingWindow, HannWindow, LayerNormalization, " "MelWeightMatrix, SequenceMap, STFT") diff --git a/src/bindings/python/tests_compatibility/test_onnx/test_backend.py b/src/bindings/python/tests_compatibility/test_onnx/test_backend.py index 086f66d235e4ba..d778f9260abc4e 100644 --- a/src/bindings/python/tests_compatibility/test_onnx/test_backend.py +++ b/src/bindings/python/tests_compatibility/test_onnx/test_backend.py @@ -50,6 +50,22 @@ xfail_issue_90649, xfail_issue_91151, xfail_issue_91490, + xfail_issue_101965, + xfail_issue_99949, + xfail_issue_99950, + xfail_issue_99952, + xfail_issue_99954, + xfail_issue_99955, + xfail_issue_99957, + xfail_issue_99958, + xfail_issue_99959, + xfail_issue_99960, + xfail_issue_99961, + xfail_issue_99968, + xfail_issue_99969, + xfail_issue_99970, + xfail_issue_99972, + xfail_issue_99973, skip_dynamic_model, ) from tests_compatibility.test_onnx.utils.onnx_backend import OpenVinoTestBackend @@ -495,7 +511,220 @@ def expect_fail(test_case_path, xfail): # type: (str) -> None "OnnxBackendNodeModelTest.test_hammingwindow_symmetric_expanded_cpu", "OnnxBackendNodeModelTest.test_hannwindow_expanded_cpu", "OnnxBackendNodeModelTest.test_hannwindow_symmetric_expanded_cpu", - ) + "OnnxBackendNodeModelTest.test_center_crop_pad_crop_and_pad_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_l1_keep_dims_example_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_l1_keep_dims_random_expanded_cpu", + "OnnxBackendNodeModelTest.test_center_crop_pad_crop_expanded_cpu", + "OnnxBackendNodeModelTest.test_center_crop_pad_pad_expanded_cpu", + "OnnxBackendNodeModelTest.test_split_variable_parts_1d_opset13_cpu", + "OnnxBackendNodeModelTest.test_split_variable_parts_1d_opset18_cpu", + "OnnxBackendNodeModelTest.test_split_variable_parts_2d_opset13_cpu", + "OnnxBackendNodeModelTest.test_split_variable_parts_2d_opset18_cpu", + "OnnxBackendNodeModelTest.test_split_variable_parts_default_axis_opset13_cpu", + "OnnxBackendNodeModelTest.test_split_variable_parts_default_axis_opset18_cpu", + "OnnxBackendNodeModelTest.test_reduce_l2_keep_dims_example_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_l2_keep_dims_random_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_exp_keepdims_example_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_exp_keepdims_random_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_negative_axes_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_square_keepdims_example_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_square_keepdims_random_expanded_cpu", + ), + ( + xfail_issue_99949, + "OnnxBackendNodeModelTest.test_bitwise_and_i16_3d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_and_i32_2d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_and_ui64_bcast_3v1d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_not_2d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_not_3d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_not_4d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_or_i16_4d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_or_i32_2d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_or_ui64_bcast_3v1d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_xor_ui8_bcast_4v3d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_xor_i16_3d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_xor_i32_2d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_and_ui8_bcast_4v3d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_or_ui8_bcast_4v3d_cpu", + "OnnxBackendNodeModelTest.test_bitwise_xor_ui64_bcast_3v1d_cpu", + ), + ( + xfail_issue_99950, + "OnnxBackendNodeModelTest.test_center_crop_pad_crop_and_pad_cpu", + "OnnxBackendNodeModelTest.test_center_crop_pad_crop_axes_chw_cpu", + "OnnxBackendNodeModelTest.test_center_crop_pad_crop_axes_chw_expanded_cpu", + "OnnxBackendNodeModelTest.test_center_crop_pad_crop_axes_hwc_cpu", + "OnnxBackendNodeModelTest.test_center_crop_pad_crop_axes_hwc_expanded_cpu", + "OnnxBackendNodeModelTest.test_center_crop_pad_crop_cpu", + "OnnxBackendNodeModelTest.test_center_crop_pad_pad_cpu", + ), + ( + xfail_issue_99952, + "OnnxBackendNodeModelTest.test_col2im_5d_cpu", + "OnnxBackendNodeModelTest.test_col2im_cpu", + "OnnxBackendNodeModelTest.test_col2im_dilations_cpu", + "OnnxBackendNodeModelTest.test_col2im_pads_cpu", + "OnnxBackendNodeModelTest.test_col2im_strides_cpu", + ), + ( + xfail_issue_99954, + "OnnxBackendNodeModelTest.test_constant_pad_axes_cpu", + ), + ( + xfail_issue_99955, + "OnnxBackendNodeModelTest.test_group_normalization_epsilon_cpu", + "OnnxBackendNodeModelTest.test_group_normalization_epsilon_expanded_cpu", + "OnnxBackendNodeModelTest.test_group_normalization_example_cpu", + "OnnxBackendNodeModelTest.test_group_normalization_example_expanded_cpu", + ), + ( + xfail_issue_99957, + "OnnxBackendNodeModelTest.test_layer_normalization_2d_axis1_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_2d_axis_negative_1_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_3d_axis1_epsilon_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_3d_axis2_epsilon_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_3d_axis_negative_1_epsilon_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_3d_axis_negative_2_epsilon_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_4d_axis1_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_4d_axis2_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_4d_axis3_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_4d_axis_negative_1_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_4d_axis_negative_2_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_4d_axis_negative_3_expanded_ver18_cpu", + "OnnxBackendNodeModelTest.test_layer_normalization_default_axis_expanded_ver18_cpu", + ), + ( + xfail_issue_99958, + "OnnxBackendNodeModelTest.test_logsoftmax_large_number_expanded_ver18_cpu", + ), + ( + xfail_issue_99959, + "OnnxBackendNodeModelTest.test_mish_cpu", + ), + ( + xfail_issue_99960, + "OnnxBackendNodeModelTest.test_mvn_expanded_ver18_cpu", + ), + ( + xfail_issue_99961, + "OnnxBackendNodeModelTest.test_optional_get_element_optional_sequence_cpu", + "OnnxBackendNodeModelTest.test_optional_get_element_optional_tensor_cpu", + "OnnxBackendNodeModelTest.test_optional_get_element_tensor_cpu", + "OnnxBackendNodeModelTest.test_optional_has_element_empty_no_input_name_optional_input_cpu", + "OnnxBackendNodeModelTest.test_optional_has_element_empty_no_input_name_tensor_input_cpu", + "OnnxBackendNodeModelTest.test_optional_has_element_empty_no_input_optional_input_cpu", + "OnnxBackendNodeModelTest.test_optional_has_element_empty_no_input_tensor_input_cpu", + "OnnxBackendNodeModelTest.test_optional_has_element_empty_optional_input_cpu", + "OnnxBackendNodeModelTest.test_optional_has_element_optional_input_cpu", + "OnnxBackendNodeModelTest.test_optional_has_element_tensor_input_cpu", + ), + ( + xfail_issue_99968, + "OnnxBackendNodeModelTest.test_reduce_l1_do_not_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_l1_do_not_keepdims_example_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_l1_do_not_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_l1_do_not_keepdims_random_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_l1_keep_dims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_l1_keep_dims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_l1_negative_axes_keep_dims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_l1_negative_axes_keep_dims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_l2_do_not_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_l2_do_not_keepdims_example_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_l2_do_not_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_l2_do_not_keepdims_random_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_l2_keep_dims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_l2_keep_dims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_l2_negative_axes_keep_dims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_l2_negative_axes_keep_dims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_asc_axes_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_asc_axes_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_desc_axes_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_desc_axes_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_exp_do_not_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_exp_do_not_keepdims_example_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_exp_do_not_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_exp_do_not_keepdims_random_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_l1_do_not_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_exp_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_exp_negative_axes_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_exp_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_negative_axes_cpu", + "OnnxBackendNodeModelTest.test_reduce_max_do_not_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_max_do_not_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_max_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_max_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_max_negative_axes_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_max_negative_axes_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_mean_do_not_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_exp_negative_axes_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_mean_do_not_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_mean_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_mean_negative_axes_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_mean_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_mean_negative_axes_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_min_do_not_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_min_do_not_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_min_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_min_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_min_negative_axes_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_min_negative_axes_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_prod_do_not_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_prod_do_not_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_prod_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_prod_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_prod_negative_axes_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_prod_negative_axes_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_square_do_not_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_square_do_not_keepdims_example_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_square_do_not_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_square_do_not_keepdims_random_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_square_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_square_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_square_negative_axes_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_square_negative_axes_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_l1_negative_axes_keep_dims_example_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_l1_negative_axes_keep_dims_random_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_l2_negative_axes_keep_dims_example_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_l2_negative_axes_keep_dims_random_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_exp_negative_axes_keepdims_example_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_log_sum_exp_negative_axes_keepdims_random_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_square_negative_axes_keepdims_example_expanded_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_square_negative_axes_keepdims_random_expanded_cpu", + ), + ( + xfail_issue_99969, + "OnnxBackendNodeModelTest.test_resize_downsample_scales_cubic_antialias_cpu", + "OnnxBackendNodeModelTest.test_resize_downsample_scales_linear_antialias_cpu", + "OnnxBackendNodeModelTest.test_resize_downsample_sizes_cubic_antialias_cpu", + "OnnxBackendNodeModelTest.test_resize_downsample_sizes_linear_antialias_cpu", + "OnnxBackendNodeModelTest.test_resize_downsample_sizes_nearest_not_smaller_cpu", + "OnnxBackendNodeModelTest.test_resize_downsample_sizes_nearest_not_larger_cpu", + "OnnxBackendNodeModelTest.test_resize_tf_crop_and_resize_axes_2_3_cpu", + "OnnxBackendNodeModelTest.test_resize_tf_crop_and_resize_axes_3_2_cpu", + "OnnxBackendNodeModelTest.test_resize_upsample_scales_nearest_axes_2_3_cpu", + "OnnxBackendNodeModelTest.test_resize_upsample_scales_nearest_axes_3_2_cpu", + "OnnxBackendNodeModelTest.test_resize_upsample_sizes_nearest_axes_2_3_cpu", + "OnnxBackendNodeModelTest.test_resize_upsample_sizes_nearest_axes_3_2_cpu", + "OnnxBackendNodeModelTest.test_resize_upsample_sizes_nearest_not_larger_cpu", + ), + ( + xfail_issue_99970, + "OnnxBackendNodeModelTest.test_scatter_elements_with_reduction_max_cpu", + "OnnxBackendNodeModelTest.test_scatter_elements_with_reduction_min_cpu", + "OnnxBackendNodeModelTest.test_scatternd_max_cpu", + "OnnxBackendNodeModelTest.test_scatternd_min_cpu", + ), + ( + xfail_issue_99972, + "OnnxBackendNodeModelTest.test_softmax_large_number_expanded_ver18_cpu", + ), + ( + xfail_issue_99973, + "OnnxBackendNodeModelTest.test_split_1d_uneven_split_opset18_cpu", + "OnnxBackendNodeModelTest.test_split_2d_uneven_split_opset18_cpu", + "OnnxBackendNodeModelTest.test_split_zero_size_splits_opset13_cpu", + "OnnxBackendNodeModelTest.test_split_zero_size_splits_opset18_cpu", + ), ] for test_group in tests_expected_to_fail: diff --git a/src/bindings/python/tests_compatibility/test_onnx/test_ops_reduction.py b/src/bindings/python/tests_compatibility/test_onnx/test_ops_reduction.py index 20134cddc6908f..4122d1a3158689 100644 --- a/src/bindings/python/tests_compatibility/test_onnx/test_ops_reduction.py +++ b/src/bindings/python/tests_compatibility/test_onnx/test_ops_reduction.py @@ -5,6 +5,7 @@ import onnx import pytest +from tests_compatibility import xfail_issue_99962 from tests_compatibility.runtime import get_runtime from tests_compatibility.test_onnx.utils import ( run_node, @@ -79,6 +80,7 @@ def test_reduce_operation_keepdims_none_axes(operation, ref_operation): ref_operation(reduce_data, keepdims=True)) +@xfail_issue_99962 @pytest.mark.parametrize("operation, ref_operation", reduce_operation_parameters_as_attr) @pytest.mark.parametrize("axes", reduce_axis_parameters) def test_reduce_operation_keepdims_with_axes_as_attr(operation, ref_operation, axes): @@ -93,6 +95,7 @@ def test_reduce_operation_keepdims_with_axes_as_const(operation, ref_operation, ref_operation(reduce_data, keepdims=True, axis=axes)) +@xfail_issue_99962 @pytest.mark.parametrize("axes", [ None, (0,), @@ -134,6 +137,7 @@ def test_reduce_operation_no_keepdims_axes_as_const(operation, ref_operation, ax ref_operation(reduce_data, keepdims=False)) +@xfail_issue_99962 @pytest.mark.parametrize("reduction_axes", [(0,), (0, 2), (0, 1, 2)]) def test_reduce_l1(reduction_axes): shape = [2, 4, 3, 2] @@ -171,6 +175,7 @@ def test_reduce_l1_default_axes(): assert np.allclose(expected, ng_result) +@xfail_issue_99962 @pytest.mark.parametrize("reduction_axes", [(0,), (0, 2), (0, 1, 2)]) def test_reduce_l2(reduction_axes): shape = [2, 4, 3, 2] @@ -209,6 +214,7 @@ def test_reduce_l2_default_axes(): assert np.allclose(expected, ng_result) +@xfail_issue_99962 @pytest.mark.parametrize("reduction_axes", [(0,), (0, 2), (0, 1, 2)]) def test_reduce_log_sum(reduction_axes): shape = [2, 4, 3, 2] @@ -246,6 +252,7 @@ def test_reduce_log_sum_default_axes(): assert np.allclose(expected, ng_result) +@xfail_issue_99962 def test_reduce_log_sum_exp(): def logsumexp(data, axis=None, keepdims=True): return np.log(np.sum(np.exp(data), axis=axis, keepdims=keepdims)) @@ -283,6 +290,7 @@ def logsumexp(data, axis=None, keepdims=True): ) +@xfail_issue_99962 @pytest.mark.parametrize("reduction_axes", [(0,), (0, 2), (0, 1, 2)]) def test_reduce_sum_square(reduction_axes): shape = [2, 4, 3, 2] diff --git a/src/bindings/python/tests_compatibility/test_onnx/test_ops_unary.py b/src/bindings/python/tests_compatibility/test_onnx/test_ops_unary.py index 827f226677060e..ddbd8dd53e4a4a 100644 --- a/src/bindings/python/tests_compatibility/test_onnx/test_ops_unary.py +++ b/src/bindings/python/tests_compatibility/test_onnx/test_ops_unary.py @@ -326,7 +326,7 @@ def test_identity(): def test_cast_to_bool(val_type, input_data): expected = np.array(input_data, dtype=val_type) - model = get_node_model("Cast", input_data, opset=6, to=onnx.mapping.NP_TYPE_TO_TENSOR_TYPE[val_type]) + model = get_node_model("Cast", input_data, opset=6, to=onnx.helper.np_dtype_to_tensor_dtype(val_type)) result = run_model(model, [input_data]) assert np.allclose(result, expected) @@ -343,7 +343,7 @@ def test_cast_to_float(val_type, range_start, range_end, in_dtype): input_data = np.random.randint(range_start, range_end, size=(2, 2), dtype=in_dtype) expected = np.array(input_data, dtype=val_type) - model = get_node_model("Cast", input_data, opset=6, to=onnx.mapping.NP_TYPE_TO_TENSOR_TYPE[val_type]) + model = get_node_model("Cast", input_data, opset=6, to=onnx.helper.np_dtype_to_tensor_dtype(val_type)) result = run_model(model, [input_data]) assert np.allclose(result, expected) @@ -359,7 +359,7 @@ def test_cast_to_int(val_type): input_data = np.ceil(-8 + np.random.rand(2, 3, 4) * 16) expected = np.array(input_data, dtype=val_type) - model = get_node_model("Cast", input_data, opset=6, to=onnx.mapping.NP_TYPE_TO_TENSOR_TYPE[val_type]) + model = get_node_model("Cast", input_data, opset=6, to=onnx.helper.np_dtype_to_tensor_dtype(val_type)) result = run_model(model, [input_data]) assert np.allclose(result, expected) @@ -372,7 +372,7 @@ def test_cast_to_uint(val_type): input_data = np.ceil(np.random.rand(2, 3, 4) * 16) expected = np.array(input_data, dtype=val_type) - model = get_node_model("Cast", input_data, opset=6, to=onnx.mapping.NP_TYPE_TO_TENSOR_TYPE[val_type]) + model = get_node_model("Cast", input_data, opset=6, to=onnx.helper.np_dtype_to_tensor_dtype(val_type)) result = run_model(model, [input_data]) assert np.allclose(result, expected) @@ -455,7 +455,7 @@ def test_constant(value_type): outputs=["values"], value=onnx.helper.make_tensor( name="const_tensor", - data_type=onnx.mapping.NP_TYPE_TO_TENSOR_TYPE[np.dtype(value_type)], + data_type=onnx.helper.np_dtype_to_tensor_dtype(np.dtype(value_type)), dims=values.shape, vals=values.flatten(), ), @@ -473,7 +473,7 @@ def test_constant_err(): outputs=["values"], value=onnx.helper.make_tensor( name="const_tensor", - data_type=onnx.mapping.NP_TYPE_TO_TENSOR_TYPE[np.dtype(np.float16)], + data_type=onnx.helper.np_dtype_to_tensor_dtype(np.dtype(np.float16)), dims=values.shape, vals=values.flatten(), ), diff --git a/src/bindings/python/tests_compatibility/test_onnx/utils/onnx_backend.py b/src/bindings/python/tests_compatibility/test_onnx/utils/onnx_backend.py index 5c06a5e874eaa2..a3eea6a2ac9aed 100644 --- a/src/bindings/python/tests_compatibility/test_onnx/utils/onnx_backend.py +++ b/src/bindings/python/tests_compatibility/test_onnx/utils/onnx_backend.py @@ -13,11 +13,11 @@ import numpy import onnx from onnx.backend.base import Backend, BackendRep -from onnx.helper import make_graph, make_model, make_tensor_value_info +from onnx.helper import make_graph, make_model, make_tensor_value_info, np_dtype_to_tensor_dtype from ngraph.impl import Function from tests_compatibility.runtime import get_runtime -from tests_compatibility.test_onnx.utils.onnx_helpers import import_onnx_model, np_dtype_to_tensor_type +from tests_compatibility.test_onnx.utils.onnx_helpers import import_onnx_model class OpenVinoOnnxBackendRep(BackendRep): @@ -80,15 +80,15 @@ def run_node( ): # type: (...) -> Optional[Tuple[Any, ...]] """Prepare and run a computation on an ONNX node.""" # default values for input/output tensors - input_tensor_types = [np_dtype_to_tensor_type(node_input.dtype) for node_input in inputs] - output_tensor_types = [onnx.TensorProto.FLOAT for idx in range(len(node.output))] + input_tensor_types = [np_dtype_to_tensor_dtype(node_input.dtype) for node_input in inputs] + output_tensor_types = [onnx.TensorProto.FLOAT for _ in range(len(node.output))] output_tensor_shapes = [()] # type: List[Tuple[int, ...]] if outputs_info is not None: output_tensor_types = [ - np_dtype_to_tensor_type(dtype) for (dtype, shape) in outputs_info + np_dtype_to_tensor_dtype(dtype) for (dtype, _) in outputs_info ] - output_tensor_shapes = [shape for (dtype, shape) in outputs_info] + output_tensor_shapes = [shape for (_, shape) in outputs_info] input_tensors = [ make_tensor_value_info(name, tensor_type, value.shape) diff --git a/src/bindings/python/tests_compatibility/test_onnx/utils/onnx_helpers.py b/src/bindings/python/tests_compatibility/test_onnx/utils/onnx_helpers.py index 063af326802fb3..c5e774da297142 100644 --- a/src/bindings/python/tests_compatibility/test_onnx/utils/onnx_helpers.py +++ b/src/bindings/python/tests_compatibility/test_onnx/utils/onnx_helpers.py @@ -1,24 +1,13 @@ # Copyright (C) 2018-2023 Intel Corporation # SPDX-License-Identifier: Apache-2.0 -import numpy as np import onnx -from onnx.mapping import NP_TYPE_TO_TENSOR_TYPE from openvino.inference_engine import IECore import ngraph as ng from ngraph.impl import Function -def np_dtype_to_tensor_type(data_type: np.dtype) -> int: - """Return TensorProto type for provided numpy dtype. - - :param data_type: Numpy data type object. - :return: TensorProto.DataType enum value for corresponding type. - """ - return NP_TYPE_TO_TENSOR_TYPE[data_type] - - def import_onnx_model(model: onnx.ModelProto) -> Function: onnx.checker.check_model(model) model_byte_string = model.SerializeToString() diff --git a/src/frontends/onnx/frontend/CMakeLists.txt b/src/frontends/onnx/frontend/CMakeLists.txt index 9dfa3917fa9a61..167732df4b3639 100644 --- a/src/frontends/onnx/frontend/CMakeLists.txt +++ b/src/frontends/onnx/frontend/CMakeLists.txt @@ -15,7 +15,7 @@ ov_add_frontend(NAME onnx FILEDESCRIPTION "FrontEnd to load and convert ONNX file format" LINK_LIBRARIES ngraph::builder openvino::util onnx_common openvino::runtime::dev) -set(ONNX_OPSET_VERSION 17 CACHE INTERNAL "Supported version of ONNX operator set") +set(ONNX_OPSET_VERSION 18 CACHE INTERNAL "Supported version of ONNX operator set") target_compile_definitions(${TARGET_NAME} PRIVATE ONNX_OPSET_VERSION=${ONNX_OPSET_VERSION}) ov_ncc_naming_style(FOR_TARGET ${TARGET_NAME} diff --git a/src/frontends/onnx/tests/requirements.txt b/src/frontends/onnx/tests/requirements.txt index 6216064a61c146..e8e66c157fb1ad 100644 --- a/src/frontends/onnx/tests/requirements.txt +++ b/src/frontends/onnx/tests/requirements.txt @@ -1,4 +1,4 @@ # ONNX - generate test models docopt~=0.6.2 -onnx==1.12.0 +onnx==1.13.1 protobuf>=3.18.1,<4.0.0 \ No newline at end of file diff --git a/src/frontends/tensorflow/tests/requirements.txt b/src/frontends/tensorflow/tests/requirements.txt index 37e76ef395e446..df5d2e1dbb86fc 100644 --- a/src/frontends/tensorflow/tests/requirements.txt +++ b/src/frontends/tensorflow/tests/requirements.txt @@ -1,2 +1,2 @@ numpy>=1.16.6,<1.26.0 -tensorflow>=1.15.5,<=2.10.0 +tensorflow>=1.15.5,<2.13.0 diff --git a/src/frontends/tensorflow_lite/tests/requirements.txt b/src/frontends/tensorflow_lite/tests/requirements.txt new file mode 100644 index 00000000000000..49b433c132ee5d --- /dev/null +++ b/src/frontends/tensorflow_lite/tests/requirements.txt @@ -0,0 +1,2 @@ +numpy>=1.16.6,<1.25.0 +tensorflow>=1.15.5,<2.13.0 diff --git a/src/frontends/tests/frontend/shared/src/conversion.cpp b/src/frontends/tests/frontend/shared/src/conversion.cpp index de2849672a390b..c660bbd32bf6db 100644 --- a/src/frontends/tests/frontend/shared/src/conversion.cpp +++ b/src/frontends/tests/frontend/shared/src/conversion.cpp @@ -77,6 +77,7 @@ TEST_P(FrontEndConversionExtensionTest, TestConversionExtension) { } TEST_P(FrontEndConversionExtensionTest, TestConversionExtensionViaSO) { + GTEST_SKIP() << "Ticket 99981"; auto frontend = m_param.m_frontend; const auto& lib_path = get_lib_path("test_builtin_extensions"); frontend->add_extension(lib_path); diff --git a/src/frontends/tests/frontend/shared/src/convert_model.cpp b/src/frontends/tests/frontend/shared/src/convert_model.cpp index 72a08e82dfe572..f028e8089a0956 100644 --- a/src/frontends/tests/frontend/shared/src/convert_model.cpp +++ b/src/frontends/tests/frontend/shared/src/convert_model.cpp @@ -37,6 +37,7 @@ void FrontEndConvertModelTest::doLoadFromFile() { } TEST_P(FrontEndConvertModelTest, test_convert_partially_equal_convert) { + GTEST_SKIP() << "Ticket 99981"; ASSERT_NO_THROW(doLoadFromFile()); std::shared_ptr function_ref; ASSERT_NO_THROW(function_ref = m_frontEnd->convert(m_inputModel)); @@ -55,6 +56,7 @@ TEST_P(FrontEndConvertModelTest, test_convert_partially_equal_convert) { } TEST_P(FrontEndConvertModelTest, test_decode_convert_equal_convert) { + GTEST_SKIP() << "Ticket 99981"; ASSERT_NO_THROW(doLoadFromFile()); std::shared_ptr function_ref; ASSERT_NO_THROW(function_ref = m_frontEnd->convert(m_inputModel)); diff --git a/tests/layer_tests/mo_python_api_tests/test_mo_convert_tf.py b/tests/layer_tests/mo_python_api_tests/test_mo_convert_tf.py index 197960fe1c5655..e13a40acbe98ea 100644 --- a/tests/layer_tests/mo_python_api_tests/test_mo_convert_tf.py +++ b/tests/layer_tests/mo_python_api_tests/test_mo_convert_tf.py @@ -342,6 +342,7 @@ class TestMoConvertTF(CommonMOConvertTest): create_tf_session, ] + @pytest.mark.skip("Ticket 139020") @pytest.mark.parametrize("create_model", test_data) @pytest.mark.nightly @pytest.mark.precommit_tf_fe diff --git a/tests/layer_tests/onnx_tests/test_reduce.py b/tests/layer_tests/onnx_tests/test_reduce.py index 535f5513b33a5a..16ddc5fcca0ed9 100644 --- a/tests/layer_tests/onnx_tests/test_reduce.py +++ b/tests/layer_tests/onnx_tests/test_reduce.py @@ -121,6 +121,7 @@ def create_reduce(self, shape, reshapped_shape, op, axes, keep_dims, ir_version) dict(shape=[2, 4, 6, 8, 10], reshapped_shape=[2, 4, 6 * 8 * 10, 1], axes=[2, 3, 4]) ] + @pytest.mark.skip("ticket 95904") @pytest.mark.parametrize("params", test_data_precommit) @pytest.mark.parametrize("keep_dims", [True, False]) @pytest.mark.precommit @@ -130,6 +131,7 @@ def test_reduce_max_precommit(self, params, keep_dims, ie_device, precision, ir_ ir_version=ir_version), ie_device, precision, ir_version, temp_dir=temp_dir, use_old_api=use_old_api) + @pytest.mark.skip("ticket 95904") @pytest.mark.parametrize("params", test_data) @pytest.mark.parametrize("keep_dims", [True, False]) @pytest.mark.nightly @@ -155,6 +157,7 @@ def test_reduce_prod(self, params, keep_dims, ie_device, precision, ir_version, ir_version=ir_version), ie_device, precision, ir_version, temp_dir=temp_dir, use_old_api=use_old_api) + @pytest.mark.skip("ticket 95904") @pytest.mark.parametrize("params", test_data_precommit) @pytest.mark.parametrize("keep_dims", [True, False]) @pytest.mark.precommit @@ -164,6 +167,7 @@ def test_reduce_mean_precommit(self, params, keep_dims, ie_device, precision, ir ir_version=ir_version), ie_device, precision, ir_version, temp_dir=temp_dir, use_old_api=use_old_api) + @pytest.mark.skip("ticket 95904") @pytest.mark.parametrize("params", test_data) @pytest.mark.parametrize("keep_dims", [True, False]) @pytest.mark.nightly @@ -174,6 +178,7 @@ def test_reduce_mean(self, params, keep_dims, ie_device, precision, ir_version, ir_version=ir_version), ie_device, precision, ir_version, temp_dir=temp_dir, use_old_api=use_old_api) + @pytest.mark.skip("ticket 95904") @pytest.mark.parametrize("params", test_data_precommit) @pytest.mark.parametrize("keep_dims", [True, False]) @pytest.mark.precommit @@ -183,6 +188,7 @@ def test_reduce_min_precommit(self, params, keep_dims, ie_device, precision, ir_ ir_version=ir_version), ie_device, precision, ir_version, temp_dir=temp_dir, use_old_api=use_old_api) + @pytest.mark.skip("ticket 95904") @pytest.mark.parametrize("params", test_data) @pytest.mark.parametrize("keep_dims", [True, False]) @pytest.mark.nightly diff --git a/tests/layer_tests/onnx_tests/test_reduce_lp.py b/tests/layer_tests/onnx_tests/test_reduce_lp.py index be98045fd2add8..5c0e4f47419c8f 100644 --- a/tests/layer_tests/onnx_tests/test_reduce_lp.py +++ b/tests/layer_tests/onnx_tests/test_reduce_lp.py @@ -216,6 +216,7 @@ def create_reduce_lp_const(self, shape, axes, keep_dims, reduce_p, ir_version): dict(shape=[2, 4, 6, 8, 10], axes=[-4, -2]), ] + @pytest.mark.skip("ticket 95904") @pytest.mark.parametrize("params", test_data_precommit) @pytest.mark.parametrize("keep_dims", [True, False]) @pytest.mark.parametrize("reduce_p", [1, 2]) @@ -226,6 +227,7 @@ def test_reduce_lp_precommit(self, params, keep_dims, reduce_p, ie_device, preci ir_version=ir_version), ie_device, precision, ir_version, temp_dir=temp_dir, use_old_api=use_old_api) + @pytest.mark.skip("ticket 95904") @pytest.mark.parametrize("params", test_data) @pytest.mark.parametrize("keep_dims", [True, False]) @pytest.mark.parametrize("reduce_p", [1, 2]) @@ -236,6 +238,7 @@ def test_reduce_lp(self, params, keep_dims, reduce_p, ie_device, precision, ir_v ir_version=ir_version), ie_device, precision, ir_version, temp_dir=temp_dir, use_old_api=use_old_api) + @pytest.mark.skip("ticket 95904") @pytest.mark.parametrize("params", test_data_precommit) @pytest.mark.parametrize("keep_dims", [True, False]) @pytest.mark.parametrize("reduce_p", [1, 2]) @@ -247,6 +250,7 @@ def test_reduce_lp_const_precommit(self, params, keep_dims, reduce_p, ie_device, ir_version=ir_version), ie_device, precision, ir_version, temp_dir=temp_dir, use_old_api=use_old_api) + @pytest.mark.skip("ticket 95904") @pytest.mark.parametrize("params", test_data) @pytest.mark.parametrize("keep_dims", [True, False]) @pytest.mark.parametrize("reduce_p", [1, 2]) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 24a1099752b900..f495b8709855ee 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -341,7 +341,7 @@ if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND if(CMAKE_VERBOSE_MAKEFILE) set(Protobuf_DEBUG ON) endif() - find_package(Protobuf 3.18.2 REQUIRED) + find_package(Protobuf 3.20.3 REQUIRED) set(Protobuf_LITE_LIBRARIES protobuf::libprotobuf-lite) set(Protobuf_LIBRARIES protobuf::libprotobuf) set(PROTOC_EXECUTABLE protobuf::protoc) diff --git a/thirdparty/onnx/CMakeLists.txt b/thirdparty/onnx/CMakeLists.txt index 883018394d7eba..6ba56c3bbba0f1 100644 --- a/thirdparty/onnx/CMakeLists.txt +++ b/thirdparty/onnx/CMakeLists.txt @@ -21,6 +21,9 @@ endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") # 4244 conversion from 'XXX' to 'YYY', possible loss of data ie_add_compiler_flags(/wd4244) + + # from onnx==1.13 it requires C++17 when compiling on Windows + set(CMAKE_CXX_STANDARD 17) endif() set(ONNX_USE_PROTOBUF_SHARED_LIBS OFF CACHE BOOL "Use dynamic protobuf by ONNX library" FORCE) diff --git a/thirdparty/onnx/onnx b/thirdparty/onnx/onnx index f7ee1ac60d06ab..ad834eb73ee0cd 160000 --- a/thirdparty/onnx/onnx +++ b/thirdparty/onnx/onnx @@ -1 +1 @@ -Subproject commit f7ee1ac60d06abe8e26c9b6bbe1e3db5286b614b +Subproject commit ad834eb73ee0cd9b6fa9ea892caeed5fa17d7dc0 diff --git a/thirdparty/open_model_zoo b/thirdparty/open_model_zoo index 6becb6013d9ed1..20d1811001dce9 160000 --- a/thirdparty/open_model_zoo +++ b/thirdparty/open_model_zoo @@ -1 +1 @@ -Subproject commit 6becb6013d9ed110020b3cd5babbad8e697054c9 +Subproject commit 20d1811001dce96bc85e1384c51d9e786e2e9be1 diff --git a/thirdparty/protobuf/protobuf b/thirdparty/protobuf/protobuf index 6c6b0778b70f35..fe271ab76f2ad2 160000 --- a/thirdparty/protobuf/protobuf +++ b/thirdparty/protobuf/protobuf @@ -1 +1 @@ -Subproject commit 6c6b0778b70f35f93c2f0dee30e5d12ad2a83eea +Subproject commit fe271ab76f2ad2b2b28c10443865d2af21e27e0e diff --git a/tools/mo/requirements.txt b/tools/mo/requirements.txt index d9eaea568fae69..8cd9911da4c39e 100644 --- a/tools/mo/requirements.txt +++ b/tools/mo/requirements.txt @@ -1,11 +1,11 @@ numpy>=1.16.6,<1.26.0 -tensorflow>=1.15.5,<=2.10.0 +tensorflow>=1.15.5,<=2.13.0 mxnet~=1.2.0; sys_platform == 'win32' mxnet>=1.7.0.post2,<=1.9.1; sys_platform != 'win32' networkx~=2.5; python_version <= "3.6" networkx<=2.8.8; python_version > "3.6" -protobuf>=3.18.1,<4.0.0 -onnx>=1.8.1,<=1.12 +protobuf>=3.20.2,<4.0.0 +onnx>=1.8.1,<1.14 defusedxml>=0.7.1 urllib3>=1.26.4 requests>=2.25.1 diff --git a/tools/mo/requirements_onnx.txt b/tools/mo/requirements_onnx.txt index 5889735afd013a..204290a27dbda9 100644 --- a/tools/mo/requirements_onnx.txt +++ b/tools/mo/requirements_onnx.txt @@ -1,4 +1,4 @@ -onnx>=1.8.1,<=1.12 +onnx>=1.8.1,<=1.13.1 networkx~=2.5; python_version <= "3.6" networkx<=2.8.8; python_version > "3.6" numpy>=1.16.6,<1.26.0 diff --git a/tools/mo/requirements_tf.txt b/tools/mo/requirements_tf.txt index 6069112707e438..394581b31663b9 100644 --- a/tools/mo/requirements_tf.txt +++ b/tools/mo/requirements_tf.txt @@ -1,5 +1,5 @@ numpy>=1.16.6,<1.26.0 -tensorflow>=1.15.5,<=2.10.0 +tensorflow>=1.15.5,<=2.13.0 networkx~=2.5; python_version <= "3.6" networkx<=2.8.8; python_version > "3.6" defusedxml>=0.7.1 diff --git a/tools/mo/requirements_tf2.txt b/tools/mo/requirements_tf2.txt index 4526f1b4c87e66..b3e12312a33c4c 100644 --- a/tools/mo/requirements_tf2.txt +++ b/tools/mo/requirements_tf2.txt @@ -1,5 +1,5 @@ numpy>=1.16.6,<1.26.0 -tensorflow>=2.5,<=2.10.0 +tensorflow>=2.5,<=2.13.0 networkx~=2.5; python_version <= "3.6" networkx<=2.8.8; python_version > "3.6" defusedxml>=0.7.1 diff --git a/tools/pot/setup.py b/tools/pot/setup.py index d77499c6d44419..4b5804a630e9a6 100644 --- a/tools/pot/setup.py +++ b/tools/pot/setup.py @@ -107,7 +107,7 @@ def get_version(): version_string_with_mem_manager = version_string + 'm' if sys.version_info[1] < 8 else version_string os_string = None if sys.platform not in OS_POSTFIXES else OS_POSTFIXES[sys.platform] -TORCH_VERSION = '1.12.1' +TORCH_VERSION = '1.13.1' TORCH_SOURCE_URL_TEMPLATE = 'https://download.pytorch.org/whl/cpu/torch-{tv}%2Bcpu-cp{ver}-cp{' \ 'ver_m}-{os}.whl'