Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ONNX] Align behavior of ONNX Frontend operator ReduceMean-11, 13, 18 with original framework #23148

Merged
merged 20 commits into from
Jun 5, 2024

Conversation

rghvsh
Copy link
Contributor

@rghvsh rghvsh commented Feb 28, 2024

Details:

  • Align behavior of ONNX Frontend operator ReduceMean-11, 13, 18 with original framework

Tickets:

@gkrivor
Copy link
Contributor

gkrivor commented Mar 13, 2024

Hi, I refactored reduce.cpp and reduce.hpp. I think it should be more simple to add a new functionality.

Please, rebase after merge.

#23429

@gkrivor
Copy link
Contributor

gkrivor commented Mar 15, 2024

Hi @rghvsh ,

Please, take a look on #23475 as a reference

@rghvsh
Copy link
Contributor Author

rghvsh commented Mar 29, 2024

Hi @gkrivor! I had a few questions:

do we need to add opset 11 to reduce.hpp
do we need to add opset 13 to reduce.cpp and reduce.hpp
in ops_bridge do I explicitly mention opset 11,13,18 or type this
register_operator("ReduceMean", VersionRange{1, 17}, op::set_1::reduce_mean);
register_operator("ReduceLogSum", VersionRange::since(18), op::set_1::reduce_mean);

Thank You

Copy link
Contributor

This PR will be closed in a week because of 2 weeks of no activity.

@github-actions github-actions bot added the Stale label Apr 13, 2024
@rghvsh
Copy link
Contributor Author

rghvsh commented Apr 15, 2024

Hi @gkrivor @mitruska @onnx do you have any suggestions

@github-actions github-actions bot removed the Stale label Apr 16, 2024
@rghvsh
Copy link
Contributor Author

rghvsh commented Apr 28, 2024

Hi @gkrivor make changes today

}
opset_import {
domain: ""
version: 16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add a model for Opset-18. Please, take a look on reduce_max_18.prototxt as an example.

Major thing you should reflect - provide an "axes" as an input instead of an attribute

@gkrivor
Copy link
Contributor

gkrivor commented Apr 29, 2024

@rghvsh as you can see, your change is very important and fix a lot of failing tests:
https://github.com/openvinotoolkit/openvino/actions/runs/8875797101/job/24366553495?pr=23148
Let's complete it asap. You need to remove failing cases from https://github.com/openvinotoolkit/openvino/blob/master/src/frontends/onnx/tests/tests_python/test_backend.py

Copy link
Contributor

@mitruska mitruska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import code LGTM, but the tests are missing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test model has been added, but there is no unit test code for it, so it's not tested.
For each added model there should be corresponding test in openvino/src/frontends/onnx/tests/onnx_import.in.cpp.
Also please keep the names of the onnx test models files aligned (snake_case).

Example:

OPENVINO_TEST(${BACKEND_NAME}, onnx_model_reduce_log_sum_18_axes_as_input) {
auto model = convert_model("reduce_log_sum_18_axes_as_input.onnx");

@gkrivor
Copy link
Contributor

gkrivor commented May 13, 2024

@rghvsh could you add some tests and remove test which are working after your changes (take a look on my previous comment)?

@gkrivor
Copy link
Contributor

gkrivor commented May 20, 2024

@rghvsh any updates?

@gkrivor
Copy link
Contributor

gkrivor commented May 23, 2024

build_jenkins

@gkrivor
Copy link
Contributor

gkrivor commented May 31, 2024

build_jenkins

@gkrivor
Copy link
Contributor

gkrivor commented Jun 3, 2024

build_jenkins

@gkrivor
Copy link
Contributor

gkrivor commented Jun 3, 2024

build_jenkins

@gkrivor
Copy link
Contributor

gkrivor commented Jun 5, 2024

build_jenkins

@gkrivor gkrivor added this pull request to the merge queue Jun 5, 2024
Merged via the queue into openvinotoolkit:master with commit c87cf86 Jun 5, 2024
116 checks passed
@andrei-kochin andrei-kochin added this to the 2024.3 milestone Jun 5, 2024
mory91 pushed a commit to mory91/openvino that referenced this pull request Jun 10, 2024
… with original framework (openvinotoolkit#23148)

### Details:
- Align behavior of ONNX Frontend operator ReduceMean-11, 13, 18 with
original framework

### Tickets:
 - Closes openvinotoolkit#20556

---------

Co-authored-by: Georgy Krivoruchko <georgy.krivoruchko@intel.com>
alexandruenache1111 pushed a commit to alexandruenache1111/openvino that referenced this pull request Jun 13, 2024
… with original framework (openvinotoolkit#23148)

### Details:
- Align behavior of ONNX Frontend operator ReduceMean-11, 13, 18 with
original framework

### Tickets:
 - Closes openvinotoolkit#20556

---------

Co-authored-by: Georgy Krivoruchko <georgy.krivoruchko@intel.com>
allnes pushed a commit to allnes/openvino that referenced this pull request Jun 27, 2024
… with original framework (openvinotoolkit#23148)

### Details:
- Align behavior of ONNX Frontend operator ReduceMean-11, 13, 18 with
original framework

### Tickets:
 - Closes openvinotoolkit#20556

---------

Co-authored-by: Georgy Krivoruchko <georgy.krivoruchko@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: ONNX FE OpenVINO ONNX FrontEnd ExternalPR External contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Good First Issue]: Align behavior of ONNX Frontend operator ReduceMean-11, 13, 18 with original framework
5 participants