onnxruntime
79d3fcf1 - [WebGPU] Guard padded workgroups after dispatch normalization (#33167)

Commit
10 days ago
[WebGPU] Guard padded workgroups after dispatch normalization (#33167) ### Description <!-- Describe your changes. --> - Add a shared, workgroup-uniform guard that rejects normalization-added workgroups before buffer accesses, workgroup barriers, or Split-K decomposition. - Use the shared logical-coordinate initializer in Intel subgroup GEMM and MatMul shaders. - Harden host-side dispatch and spatial-size arithmetic against overflow, including overflow-safe  CeilDiv . - Add direct normalization and utility tests, a focused GPU probe for logical coordinates and padding protection, and a Conv regression using its production program builder. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> Dispatch normalization can round up the number of launched workgroups. For example, logical dispatch (1,1,70000) becomes physical dispatch (265,265,1), introducing 225 extra workgroups. The affected packed GEMM shaders reconstructed logical coordinates without rejecting these extra groups. This could cause accesses to nonexistent batches and writes beyond the tensor’s logical extent, potentially beyond its allocated buffer. The guard preserves the original logical bounds while retaining the existing normalization strategy. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: cdfb9ae7-1055-44fb-a2c4-de648a06dfef
Author
Parents
Loading