Skip to content

Conversation

CharlieFRuan
Copy link
Member

This PR overrides PrintVecElemLoad() and PrintVecElemStore() for the WebGPU backend.

Otherwise, we would generate things like (QK_local[0i].s0) for WebGPU, which is not a valid syntax in WGSL. Instead, we generate (QK_local[0i][0]) after this PR. QK_local here is a array<vec4<f32>, 1>.

This issue prevented WebLLM from generating the correct kernel after #17748

@MasterJH5574 MasterJH5574 merged commit 3f27aa8 into apache:main May 4, 2025
10 checks passed
ShiboXing pushed a commit to ShiboXing/tvm that referenced this pull request Aug 10, 2025
…che#17917)

This PR overrides `PrintVecElemLoad()` and `PrintVecElemStore()`
for the WebGPU backend.

Otherwise, we would generate things like `(QK_local[0i].s0)` for
WebGPU, which is not a valid syntax in WGSL.
Instead, we generate `(QK_local[0i][0])` after this PR. `QK_local` here
is a `array<vec4<f32>, 1>`. 

This issue prevented WebLLM from generating the correct kernel
after apache#17748

Co-authored-by: Ruihang Lai <[email protected]>
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.

2 participants