Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/23370
Note: Links to docs will display an error until the docs builds have been completed. ❌ 6 New Failures, 3 Unclassified FailuresAs of commit 2548fb5 with merge base c16dd0a ( NEW FAILURES - The following jobs have failed:
UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This was referenced Oct 2, 2026
This was referenced Oct 2, 2026
This was referenced Oct 2, 2026
This PR needs a
|
This branch was successfully 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.
Stack from ghstack (oldest at bottom):
The CUDA counterpart of ModuleExecutor, in backends/cuda/batching: implements
the neutral batching::Executor over a cell-layout off-graph KV cache, so the
neutral Runner and DecodeFirstScheduler drive a CUDA program unchanged.
The CUDA backend compiles static graphs, so where ModuleExecutor runs one
forward, CudaExecutor runs two methods and routes each slice of a batch:decode: one token, static. A CUDA graph is captured for it by default.prefill: dynamic from 2 tokens to its exported width W, eager.plan_slices (step_plan.h, header-only) cuts a batch into forwards of at most
W tokens, in order; a lone tail token runs decode. Each slice declares its
tokens to the cache, runs, and samples its selected rows.
create():
must be
selectedsince decode's selector is static at one row);get_offgraph_kv_max_cellsand builds thebatched-cellcache withthe program's max_cells and W, which fix the step buffers' shapes;
weight_sharing_across_methods(default on) andenable_cuda_graph_for_method=decode(default on). Both are overridable.initialize() loads both methods with the cache's registry key. Session,
clone, sampling and build_step are copied from ModuleExecutor; a follow-up
diff moves the shared parts into extension/llm/batching/util.
Builds with Buck and CMake (
cuda_batching, added from the root afterextension/llm/batching, installed to ExecuTorchTargets for downstream
runners).
Differential Revision: D123051481