Skip to content

Fix dynamic handling of view op in OpenVINO backend and enable get_row#162

Merged
zhaixuejun1993 merged 3 commits into
ravi9:dev_backend_openvinofrom
zhaixuejun1993:xuejun/fix-gemma4-issue
May 13, 2026
Merged

Fix dynamic handling of view op in OpenVINO backend and enable get_row#162
zhaixuejun1993 merged 3 commits into
ravi9:dev_backend_openvinofrom
zhaixuejun1993:xuejun/fix-gemma4-issue

Conversation

@zhaixuejun1993
Copy link
Copy Markdown
Collaborator

This pull request improves the handling of "view" inputs in the OpenVINO backend, specifically for the get_rows operation. The update introduces a more robust and unified approach for processing view inputs, enabling more efficient slicing when possible and simplifying the overall logic. The most important changes are grouped below:

Improved handling of view inputs

  • Replaced the legacy logic in openvino/op/get_rows.cpp to always process both data and indices inputs using the new process_view_input_new function, ensuring consistent handling regardless of input source.
  • Enhanced process_view_input_new in openvino/utils.cpp to detect when a view can be represented as a simple slice along a single dimension, and to generate an efficient Slice node in those cases, improving performance and clarity.

Cleanup and compatibility

  • Removed GGML_OP_GET_ROWS from the set of operations that do not support view inputs in ggml-openvino.cpp, reflecting the improved support for views in the updated logic.…enable view + get_row

Overview

Additional information

Requirements

@zhaixuejun1993 zhaixuejun1993 merged commit 17c1563 into ravi9:dev_backend_openvino May 13, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant