Pass share_mutable_buffers through llm_config#17763
Pass share_mutable_buffers through llm_config#17763lucylq wants to merge 1 commit intopytorch:mainfrom
Conversation
Summary: Support in export_llama_lib and internally. Differential Revision: D94456166
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17763
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New Failures, 4 Unrelated FailuresAs of commit 176c8df with merge base 5f879ca ( NEW FAILURES - The following jobs have failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
There was a problem hiding this comment.
Pull request overview
This PR adds support for configuring share_mutable_buffers via llm_config for multimethod LoRA exports, and plumbs the flag into the ExecuTorch memory planning stage so mutable buffers can be shared across entry points.
Changes:
- Extend
MultimethodLoraConfigwith ashare_mutable_buffersflag. - Add a
share_mutable_buffersparameter toLLMEdgeManager.to_executorch()and pass it intoMemoryPlanningPass. - Wire the config flag through
export_llama_lib.pymultimethod export and update the Qwen3 multimethod example YAML.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| extension/llm/export/config/llm_config.py | Adds share_mutable_buffers to the multimethod LoRA export config schema. |
| extension/llm/export/builder.py | Plumbs share_mutable_buffers into MemoryPlanningPass during lowering to ExecuTorch. |
| examples/models/qwen3/config/qwen3_multimethod.yaml | Demonstrates enabling mutable buffer sharing in a multimethod config. |
| examples/models/llama/export_llama_lib.py | Passes llm_config.multimethod_lora.share_mutable_buffers into the export pipeline for multimethod builds. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary: Support in export_llama_lib and internally.
Differential Revision: D94456166