From 0dfd2f07cde25f77ea5baee734580f12317cdcc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=8C=80=ED=98=84=20=28Kim=20DaeHyun=29?= Date: Tue, 3 Mar 2026 00:44:22 +0900 Subject: [PATCH 01/10] Feat: Extend ONNX FE with `Com2Im` operator (#30144) --- src/frontends/onnx/docs/supported_ops.md | 2 +- src/frontends/onnx/frontend/src/op/col2im.cpp | 65 +++++++++ src/frontends/onnx/tests/__init__.py | 3 +- .../models/col2im_2D_batch_opset_18.prototxt | 103 +++++++++++++++ .../col2im_2D_channel_opset_18.prototxt | 103 +++++++++++++++ .../col2im_2D_default_opset_18.prototxt | 103 +++++++++++++++ .../col2im_2D_dilations_opset_18.prototxt | 103 +++++++++++++++ .../models/col2im_2D_pads_opset_18.prototxt | 103 +++++++++++++++ .../col2im_2D_strides_opset_18.prototxt | 103 +++++++++++++++ src/frontends/onnx/tests/onnx_import.in.cpp | 125 ++++++++++++++++++ .../onnx/tests/tests_python/test_backend.py | 13 +- 11 files changed, 817 insertions(+), 9 deletions(-) create mode 100644 src/frontends/onnx/frontend/src/op/col2im.cpp create mode 100644 src/frontends/onnx/tests/models/col2im_2D_batch_opset_18.prototxt create mode 100644 src/frontends/onnx/tests/models/col2im_2D_channel_opset_18.prototxt create mode 100644 src/frontends/onnx/tests/models/col2im_2D_default_opset_18.prototxt create mode 100644 src/frontends/onnx/tests/models/col2im_2D_dilations_opset_18.prototxt create mode 100644 src/frontends/onnx/tests/models/col2im_2D_pads_opset_18.prototxt create mode 100644 src/frontends/onnx/tests/models/col2im_2D_strides_opset_18.prototxt diff --git a/src/frontends/onnx/docs/supported_ops.md b/src/frontends/onnx/docs/supported_ops.md index 9c546ed48cf429..b4f0719700fb00 100644 --- a/src/frontends/onnx/docs/supported_ops.md +++ b/src/frontends/onnx/docs/supported_ops.md @@ -35,7 +35,7 @@ OpenVINO provides support for operations of Default Opset (empty in table below) | |Celu |12 |12 | | | |CenterCropPad |18 |18 | | | |Clip |11, 1 |13, 12, 11, 6, 1 | | -| |Col2Im | |18 | | +| |Col2Im |18 |18 | | | |Compress |9 |11, 9 | | | |Concat |1 |13, 11, 4, 1 | | | |ConcatFromSequence |11 |11 |Supported only in certain patterns| diff --git a/src/frontends/onnx/frontend/src/op/col2im.cpp b/src/frontends/onnx/frontend/src/op/col2im.cpp new file mode 100644 index 00000000000000..bf63e4cb3d3d86 --- /dev/null +++ b/src/frontends/onnx/frontend/src/op/col2im.cpp @@ -0,0 +1,65 @@ +// Copyright (C) 2018-2026 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "openvino/op/col2im.hpp" + +#include "core/operator_set.hpp" +#include "exceptions.hpp" +#include "utils/common.hpp" + +namespace ov { +namespace frontend { +namespace onnx { +namespace ai_onnx { +namespace opset_18 { +ov::OutputVector col2im(const ov::frontend::onnx::Node& node) { + // 1. get inputs + common::default_op_checks(node, 3); + const auto inputs = node.get_ov_inputs(); + const auto& data = inputs[0]; // input + const auto& output_size = inputs[1]; // image_shape + const auto& kernel_size = inputs[2]; // block_shape + + // 2. get attributes + const size_t spatial_rank = 2; + + std::vector default_attr_vals(spatial_rank, 1); + auto dilations = node.get_attribute_value>("dilations", default_attr_vals); + auto strides = node.get_attribute_value>("strides", default_attr_vals); + + std::vector default_pads(spatial_rank * 2, 0); + auto pads = node.get_attribute_value>("pads", default_pads); + std::vector pads_begin; + std::vector pads_end; + + // ov::op::v15::Col2Im only supports 2D spatial dimensions + CHECK_VALID_NODE(node, + dilations.size() == spatial_rank, + "Col2Im 'dilations' attribute must have size [2]. Got: ", + dilations.size()); + CHECK_VALID_NODE(node, + strides.size() == spatial_rank, + "Col2Im 'strides' attribute must have size [2]. Got: ", + strides.size()); + CHECK_VALID_NODE(node, + pads.size() == spatial_rank * 2, + "Col2Im 'pads' attribute must have size [4]. Got: ", + pads.size()); + + // spatial_rank == pads.size() / 2 + pads_begin.assign(pads.begin(), pads.begin() + spatial_rank); + pads_end.assign(pads.begin() + spatial_rank, pads.end()); + + // 3. return Col2Im + return { + std::make_shared(data, output_size, kernel_size, strides, dilations, pads_begin, pads_end) + ->outputs()}; +} + +ONNX_OP("Col2Im", OPSET_SINCE(1), ai_onnx::opset_18::col2im); +} // namespace opset_18 +} // namespace ai_onnx +} // namespace onnx +} // namespace frontend +} // namespace ov diff --git a/src/frontends/onnx/tests/__init__.py b/src/frontends/onnx/tests/__init__.py index 8309e2f0614dc5..798f13bfafb8f8 100644 --- a/src/frontends/onnx/tests/__init__.py +++ b/src/frontends/onnx/tests/__init__.py @@ -1,6 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (C) 2018-2026 Intel Corporation # SPDX-License-Identifier: Apache-2.0 +# -*- coding: utf-8 -*- import pytest @@ -52,7 +52,6 @@ def xfail_test(reason="Mark the test as expected to fail", strict=True): "Axes input must be constant") skip_bitwise_ui64 = pytest.mark.skip(reason="AssertionError: Not equal to tolerance rtol=0.001, atol=1e-07") 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 ''") diff --git a/src/frontends/onnx/tests/models/col2im_2D_batch_opset_18.prototxt b/src/frontends/onnx/tests/models/col2im_2D_batch_opset_18.prototxt new file mode 100644 index 00000000000000..c049208acd4099 --- /dev/null +++ b/src/frontends/onnx/tests/models/col2im_2D_batch_opset_18.prototxt @@ -0,0 +1,103 @@ +ir_version: 8 +producer_name: "OpenVINO ONNX Frontend" +graph { + node { + input: "input" + input: "image_shape" + input: "block_shape" + output: "output" + name: "col2im_2D_batch_opset_18" + op_type: "Col2Im" + attribute { + name: "dilations" + ints: 1 + ints: 1 + type: INTS + } + attribute { + name: "pads" + ints: 0 + ints: 0 + ints: 0 + ints: 0 + type: INTS + } + attribute { + name: "strides" + ints: 1 + ints: 1 + type: INTS + } + } + name: "col2im_2D_batch_opset_18" + input { + name: "input" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 2 + } + dim { + dim_value: 4 + } + dim { + dim_value: 4 + } + } + } + } + } + input { + name: "image_shape" + type { + tensor_type { + elem_type: 7 + shape { + dim { + dim_value: 2 + } + } + } + } + } + input { + name: "block_shape" + type { + tensor_type { + elem_type: 7 + shape { + dim { + dim_value: 2 + } + } + } + } + } + output { + name: "output" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 2 + } + dim { + dim_value: 1 + } + dim { + dim_value: 3 + } + dim { + dim_value: 3 + } + } + } + } + } +} +opset_import { + version: 18 +} diff --git a/src/frontends/onnx/tests/models/col2im_2D_channel_opset_18.prototxt b/src/frontends/onnx/tests/models/col2im_2D_channel_opset_18.prototxt new file mode 100644 index 00000000000000..56d7b2a7fe8c3a --- /dev/null +++ b/src/frontends/onnx/tests/models/col2im_2D_channel_opset_18.prototxt @@ -0,0 +1,103 @@ +ir_version: 8 +producer_name: "OpenVINO ONNX Frontend" +graph { + node { + input: "input" + input: "image_shape" + input: "block_shape" + output: "output" + name: "col2im_2D_channel_opset_18" + op_type: "Col2Im" + attribute { + name: "dilations" + ints: 1 + ints: 1 + type: INTS + } + attribute { + name: "pads" + ints: 0 + ints: 0 + ints: 0 + ints: 0 + type: INTS + } + attribute { + name: "strides" + ints: 1 + ints: 1 + type: INTS + } + } + name: "col2im_2D_channel_opset_18" + input { + name: "input" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 12 + } + dim { + dim_value: 4 + } + } + } + } + } + input { + name: "image_shape" + type { + tensor_type { + elem_type: 7 + shape { + dim { + dim_value: 2 + } + } + } + } + } + input { + name: "block_shape" + type { + tensor_type { + elem_type: 7 + shape { + dim { + dim_value: 2 + } + } + } + } + } + output { + name: "output" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 3 + } + dim { + dim_value: 3 + } + dim { + dim_value: 3 + } + } + } + } + } +} +opset_import { + version: 18 +} diff --git a/src/frontends/onnx/tests/models/col2im_2D_default_opset_18.prototxt b/src/frontends/onnx/tests/models/col2im_2D_default_opset_18.prototxt new file mode 100644 index 00000000000000..0a66c36ea853c1 --- /dev/null +++ b/src/frontends/onnx/tests/models/col2im_2D_default_opset_18.prototxt @@ -0,0 +1,103 @@ +ir_version: 8 +producer_name: "OpenVINO ONNX Frontend" +graph { + node { + input: "input" + input: "image_shape" + input: "block_shape" + output: "output" + name: "col2im_2D_default_opset_18" + op_type: "Col2Im" + attribute { + name: "dilations" + ints: 1 + ints: 1 + type: INTS + } + attribute { + name: "pads" + ints: 0 + ints: 0 + ints: 0 + ints: 0 + type: INTS + } + attribute { + name: "strides" + ints: 1 + ints: 1 + type: INTS + } + } + name: "col2im_2D_default_opset_18" + input { + name: "input" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 4 + } + dim { + dim_value: 4 + } + } + } + } + } + input { + name: "image_shape" + type { + tensor_type { + elem_type: 7 + shape { + dim { + dim_value: 2 + } + } + } + } + } + input { + name: "block_shape" + type { + tensor_type { + elem_type: 7 + shape { + dim { + dim_value: 2 + } + } + } + } + } + output { + name: "output" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 1 + } + dim { + dim_value: 3 + } + dim { + dim_value: 3 + } + } + } + } + } +} +opset_import { + version: 18 +} diff --git a/src/frontends/onnx/tests/models/col2im_2D_dilations_opset_18.prototxt b/src/frontends/onnx/tests/models/col2im_2D_dilations_opset_18.prototxt new file mode 100644 index 00000000000000..f64779e9db31d7 --- /dev/null +++ b/src/frontends/onnx/tests/models/col2im_2D_dilations_opset_18.prototxt @@ -0,0 +1,103 @@ +ir_version: 8 +producer_name: "OpenVINO ONNX Frontend" +graph { + node { + input: "input" + input: "image_shape" + input: "block_shape" + output: "output" + name: "col2im_2D_dilations_opset_18" + op_type: "Col2Im" + attribute { + name: "dilations" + ints: 2 + ints: 2 + type: INTS + } + attribute { + name: "pads" + ints: 0 + ints: 0 + ints: 0 + ints: 0 + type: INTS + } + attribute { + name: "strides" + ints: 1 + ints: 1 + type: INTS + } + } + name: "col2im_2D_dilations_opset_18" + input { + name: "input" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 4 + } + dim { + dim_value: 9 + } + } + } + } + } + input { + name: "image_shape" + type { + tensor_type { + elem_type: 7 + shape { + dim { + dim_value: 2 + } + } + } + } + } + input { + name: "block_shape" + type { + tensor_type { + elem_type: 7 + shape { + dim { + dim_value: 2 + } + } + } + } + } + output { + name: "output" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 1 + } + dim { + dim_value: 5 + } + dim { + dim_value: 5 + } + } + } + } + } +} +opset_import { + version: 18 +} diff --git a/src/frontends/onnx/tests/models/col2im_2D_pads_opset_18.prototxt b/src/frontends/onnx/tests/models/col2im_2D_pads_opset_18.prototxt new file mode 100644 index 00000000000000..ae624ef4059c2c --- /dev/null +++ b/src/frontends/onnx/tests/models/col2im_2D_pads_opset_18.prototxt @@ -0,0 +1,103 @@ +ir_version: 8 +producer_name: "OpenVINO ONNX Frontend" +graph { + node { + input: "input" + input: "image_shape" + input: "block_shape" + output: "output" + name: "col2im_2D_pads_opset_18" + op_type: "Col2Im" + attribute { + name: "dilations" + ints: 1 + ints: 1 + type: INTS + } + attribute { + name: "pads" + ints: 1 + ints: 1 + ints: 1 + ints: 1 + type: INTS + } + attribute { + name: "strides" + ints: 1 + ints: 1 + type: INTS + } + } + name: "col2im_2D_pads_opset_18" + input { + name: "input" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 4 + } + dim { + dim_value: 9 + } + } + } + } + } + input { + name: "image_shape" + type { + tensor_type { + elem_type: 7 + shape { + dim { + dim_value: 2 + } + } + } + } + } + input { + name: "block_shape" + type { + tensor_type { + elem_type: 7 + shape { + dim { + dim_value: 2 + } + } + } + } + } + output { + name: "output" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 1 + } + dim { + dim_value: 2 + } + dim { + dim_value: 2 + } + } + } + } + } +} +opset_import { + version: 18 +} diff --git a/src/frontends/onnx/tests/models/col2im_2D_strides_opset_18.prototxt b/src/frontends/onnx/tests/models/col2im_2D_strides_opset_18.prototxt new file mode 100644 index 00000000000000..82e70a1b8fb2ad --- /dev/null +++ b/src/frontends/onnx/tests/models/col2im_2D_strides_opset_18.prototxt @@ -0,0 +1,103 @@ +ir_version: 8 +producer_name: "OpenVINO ONNX Frontend" +graph { + node { + input: "input" + input: "image_shape" + input: "block_shape" + output: "output" + name: "col2im_2D_strides_opset_18" + op_type: "Col2Im" + attribute { + name: "dilations" + ints: 1 + ints: 1 + type: INTS + } + attribute { + name: "pads" + ints: 0 + ints: 0 + ints: 0 + ints: 0 + type: INTS + } + attribute { + name: "strides" + ints: 2 + ints: 2 + type: INTS + } + } + name: "col2im_2D_strides_opset_18" + input { + name: "input" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 4 + } + dim { + dim_value: 4 + } + } + } + } + } + input { + name: "image_shape" + type { + tensor_type { + elem_type: 7 + shape { + dim { + dim_value: 2 + } + } + } + } + } + input { + name: "block_shape" + type { + tensor_type { + elem_type: 7 + shape { + dim { + dim_value: 2 + } + } + } + } + } + output { + name: "output" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 1 + } + dim { + dim_value: 4 + } + dim { + dim_value: 4 + } + } + } + } + } +} +opset_import { + version: 18 +} diff --git a/src/frontends/onnx/tests/onnx_import.in.cpp b/src/frontends/onnx/tests/onnx_import.in.cpp index be89b28dae2968..bb0c838a57b9b1 100644 --- a/src/frontends/onnx/tests/onnx_import.in.cpp +++ b/src/frontends/onnx/tests/onnx_import.in.cpp @@ -320,6 +320,131 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_expand_model_with_initializers) { test_case.run(); } +OPENVINO_TEST(${BACKEND_NAME}, onnx_col2im_default) { + const auto model = convert_model("col2im_2D_default_opset_18.onnx"); + auto test_case = ov::test::TestCase(model, s_device); + + // Input: [1, 4, 4] + std::vector input_data = + {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f}; + test_case.add_input(ov::Shape{1, 4, 4}, input_data); + + // image_shape: [3, 3] + test_case.add_input(ov::Shape{2}, {3, 3}); + // block_shape: [2, 2] + test_case.add_input(ov::Shape{2}, {2, 2}); + + // Expected Output: [1, 1, 3, 3] + std::vector expected_output = {1.0f, 7.0f, 6.0f, 12.0f, 34.0f, 22.0f, 11.0f, 27.0f, 16.0f}; + test_case.add_expected_output(ov::Shape{1, 1, 3, 3}, expected_output); + test_case.run(); +} + +OPENVINO_TEST(${BACKEND_NAME}, onnx_col2im_dilations) { + const auto model = convert_model("col2im_2D_dilations_opset_18.onnx"); + auto test_case = ov::test::TestCase(model, s_device); + + // Input: [1, 4, 9] + std::vector input_data(36, 1.0f); + test_case.add_input(ov::Shape{1, 4, 9}, input_data); + + // image_shape: [5, 5] + test_case.add_input(ov::Shape{2}, {5, 5}); + // block_shape: [2, 2] + test_case.add_input(ov::Shape{2}, {2, 2}); + + // Expected Output: [1, 1, 5, 5] + std::vector expected_output = {1.0f, 1.0f, 2.0f, 1.0f, 1.0f, 1.0f, 1.0f, 2.0f, 1.0f, 1.0f, 2.0f, 2.0f, 4.0f, + 2.0f, 2.0f, 1.0f, 1.0f, 2.0f, 1.0f, 1.0f, 1.0f, 1.0f, 2.0f, 1.0f, 1.0f}; + test_case.add_expected_output(ov::Shape{1, 1, 5, 5}, expected_output); + test_case.run(); +} + +OPENVINO_TEST(${BACKEND_NAME}, onnx_col2im_pads) { + const auto model = convert_model("col2im_2D_pads_opset_18.onnx"); + auto test_case = ov::test::TestCase(model, s_device); + + // Input: [1, 4, 9] + std::vector input_data(36, 1.0f); + test_case.add_input(ov::Shape{1, 4, 9}, input_data); + + // image_shape: [2, 2] + test_case.add_input(ov::Shape{2}, {2, 2}); + // block_shape: [2, 2] + test_case.add_input(ov::Shape{2}, {2, 2}); + + // Expected Output: [1, 1, 2, 2] + std::vector expected_output = {4.0f, 4.0f, 4.0f, 4.0f}; + test_case.add_expected_output(ov::Shape{1, 1, 2, 2}, expected_output); + test_case.run(); +} + +OPENVINO_TEST(${BACKEND_NAME}, onnx_col2im_strides) { + const auto model = convert_model("col2im_2D_strides_opset_18.onnx"); + auto test_case = ov::test::TestCase(model, s_device); + + // Input: [1, 4, 4] + std::vector input_data(16, 1.0f); + test_case.add_input(ov::Shape{1, 4, 4}, input_data); + + // image_shape: [4, 4] + test_case.add_input(ov::Shape{2}, {4, 4}); + // block_shape: [2, 2] + test_case.add_input(ov::Shape{2}, {2, 2}); + + // Expected Output: [1, 1, 4, 4] + std::vector expected_output(16, 1.0f); + test_case.add_expected_output(ov::Shape{1, 1, 4, 4}, expected_output); + test_case.run(); +} + +OPENVINO_TEST(${BACKEND_NAME}, onnx_col2im_batch) { + const auto model = convert_model("col2im_2D_batch_opset_18.onnx"); + auto test_case = ov::test::TestCase(model, s_device); + + // Input: [2, 4, 4] + std::vector input_data(32, 1.0f); + test_case.add_input(ov::Shape{2, 4, 4}, input_data); + + // image_shape: [3, 3] + test_case.add_input(ov::Shape{2}, {3, 3}); + // block_shape: [2, 2] + test_case.add_input(ov::Shape{2}, {2, 2}); + + // Expected Output: [2, 1, 3, 3] + std::vector single_batch_output = {1.0f, 2.0f, 1.0f, 2.0f, 4.0f, 2.0f, 1.0f, 2.0f, 1.0f}; + std::vector expected_output; + expected_output.insert(expected_output.end(), single_batch_output.begin(), single_batch_output.end()); + expected_output.insert(expected_output.end(), single_batch_output.begin(), single_batch_output.end()); + + test_case.add_expected_output(ov::Shape{2, 1, 3, 3}, expected_output); + test_case.run(); +} + +OPENVINO_TEST(${BACKEND_NAME}, onnx_col2im_channel) { + const auto model = convert_model("col2im_2D_channel_opset_18.onnx"); + auto test_case = ov::test::TestCase(model, s_device); + + // Input: [1, 12, 4] + std::vector input_data(48, 1.0f); + test_case.add_input(ov::Shape{1, 12, 4}, input_data); + + // image_shape: [3, 3] + test_case.add_input(ov::Shape{2}, {3, 3}); + // block_shape: [2, 2] + test_case.add_input(ov::Shape{2}, {2, 2}); + + // Expected Output: [1, 3, 3, 3] + std::vector single_channel_output = {1.0f, 2.0f, 1.0f, 2.0f, 4.0f, 2.0f, 1.0f, 2.0f, 1.0f}; + std::vector expected_output; + for (int i = 0; i < 3; ++i) { + expected_output.insert(expected_output.end(), single_channel_output.begin(), single_channel_output.end()); + } + + test_case.add_expected_output(ov::Shape{1, 3, 3, 3}, expected_output); + test_case.run(); +} + // ############################################################################ OPERATOR TESTS OPENVINO_TEST(${BACKEND_NAME}, onnx_model_addmul_abc) { auto model = convert_model("addmul_abc.onnx"); diff --git a/src/frontends/onnx/tests/tests_python/test_backend.py b/src/frontends/onnx/tests/tests_python/test_backend.py index 1ca9486cbcdc8c..cdfeb958bdf1f6 100644 --- a/src/frontends/onnx/tests/tests_python/test_backend.py +++ b/src/frontends/onnx/tests/tests_python/test_backend.py @@ -1,6 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (C) 2018-2026 Intel Corporation # SPDX-License-Identifier: Apache-2.0 +# -*- coding: utf-8 -*- import platform import logging @@ -41,6 +41,7 @@ skip_bitwise_ui64, xfail_issue_99950, xfail_issue_99952, + xfail_issue_99954, xfail_issue_99961, xfail_issue_99968, xfail_issue_99969, @@ -380,11 +381,11 @@ def expect_fail(test_case_path, xfail): # type: (str) -> None ), ( 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", + "OnnxBackendNodeModelTest.test_col2im_5d_cpu" + ), + ( + xfail_issue_99954, + "OnnxBackendNodeModelTest.test_constant_pad_axes_cpu", ), ( xfail_issue_99961, From 00325b78c0ef6f5d0e025d29aef99b9655c05f86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=8C=80=ED=98=84=20=28Kim=20DaeHyun=29?= Date: Thu, 23 Apr 2026 20:37:23 +0900 Subject: [PATCH 02/10] Fix: Fix Col2Im test failing --- src/frontends/onnx/tests/__init__.py | 2 +- src/frontends/onnx/tests/tests_python/test_backend.py | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/frontends/onnx/tests/__init__.py b/src/frontends/onnx/tests/__init__.py index 798f13bfafb8f8..fccb3c4f003fcd 100644 --- a/src/frontends/onnx/tests/__init__.py +++ b/src/frontends/onnx/tests/__init__.py @@ -52,7 +52,7 @@ def xfail_test(reason="Mark the test as expected to fail", strict=True): "Axes input must be constant") skip_bitwise_ui64 = pytest.mark.skip(reason="AssertionError: Not equal to tolerance rtol=0.001, atol=1e-07") xfail_issue_99950 = xfail_test(reason="CenterCropPad func is not supported") -xfail_issue_99954 = xfail_test(reason="Constant Pad - RuntimeError: Shape inference of Reference node with name y failed") +xfail_issue_99952 = xfail_test(reason="Col2Im operator is not supported 5 dimensions") xfail_issue_99955 = xfail_test(reason="GroupNorm is not supported") xfail_issue_99957 = xfail_test(reason="LayerNorm - RuntimeError: While validating node ''") xfail_issue_99960 = xfail_test(reason="MVN - Results mismatch") diff --git a/src/frontends/onnx/tests/tests_python/test_backend.py b/src/frontends/onnx/tests/tests_python/test_backend.py index 408f02ec93427f..b93da8238bd5f1 100644 --- a/src/frontends/onnx/tests/tests_python/test_backend.py +++ b/src/frontends/onnx/tests/tests_python/test_backend.py @@ -383,10 +383,6 @@ def expect_fail(test_case_path, xfail): # type: (str) -> None xfail_issue_99952, "OnnxBackendNodeModelTest.test_col2im_5d_cpu" ), - ( - xfail_issue_99954, - "OnnxBackendNodeModelTest.test_constant_pad_axes_cpu", - ), ( xfail_issue_99961, "OnnxBackendNodeModelTest.test_optional_get_element_optional_sequence_cpu", From 13f1fe548be08e9d8b9b8ff7cfe0ec270737b754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=8C=80=ED=98=84=20=28Kim=20DaeHyun=29?= Date: Thu, 23 Apr 2026 20:40:45 +0900 Subject: [PATCH 03/10] Fix: Fix Col2Im test failing --- src/frontends/onnx/tests/tests_python/test_backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontends/onnx/tests/tests_python/test_backend.py b/src/frontends/onnx/tests/tests_python/test_backend.py index b93da8238bd5f1..e28cab7a9317e3 100644 --- a/src/frontends/onnx/tests/tests_python/test_backend.py +++ b/src/frontends/onnx/tests/tests_python/test_backend.py @@ -381,7 +381,7 @@ def expect_fail(test_case_path, xfail): # type: (str) -> None ), ( xfail_issue_99952, - "OnnxBackendNodeModelTest.test_col2im_5d_cpu" + "OnnxBackendNodeModelTest.test_col2im_5d_cpu", ), ( xfail_issue_99961, From 8795d549a1a200711ec0d1253f756040bcb7679e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=8C=80=ED=98=84=20=28Kim=20DaeHyun=29?= Date: Thu, 23 Apr 2026 21:17:10 +0900 Subject: [PATCH 04/10] Fix: Fix Col2Im test failing --- src/frontends/onnx/tests/tests_python/test_backend.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/frontends/onnx/tests/tests_python/test_backend.py b/src/frontends/onnx/tests/tests_python/test_backend.py index e28cab7a9317e3..acc23c7635aa78 100644 --- a/src/frontends/onnx/tests/tests_python/test_backend.py +++ b/src/frontends/onnx/tests/tests_python/test_backend.py @@ -41,7 +41,6 @@ skip_bitwise_ui64, xfail_issue_99950, xfail_issue_99952, - xfail_issue_99954, xfail_issue_99961, xfail_issue_99968, xfail_issue_99969, From d303dddf00b703e57a68917339a7f896ad831f64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=8C=80=ED=98=84=20=28Kim=20DaeHyun=29?= Date: Fri, 24 Apr 2026 16:40:15 +0900 Subject: [PATCH 05/10] Fix: Apply Review --- src/frontends/onnx/frontend/src/op/col2im.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/frontends/onnx/frontend/src/op/col2im.cpp b/src/frontends/onnx/frontend/src/op/col2im.cpp index bf63e4cb3d3d86..9a452a1361c828 100644 --- a/src/frontends/onnx/frontend/src/op/col2im.cpp +++ b/src/frontends/onnx/frontend/src/op/col2im.cpp @@ -53,8 +53,7 @@ ov::OutputVector col2im(const ov::frontend::onnx::Node& node) { // 3. return Col2Im return { - std::make_shared(data, output_size, kernel_size, strides, dilations, pads_begin, pads_end) - ->outputs()}; + std::make_shared(data, output_size, kernel_size, strides, dilations, pads_begin, pads_end)}; } ONNX_OP("Col2Im", OPSET_SINCE(1), ai_onnx::opset_18::col2im); From cc4f19bb10a4cea5e2af589a1ac1816a37d3fc2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=8C=80=ED=98=84=20=28Kim=20DaeHyun=29?= Date: Tue, 28 Apr 2026 02:00:11 +0900 Subject: [PATCH 06/10] Update src/frontends/onnx/tests/tests_python/test_backend.py Co-authored-by: Maxim Vafin --- src/frontends/onnx/tests/tests_python/test_backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontends/onnx/tests/tests_python/test_backend.py b/src/frontends/onnx/tests/tests_python/test_backend.py index acc23c7635aa78..d0554ce1e0649e 100644 --- a/src/frontends/onnx/tests/tests_python/test_backend.py +++ b/src/frontends/onnx/tests/tests_python/test_backend.py @@ -1,6 +1,6 @@ +# -*- coding: utf-8 -*- # Copyright (C) 2018-2026 Intel Corporation # SPDX-License-Identifier: Apache-2.0 -# -*- coding: utf-8 -*- import platform import logging From 781af48f57a74b25de4d277d9d5cbd087c84f831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=8C=80=ED=98=84=20=28Kim=20DaeHyun=29?= Date: Tue, 28 Apr 2026 02:00:22 +0900 Subject: [PATCH 07/10] Update src/frontends/onnx/tests/__init__.py Co-authored-by: Maxim Vafin --- src/frontends/onnx/tests/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontends/onnx/tests/__init__.py b/src/frontends/onnx/tests/__init__.py index fccb3c4f003fcd..6732e2c9114a21 100644 --- a/src/frontends/onnx/tests/__init__.py +++ b/src/frontends/onnx/tests/__init__.py @@ -1,6 +1,6 @@ +# -*- coding: utf-8 -*- # Copyright (C) 2018-2026 Intel Corporation # SPDX-License-Identifier: Apache-2.0 -# -*- coding: utf-8 -*- import pytest From 333243b3409178e8643640835f6ae25fe55d7679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=8C=80=ED=98=84=20=28Kim=20DaeHyun=29?= Date: Tue, 28 Apr 2026 19:04:51 +0900 Subject: [PATCH 08/10] Fix clang-format --- src/frontends/onnx/frontend/src/op/col2im.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/frontends/onnx/frontend/src/op/col2im.cpp b/src/frontends/onnx/frontend/src/op/col2im.cpp index 9a452a1361c828..2b62729f696267 100644 --- a/src/frontends/onnx/frontend/src/op/col2im.cpp +++ b/src/frontends/onnx/frontend/src/op/col2im.cpp @@ -52,9 +52,13 @@ ov::OutputVector col2im(const ov::frontend::onnx::Node& node) { pads_end.assign(pads.begin() + spatial_rank, pads.end()); // 3. return Col2Im - return { - std::make_shared(data, output_size, kernel_size, strides, dilations, pads_begin, pads_end)}; -} + return {std::make_shared(data, + output_size, + kernel_size, + strides, + dilations, + pads_begin, + pads_end)}; ONNX_OP("Col2Im", OPSET_SINCE(1), ai_onnx::opset_18::col2im); } // namespace opset_18 From 3c6bacfa03473d4c97d417e74ccd2e77cdb96fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=8C=80=ED=98=84=20=28Kim=20DaeHyun=29?= Date: Wed, 29 Apr 2026 03:12:59 +0900 Subject: [PATCH 09/10] Fix clang-format --- src/frontends/onnx/frontend/src/op/col2im.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontends/onnx/frontend/src/op/col2im.cpp b/src/frontends/onnx/frontend/src/op/col2im.cpp index 2b62729f696267..4f8f955136b359 100644 --- a/src/frontends/onnx/frontend/src/op/col2im.cpp +++ b/src/frontends/onnx/frontend/src/op/col2im.cpp @@ -60,7 +60,7 @@ ov::OutputVector col2im(const ov::frontend::onnx::Node& node) { pads_begin, pads_end)}; -ONNX_OP("Col2Im", OPSET_SINCE(1), ai_onnx::opset_18::col2im); + ONNX_OP("Col2Im", OPSET_SINCE(1), ai_onnx::opset_18::col2im); } // namespace opset_18 } // namespace ai_onnx } // namespace onnx From 1b3ad15dfc61beb37cbdf337101f7e434217e624 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=8C=80=ED=98=84=20=28Kim=20DaeHyun=29?= Date: Wed, 29 Apr 2026 21:24:22 +0900 Subject: [PATCH 10/10] Fix build error --- src/frontends/onnx/frontend/src/op/col2im.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontends/onnx/frontend/src/op/col2im.cpp b/src/frontends/onnx/frontend/src/op/col2im.cpp index 4f8f955136b359..154226c5f21953 100644 --- a/src/frontends/onnx/frontend/src/op/col2im.cpp +++ b/src/frontends/onnx/frontend/src/op/col2im.cpp @@ -59,8 +59,9 @@ ov::OutputVector col2im(const ov::frontend::onnx::Node& node) { dilations, pads_begin, pads_end)}; +} - ONNX_OP("Col2Im", OPSET_SINCE(1), ai_onnx::opset_18::col2im); +ONNX_OP("Col2Im", OPSET_SINCE(1), ai_onnx::opset_18::col2im); } // namespace opset_18 } // namespace ai_onnx } // namespace onnx