ExtensionLLM: Make it possible to pass memory mode for the Ethos-U#19450
Conversation
Signed-off-by: George Gekov <george.gekov@arm.com> Change-Id: I9be36752f199c32a26a69fb8b4a99edde5a6f2a2
🔗 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 FailureAs of commit 88e7dd2 with merge base d939b9b ( 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. |
This PR needs a
|
There was a problem hiding this comment.
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 acceptsystem_configandmemory_mode, and translate the LLM config sentinel"default"toNoneforEthosUCompileSpec. - Update Llama Arm lowering to pass
llm_config.backend.ethosu.system_configand.memory_modeintoget_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.
| compile_spec = EthosUCompileSpec( | ||
| target, | ||
| system_config=None if system_config == "default" else system_config, | ||
| memory_mode=None if memory_mode == "default" else memory_mode, | ||
| ) |
| partitioners.append( | ||
| get_ethosu_partitioner( | ||
| llm_config.backend.ethosu.target, | ||
| llm_config.backend.ethosu.system_config, | ||
| llm_config.backend.ethosu.memory_mode, |
zingo
left a comment
There was a problem hiding this comment.
OK to merge only touch Arm code paths in this example and does not change buck2 stuff.
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell