-
Notifications
You must be signed in to change notification settings - Fork 19.6k
Add support for numpy.flip in OpenVINO backend #21132
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
base: master
Are you sure you want to change the base?
Add support for numpy.flip in OpenVINO backend #21132
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #21132 +/- ##
==========================================
- Coverage 82.70% 82.69% -0.01%
==========================================
Files 564 564
Lines 54159 54178 +19
Branches 8414 8418 +4
==========================================
+ Hits 44792 44805 +13
- Misses 7294 7297 +3
- Partials 2073 2076 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Hi @PraroopChanda Can you please resolve the conflicts? Thank you! |
Done. |
DO NOT merge! Need review. |
@@ -88,6 +87,7 @@ NumpyOneInputOpsCorrectnessTest::test_cumprod | |||
NumpyOneInputOpsCorrectnessTest::test_diag | |||
NumpyOneInputOpsCorrectnessTest::test_diagonal | |||
NumpyOneInputOpsCorrectnessTest::test_exp2 | |||
NumpyOneInputOpsCorrectnessTest::test_expm1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please revert this change that is not related to PR
@@ -88,6 +87,7 @@ NumpyOneInputOpsCorrectnessTest::test_cumprod | |||
NumpyOneInputOpsCorrectnessTest::test_diag | |||
NumpyOneInputOpsCorrectnessTest::test_diagonal | |||
NumpyOneInputOpsCorrectnessTest::test_exp2 | |||
NumpyOneInputOpsCorrectnessTest::test_expm1 | |||
NumpyOneInputOpsCorrectnessTest::test_flip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove the line with NumpyOneInputOpsCorrectnessTest::test_flip
reversed_indices = ov_opset.range(start, stop, step, Type.i64).output(0) | ||
x = ov_opset.gather( | ||
x, reversed_indices, ov_opset.constant(ax, Type.i64).output(0) | ||
).output(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks not optimal. We have special op for reversing a tensor along required axis. Check
https://docs.openvino.ai/2025/api/ie_python_api/_autosummary/openvino.runtime.opset1.reverse_sequence.html#openvino.runtime.opset1.reverse_sequence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @rkazants ,
I have a few prior deadlines this week, so I might need a bit of time to incorporate the requested changes.
I’ll get to it as soon as possible.
Thank you for your patience!
Summary
Fixes openvinotoolkit/openvino#29359
This PR adds OpenVINO backend support for
numpy.flip
in Keras 3.Please Review the PR @rkazants