Skip to content

Pass share_mutable_buffers through llm_config#17763

Open
lucylq wants to merge 1 commit intopytorch:mainfrom
lucylq:export-D94456166
Open

Pass share_mutable_buffers through llm_config#17763
lucylq wants to merge 1 commit intopytorch:mainfrom
lucylq:export-D94456166

Conversation

@lucylq
Copy link
Contributor

@lucylq lucylq commented Feb 28, 2026

Summary: Support in export_llama_lib and internally.

Differential Revision: D94456166

Summary: Support in export_llama_lib and internally.

Differential Revision: D94456166
Copilot AI review requested due to automatic review settings February 28, 2026 00:24
@pytorch-bot
Copy link

pytorch-bot bot commented Feb 28, 2026

🔗 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 Failures

As of commit 176c8df with merge base 5f879ca (image):

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.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 28, 2026
@meta-codesync
Copy link
Contributor

meta-codesync bot commented Feb 28, 2026

@lucylq has exported this pull request. If you are a Meta employee, you can view the originating Diff in D94456166.

@github-actions
Copy link

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 MultimethodLoraConfig with a share_mutable_buffers flag.
  • Add a share_mutable_buffers parameter to LLMEdgeManager.to_executorch() and pass it into MemoryPlanningPass.
  • Wire the config flag through export_llama_lib.py multimethod 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants