[OpenVINO] Partial upgrade to opset16 for select operations#22600
[OpenVINO] Partial upgrade to opset16 for select operations#22600goyaladitya05 wants to merge 6 commits intokeras-team:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #22600 +/- ##
==========================================
- Coverage 83.28% 75.62% -7.67%
==========================================
Files 596 596
Lines 68089 68071 -18
Branches 10607 10603 -4
==========================================
- Hits 56711 51480 -5231
- Misses 8634 14104 +5470
+ Partials 2744 2487 -257
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:
|
There was a problem hiding this comment.
Code Review
This pull request refactors the segment_max and istft functions in the Keras OpenVINO backend to leverage native OpenVINO opset16 operations. The new segment_max implementation needs to be adjusted to correctly handle negative segment_ids and infer num_segments to ensure parity with Keras semantics. Additionally, the istft implementation may require restoring batch dimension flattening logic to properly handle inputs with multiple batch dimensions, as its removal could lead to incorrect results.
hertschuh
left a comment
There was a problem hiding this comment.
It looks like something is not working right with ov_istft16 (tests are failing).
As discussed previously in #22446, introducing a partial upgrade to OpenVINO's opset16, for the ops
istftandsegment_max. (these are newly added in this opset)We are not going for a complete upgrade, because there is a bug in opset16 due to some missing ops. It has been fixed upstream, and will be corrected in 2026.1 or 2026.2.
Also refactored the helper fn _segment_reduction_fn into segment_sum, since it is the only caller now.