Arm backend: Use executorch_target_link_options_shared_lib()#17779
Merged
zingo merged 1 commit intopytorch:mainfrom Mar 3, 2026
Merged
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17779
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 1 PendingAs of commit 4d9c704 with merge base dae7a02 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Arm example build/link logic to use the project-provided CMake whole-archive helper instead of hardcoded linker flags / force-link hooks, and deprecates the legacy Ethos-U “registered” linker hook function.
Changes:
- Replaces hardcoded
--whole-archive/--no-whole-archiveusage withexecutorch_target_link_options_shared_lib(...)in Arm example CMake files. - Removes Ethos-U force-link helper code paths (C++ link hook file and runtime “registration check” call sites).
- Deprecates
executorch_delegate_EthosUBackend_registered()and updates top-levelexecutor_runnerlinking to whole-archive the Ethos-U delegate when enabled.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/arm/zephyr/src/arm_executor_runner.cpp | Removes the Ethos-U registration check call path. |
| examples/arm/zephyr/CMakeLists.txt | Includes Utils.cmake and applies whole-archive helper to relevant Arm libraries when targets exist. |
| examples/arm/image_classification_example/runtime/CMakeLists.txt | Switches Ethos-U whole-archive linking to the shared helper. |
| examples/arm/executor_runner/ethosu_link_helper.cpp | Deletes the C++ force-link hook. |
| examples/arm/executor_runner/CMakeLists.txt | Replaces explicit whole-archive flags with helper calls for Arm runner link inputs. |
| backends/arm/runtime/EthosUBackend.cpp | Deprecates the linker-hook function and changes its return behavior. |
| CMakeLists.txt | Updates executor_runner linking: scopes libraries as PRIVATE and whole-archives Ethos-U delegate on ARM Ethos-U Linux builds. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Use the cmake macro in the project for link options to include the whole archive instead of hardcode it. Deprecates: executorch_delegate_EthosUBackend_registered() Use cmake rule instead: executorch_target_link_options_shared_lib(executorch_delegate_ethos_u) Signed-off-by: Zingo Andersen <Zingo.Andersen@arm.com> Change-Id: I650201cb97332a806236ea1cfb56494936e76200
2320453 to
4d9c704
Compare
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.
Summary
Use the cmake macro in the project for link options to include the whole archive instead of hardcode it.
Deprecates: executorch_delegate_EthosUBackend_registered() Use cmake rule instead:
executorch_target_link_options_shared_lib(executorch_delegate_ethos_u)
cc @digantdesai @SS-JIA @freddan80 @per @oscarandersson8218 @mansnils @Sebastian-Larsson @robell