Add support for numpy.flip in OpenVINO backend#21132
Add support for numpy.flip in OpenVINO backend#21132PraroopChanda wants to merge 2 commits intokeras-team:masterfrom
Conversation
Codecov Report❌ 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. |
| NumpyOneInputOpsCorrectnessTest::test_diag | ||
| NumpyOneInputOpsCorrectnessTest::test_diagonal | ||
| NumpyOneInputOpsCorrectnessTest::test_exp2 | ||
| NumpyOneInputOpsCorrectnessTest::test_expm1 |
There was a problem hiding this comment.
please revert this change that is not related to PR
| NumpyOneInputOpsCorrectnessTest::test_diagonal | ||
| NumpyOneInputOpsCorrectnessTest::test_exp2 | ||
| NumpyOneInputOpsCorrectnessTest::test_expm1 | ||
| NumpyOneInputOpsCorrectnessTest::test_flip |
There was a problem hiding this comment.
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.
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.
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!
|
This PR is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you. |
|
This PR was closed because it has been inactive for 28 days. Please reopen if you'd like to work on this further. |
Summary
Fixes openvinotoolkit/openvino#29359
This PR adds OpenVINO backend support for
numpy.flipin Keras 3.Please Review the PR @rkazants