webgpu: align tensor bindings to the type block size - #28382
Merged
ServeurpersoCom merged 1 commit intoSep 12, 2026
Merged
Conversation
Walk the binding offset back until the distance to the tensor is a whole number of blocks, so block quantized views get a valid element offset in the shader.
ServeurpersoCom
force-pushed
the
webgpu-get-rows-misalign
branch
from
September 7, 2026 10:25
0df5b66 to
b3fb316
Compare
Contributor
Author
|
Rebase only |
Member
|
@reeselevine gentle ping, can you take a look at this when you have a chance? |
reeselevine
approved these changes
Sep 12, 2026
Contributor
|
looks like it may need some formatting fixes? |
Contributor
Author
1 task done
pl752
pushed a commit
to pl752/llama.cpp
that referenced
this pull request
Sep 15, 2026
Walk the binding offset back until the distance to the tensor is a whole number of blocks, so block quantized views get a valid element offset in the shader.
quimmedes
pushed a commit
to quimmedes/cafe-llama.cpp
that referenced
this pull request
Sep 16, 2026
Walk the binding offset back until the distance to the tensor is a whole number of blocks, so block quantized views get a valid element offset in the shader.
zsogitbe
pushed a commit
to zsogitbe/llama.cpp
that referenced
this pull request
Sep 17, 2026
Walk the binding offset back until the distance to the tensor is a whole number of blocks, so block quantized views get a valid element offset in the shader.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This fixes the GET_ROWS failures that #28253 exposes on the WebGPU runners, the binding offset is now walked back to a multiple of the type block size so block quantized views get a valid element offset in the shader, validated locally against the CI Dawn build on an RTX PRO 6000 (207/207 GET_ROWS, 12011/12011 full suite).
Additional information
Walk the binding offset back until the distance to the tensor is a whole number of blocks, so block quantized views get a valid element offset in the shader.
Test
Tested with the CI Dawn build on an RTX PRO 6000, test-backend-ops goes from 157/207 to 207/207 on GET_ROWS and the full suite passes 12011/12011.
Requirements