onnxruntime
2db2a3ab - [WebGPU] Preserve pending JSEP reads before CPU uploads (#33361)

Commit
6 days ago
[WebGPU] Preserve pending JSEP reads before CPU uploads (#33361) CPU-to-GPU uploads can overwrite a reused JSEP input buffer while earlier compute or copy commands still read it in an unsubmitted encoder, causing kernels to use the next tensor's data. Flush pending commands before uploading. Add six real WebGPU regression cases covering compute and memcpy readers with aligned, unaligned-offset, and padded uploads. The native WebGPU upload path already preserves this ordering and needs no change. Validation: all six regressions fail on the base and pass with the fix (zero skips) in Windows Chrome 155, using the backend bundled from this checkout. TypeScript prebuild checks, ESLint, Prettier, and git diff --check pass. Full Wasm-model E2E and native test suites were not run. Each upload with pending commands may add a queue submission; uploads with no encoder retain the existing no-op flush behavior. Related: #32939 proposes the same upload-ordering fix and remains open; this change adds backend-level regression coverage. Fixes #32938.
Author
Parents
Loading