Skip to content

ExtensionLLM: Make it possible to pass memory mode for the Ethos-U#19450

Merged
gggekov merged 1 commit into
pytorch:mainfrom
gggekov:propage_mem_mode_extension_llm
May 11, 2026
Merged

ExtensionLLM: Make it possible to pass memory mode for the Ethos-U#19450
gggekov merged 1 commit into
pytorch:mainfrom
gggekov:propage_mem_mode_extension_llm

Conversation

@gggekov
Copy link
Copy Markdown
Collaborator

@gggekov gggekov commented May 11, 2026

Signed-off-by: George Gekov <george.gekov@arm.com>
Change-Id: I9be36752f199c32a26a69fb8b4a99edde5a6f2a2
Copilot AI review requested due to automatic review settings May 11, 2026 10:35
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented May 11, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19450

Note: Links to docs will display an error until the docs builds have been completed.

❌ 2 New Failures, 1 Pending, 1 Unrelated Failure

As of commit 88e7dd2 with merge base d939b9b (image):

NEW FAILURES - The following jobs have failed:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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 May 11, 2026
@gggekov gggekov added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk labels May 11, 2026
@github-actions
Copy link
Copy Markdown

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
Copy Markdown
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 extends the ExtensionLLM Arm/Ethos‑U export flow to allow propagating Ethos‑U Vela configuration options (system configuration and memory mode) into the Ethos‑U partitioner so users can control these settings from LlmConfig.

Changes:

  • Extend get_ethosu_partitioner() to accept system_config and memory_mode, and translate the LLM config sentinel "default" to None for EthosUCompileSpec.
  • Update Llama Arm lowering to pass llm_config.backend.ethosu.system_config and .memory_mode into get_ethosu_partitioner().

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
extension/llm/export/partitioner_lib.py Adds system_config/memory_mode parameters to the Ethos‑U partitioner helper and normalizes "default" to None.
examples/models/llama/export_llama_lib.py Passes Ethos‑U system_config/memory_mode from LlmConfig into the Ethos‑U partitioner during lowering.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +259 to +263
compile_spec = EthosUCompileSpec(
target,
system_config=None if system_config == "default" else system_config,
memory_mode=None if memory_mode == "default" else memory_mode,
)
Comment on lines 1035 to +1039
partitioners.append(
get_ethosu_partitioner(
llm_config.backend.ethosu.target,
llm_config.backend.ethosu.system_config,
llm_config.backend.ethosu.memory_mode,
Copy link
Copy Markdown
Collaborator

@zingo zingo left a comment

Choose a reason for hiding this comment

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

OK to merge only touch Arm code paths in this example and does not change buck2 stuff.

@gggekov gggekov merged commit 0e36ffa into pytorch:main May 11, 2026
475 of 485 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants