docs(executorch): note the single-CUDA-stream requirement for coalesced .pte - #4444
Open
Conarnar wants to merge 1 commit into
Open
docs(executorch): note the single-CUDA-stream requirement for coalesced .pte#4444Conarnar wants to merge 1 commit into
Conarnar wants to merge 1 commit into
Conversation
…ed .pte A coalesced TensorRT + CUDA .pte runs on multiple backend delegates, each of which enqueues async GPU work on its own CUDA stream by default. Because separate streams are unordered, a consuming delegate can read a producing delegate's output before it is ready -- an intermittent race that shows up as wrong results or an illegal memory access. Document that unifying all delegates onto one caller-provided CUDA stream is the runner's responsibility, and that a runner reading delegate outputs between calls (e.g. an autoregressive decode loop) must synchronize that stream before reading.
Contributor
|
Thanks for documenting the single-stream requirement for coalesced programs. Heads up that the shared caller-stream integration for the TensorRT delegate is landing |
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.
A coalesced TensorRT + CUDA .pte runs on multiple backend delegates, each of which
enqueues async GPU work on its own CUDA stream by default. Because separate streams
are unordered, a consuming delegate can read a producing delegate's output before it
is ready -- an intermittent race that shows up as wrong results or an illegal memory
access.
Document that unifying all delegates onto one caller-provided CUDA stream is the
runner's responsibility, and that a runner reading delegate outputs between calls
(e.g. an autoregressive decode loop) must synchronize that stream before reading.