JCNTH opened a new pull request, #20424:
URL: https://github.com/apache/tvm/pull/20424

   `packGridDimX` is the number of workgroups requested along x, so valid 
packed ids are `[0, packGridDimX)`. The emitted guard only returned for `id > 
packGridDimX`, letting `id == packGridDimX` run.
   
   The web runtime folds `blockIdx.x` into `blockIdx.z` to stay under the 65535 
workgroups-per-dimension limit and pads x up when it is odd, so that id really 
is launched: for N = 100277 it dispatches (50139, 1, 2) = 100278 workgroups, 
and the extra one wrote `B[N]` past the end of an N-row buffer.
   
   Fix: `>` → `>=`. The new codegen test pins the emitted WGSL; it fails on the 
current codegen and passes with this change.
   
   `tests/python/codegen/test_target_codegen_webgpu.py`: 22 passed. pre-commit 
clean.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to