Repository navigation
Conversation
Run each partitioner’s edge transforms after caller-supplied passes so backends can use the standard lowering entry point. QNN contributes its existing transforms through the new hook.
Reserve names for constant tensors already present in the exported program before lifting new constants, so methods with folded tables retain distinct constants.
Choose the registered IOManager and its logits, method names and step sizes, rejecting unknown contracts and invalid metadata. Load and reset the selected methods; route prompt tails to decode with a side-effect-free capacity check. Preserve module and I/O-buffer lifetimes and expose a backend-neutral allocator hook.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24568
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 3823faf with merge base 5f72739 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This was referenced Nov 3, 2026
This PR needs a
|
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.
LLM runner: select I/O contracts and accept custom buffer allocators
A runner needs to know the program's cache contract, logits output, method names and fixed step lengths. Add an IOManager registry and a backend-neutral buffer allocator hook, and provide the existing
kvcache_ioadapter through that registry. Unknown / malformed labels and invalid context metadata fail instead of silently selecting a different contract.The runner loads and resets the selected methods, resets its IOManager, and keeps module / buffer lifetimes ordered. A positional-capacity preflight can route a prompt tail through decode before execution; an execution error is never retried. Backend allocators can supply / bind cache buffers without QNN code in the runner.
Review order: the IOManager hooks / registry / allocator interface, the KvCacheIOManager implementation, runner construction and load / reset, prompt chunking / capacity routing, then generic registry / mock runner / prefiller tests. This is PR 3 of the Stack 2 series. Its local parent is
stack2/pr02-lift-constants; its GitHub base ismain, with earlier stack commits included. QNN's allocator follows in PR 4; hf_static's concrete IOManager follows separately in PR 7.Test Plan
Fresh build of this PR's source:
The skips are
TextDecoderRunnerTest.LoadUsesMethodNameandStepWithAllModels. New generic tests distinguish registered / unknown / null factories, selected method arguments, IOManager reset, near-context decode preflight, and no retry of execution errors. hf_static's genuine generate-reset-generate test is in its concrete runtime PR.Tests / builds use an isolated source tree; no existing checkout was moved or published. The reachable base is
5f72739cf26ed53df21a746fb5b022fb8e4266d9, because GitHub main fetch returned proxy 403. No #23563 cherry-pick is included.Stack (review in order)
Each PR includes the commits of the ones above it; review only its own top commits.