Repository navigation
Conversation
Free synchronous allocations with cuMemFreeAsync on a separate nonblocking stream. Wait on the background worker to avoid blocking unrelated stream operations. Fall back to cuMemFree if unsupported or stream creation fails.
Restore capture mode after querying or waiting for retirement events. Destroy completion events before releasing external context owners. Signed-off-by: ruolingp <33434617+Ninzore@users.noreply.github.com>
Separate completion polling from owner cleanup. Keep blocking resource destruction away from completion polling. Signed-off-by: ruolingp <33434617+Ninzore@users.noreply.github.com>
Move driver queries, event recording, and recycling out of Stream::drop. Keep stream resources alive until queued GPU work completes. Signed-off-by: ruolingp <33434617+Ninzore@users.noreply.github.com>
Snapshot context-wide completion before retiring per-thread streams. Isolate context cleanup so one blocked owner cannot delay another context. Signed-off-by: ruolingp <33434617+Ninzore@users.noreply.github.com>
Ninzore
requested review from
elibol,
kkraus14,
nihalpasham and
rparolin
as code owners
November 19, 2026 12:34
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prevent owned stream destruction from blocking on queued GPU work or driver contention, while keeping stream resources and context owners alive until completion. Free synchronous allocations with cuMemFreeAsync on a private stream when supported, avoiding context-wide stalls. Fix #1768
Changes
Testing
Validated on an NVIDIA RTX PRO 4500 Blackwell.
Checklist