Skip to content

[DON'T BE REVIEWED]ClearBuffer in advance to Support concurrent use with explicit Session streams - #32669

Draft
Xiaofei Han (xiaofeihan1) wants to merge 7 commits into
mainfrom
xiaofeihan-microsoft-webgpu-stream-recycling
Draft

Xiaofei Han (xiaofeihan1) wants to merge 7 commits into
mainfrom
xiaofeihan-microsoft-webgpu-stream-recycling

Conversation

@xiaofeihan1

Copy link
Copy Markdown
Contributor

Description

Motivation and Context

Partition command recording, graph capture, and buffer cache state per session while retaining the context-level buffer manager for session-less plugin EP allocation and data transfer. Guard shared pipeline cache access and keep deferred-dispatch resources alive until submission.
Keep command recording state per session while protecting context-level buffer cache containers with an internal mutex.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve explicit streams for single plugin tensor copies so I/O binding uploads follow stream-ordered buffer clears. Restore deferred dispatch encoding before WebGPU uploads and device copies, add regression coverage, and fix formatting.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Allocate plugin kernel scratch tensors on their owning Session streams while preserving immediate cached-buffer clears for ordinary allocations. Require implicit device synchronization for native devices and document allocator ownership and usage. Add regressions for mixed copies, scratch reuse, allocator concurrency, and native device feature validation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve the complete explicit Session stream implementation with unified recycle-time clearing. Remove the separately tracked core forwarding change and five explicitly excluded tests; document the remaining mixed-output correctness limitation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Allow caller-supplied native devices without ImplicitDeviceSynchronization with an initialization warning requiring caller-serialized access. Preserve the internal device invariant and automatic feature request. Replace the external-device rejection test with a focused acceptance/warning regression and document the concurrency boundary.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

1 participant