Skip to content

ggml-openvino : fix 2D/3D view input shape inference - #303

Draft
mostafafaheem wants to merge 2 commits into
ravi9:dev_backend_openvinofrom
mostafafaheem:unsqueeze_before_view
Draft

ggml-openvino : fix 2D/3D view input shape inference#303
mostafafaheem wants to merge 2 commits into
ravi9:dev_backend_openvinofrom
mostafafaheem:unsqueeze_before_view

Conversation

@mostafafaheem

Copy link
Copy Markdown

Overview

  • Some weight tensors have 2D/3D shapes which would be incompatible with the 4D slices emitted in the process_view_input_new util. This PR introduces an Unsqueeze to 4D in order to avoid this issue.

Additional information

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: YES, AI told me how to use Unsqueeze and I used tab autocomplete for the 2nd if block

@mostafafaheem

mostafafaheem commented Aug 27, 2026

Copy link
Copy Markdown
Author

@cavusmustafa @wine99 @zhaixuejun1993 Interested to know what you think about this.

Side note: I was tempted to do some more changes in this PR that I found already were done in #240. It would be nice if that PR was merged after rebasing and resolving conflicts. I'd be happy to take that on if you want.

@mostafafaheem
mostafafaheem marked this pull request as draft August 27, 2026 19:16
@mostafafaheem

Copy link
Copy Markdown
Author

Converted to draft until end-to-end execution on Gemma 4 MMProj (model where this issue was encoutered) is correct.

@wine99
wine99 force-pushed the dev_backend_openvino branch from 01d5a57 to 40d3fdd Compare August 28, 2026 01:36
@mostafafaheem
mostafafaheem force-pushed the unsqueeze_before_view branch from 7941508 to e055c16 Compare August 28, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant