openvinotoolkit / openvino

OpenVINO™ is an open-source toolkit for optimizing and deploying AI inference
https://docs.openvino.ai
Apache License 2.0
7.23k stars 2.26k forks source link

[Good First Issue]: Align behavior of ONNX Frontend function ReduceL1-11, 13, 18 with original framework #20559

Open gkrivor opened 1 year ago

gkrivor commented 1 year ago

Context

Neural networks are graphs consisting of nodes called operators. Each operator corresponds to a mathematical function, usually described in framework's documentation or an AI standard, such as ONNX. OpenVINO ONNX Frontend is a component responsible for working with ONNX graphs and requires implementation of different ONNX operators in order to use ONNX models. This task requires alignment between OpenVINO ONNX Frontend and original framework implementations of ReduceL1 for next list of opsets: opset 11, opset 13, opset 18 Necessary help will be provided by ONNX Fronted team.

What needs to be done?

First of all, please, take a look on ReduceMax PR for a reference.

Operator details can be found in ONNX Operators More details can be found in ONNX Changelog: opset 11, opset 13, opset 18

  1. Function already has a common implementation in OpenVINO. First of all, you need to review a documentation and prepare a table with differences between versions. It could be, for instance, a missing property, extended/reduced coverage of existing property, etc...
  2. Copy existing implementation here to make it aligned with original framework (extend or reduce coverage of a common implementation). Copy of modified implementation should be in a defined opset, or in opset 1 in case it implements oldest implementation. Example of multi-opset operation.
  3. Register the function in ops_bridge.cpp while keeping alphabetical order
  4. Create test model(s) in ONNX models directory. OpenVINO test infrastructure then converts prototxt files to ONNX models - you will use those models later in tests
  5. Add tests covering all use cases here
  6. Check Python xfailed tests to find a test marked as a xfailed for added functionality. If any exist - remove corresponding lines and try to verify by using cmdline "python -m pytest -k name_of_test". More details in adding operators to ONNX Frontend guide

Example Pull Requests

No response

Resources

Contact points

@gkrivor

Ticket

No response

Gabriellgpc commented 10 months ago

.take

github-actions[bot] commented 10 months ago

Thank you for looking into this issue! Please let us know if you have any questions or require any help.

p-wysocki commented 10 months ago

I am happy to announce that we have created a channel dedicated to Good First Issues support on our Intel DevHub Discord server! Join it to receive support, engage in discussions, ask questions and talk to OpenVINO developers.

p-wysocki commented 10 months ago

I'm reopening the issue due to current assignee's inactivity. If you with to repick the issue please let me know.

RitikaxShakya commented 9 months ago

.take

github-actions[bot] commented 9 months ago

Thank you for looking into this issue! Please let us know if you have any questions or require any help.

RitikaxShakya commented 9 months ago

@gkrivor Hello! I have created the table of differences and changes made on versions of ReduceL1 image

image
gkrivor commented 9 months ago

@RitikaxShakya awesome! I'll add link to a issue with similar discussion: https://github.com/openvinotoolkit/openvino/issues/20553

Now I'm expecting to achieve something like https://github.com/openvinotoolkit/openvino/blob/master/src/frontends/onnx/frontend/src/op/softmax.cpp which will implement a found differences.

Also you will need to add a tests for exact implementations like here: https://github.com/openvinotoolkit/openvino/pull/21825

I mean a prototxt file and corresponing unit test to verify a correctness.

p-wysocki commented 9 months ago

Hello @RitikaxShakya, are you still working on that issue?

RitikaxShakya commented 9 months ago

Yes, I am still working on it, I have made the changes so now working on running tests.

gkrivor commented 9 months ago

@RitikaxShakya hi, I had a chance take a look on set of Reduce*-18 operations. All of them could have issues with tests due to problems with a shape inference, because of newly added axes-input. I'll fix it soon.

RitikaxShakya commented 9 months ago

Thank you

p-wysocki commented 8 months ago

Helo @RitikaxShakya, are you still working on that issue?

RitikaxShakya commented 8 months ago

Yes I am working on it as the issues with tests due to problems with a shape inference, because of newly added axes-input is fixed.

RitikaxShakya commented 8 months ago

@gkrivor @p-wysocki Hello! I have completed all 6 steps mentioned in the issue description and here's the PR

RitikaxShakya commented 7 months ago

Hello, I would like if someone @gkrivor @p-wysocki can review my PR. I have updated it with new changes while taking ReduceMax as reference. Had some closed PRs (sorry about this) because i got into some issue while resolving merging conflicts so created another pr for this. Thank you!

hub-bla commented 1 month ago

Hey @mlukasze, @gkrivor, I think it can be closed due to #25909.