[Webgpu] Avoid mappedAtCreation staging upload - #29846
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the WebGPU GpuDataManager.upload() implementation to avoid using per-upload mappedAtCreation: true staging buffers (which were failing/hanging on Windows Chrome/WebGPU CI), and instead performs CPU→GPU uploads via device.queue.writeBuffer() while preserving the existing 16-byte zero-padded alignment behavior.
Changes:
- Replaced the staging-buffer +
copyBufferToBufferupload path withqueue.writeBuffer()into the destination GPU buffer. - Preserved the previous “round up to 16 bytes and zero-pad” upload semantics by writing an aligned
Uint8Array(size).
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Review: PR #29846 — [Webgpu] Avoid mappedAtCreation staging upload (head
|
Fix CI failures like https://github.com/microsoft/onnxruntime/actions/runs/29993467798/job/89171381036
Root cause
Change
Validation