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.
Route backend options through QnnPartitioner.from_options and register an allocator that supplies QNN shared-memory buffers through the generic IOManager hook. The LLM runner remains backend-neutral.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24569
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit df791aa 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.
QNN: construct partitioners from options and allocate LLM I/O in rpcmem
Exporters often have backend option dictionaries rather than ready-made compiler specs.
QnnPartitioner.from_options()routes each setting to the correct compiler-spec builder or partitioner and rejects unknown names. The rpcmem allocator registers through the preceding PR's generic I/O-buffer hook, so LLM runner code remains independent of QNN.Review order:
QnnPartitioner.from_options, option-routing tests,llm/io_buffer_allocator.cpp, build / llama-main link wiring, then the allocator tests. The allocator forwards allocation alignment, binding and free calls; a failed allocation remains nullptr so the IOManager can use heap fallback.This is PR 4 of the Stack 2 series. Its local parent is
stack2/pr03-runner-contracts; its GitHub base ismain, with earlier stack commits included. The QNN delegate output-order change is not in this PR; it follows separately for Qualcomm review.Test Plan
On this PR's source tree:
QNN SDK 2.37 was used. HTP / GPU specs are checked; the LPAI test verifies the genuine >=2.39 SDK rejection rather than claiming LPAI compilation. Allocator tests compile the real allocator and stub only the rpcmem C APIs; hardware shared-memory registration was not rerun. The full host QNN build also compiled the allocator library. Buck parity could not start because the local dotslash wrapper requires a missing worktree
.buck2; no Buck-green claim is made.No external cache-memory-planning cherry-pick is included.
Stack (review in order)
Each PR includes the commits of the ones above it; review only its own top commits.