Skip to content

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

Draft
mostafafaheem wants to merge 1 commit into
ravi9:dev_backend_openvinofrom
mostafafaheem:unsqueeze_before_view
Draft

mostafafaheem wants to merge 1 commit into
ravi9:dev_backend_openvinofrom
mostafafaheem:unsqueeze_before_view

Conversation

@mostafafaheem

Copy link
Copy Markdown
Collaborator

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
Collaborator 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
Collaborator 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
@ravi9
ravi9 force-pushed the dev_backend_openvino branch 2 times, most recently from fd9bc04 to 33237ab Compare September 3, 2026 21:10
@ravi9
ravi9 force-pushed the dev_backend_openvino branch from 37b4e1d to 926ef68 Compare September 14, 2026 17:49
@mostafafaheem
mostafafaheem force-pushed the unsqueeze_before_view branch 2 times, most recently from 37b9a91 to a8ec243 Compare September 16, 2026 06:31
@wine99
wine99 force-pushed the dev_backend_openvino branch from 0365b00 to 37b53fd Compare September 16, 2026 08:07
@ravi9
ravi9 force-pushed the dev_backend_openvino branch from 40a2a96 to 972d231 Compare September 17, 2026 17:37
@ravi9
ravi9 force-pushed the dev_backend_openvino branch 2 times, most recently from 6b08f8a to ab07546 Compare September 30, 2026 22:54
@mostafafaheem
mostafafaheem force-pushed the unsqueeze_before_view branch from 7e40846 to 2386665 Compare October 1, 2026 12:17
@ravi9
ravi9 force-pushed the dev_backend_openvino branch 4 times, most recently from 308ccd8 to 836d571 Compare October 3, 2026 19:48
@mostafafaheem
mostafafaheem force-pushed the unsqueeze_before_view branch from 2da40d7 to d943707 Compare October 8, 2026 02:33
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