Skip to content

Arm backend: Enable using minimal c++ runtime. - #21587

Merged
Erik-Lundell merged 2 commits into
pytorch:mainfrom
Erik-Lundell:minimal-specs
Aug 6, 2026
Merged

Arm backend: Enable using minimal c++ runtime.#21587
Erik-Lundell merged 2 commits into
pytorch:mainfrom
Erik-Lundell:minimal-specs

Conversation

@Erik-Lundell

@Erik-Lundell Erik-Lundell commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Add a helper arm_runner_link_minimal_specs
that adds preffered minimal specs, in particular
nano.specs with float printing included.

Enable this in the example arm_executor_runner
when EXECUTORCH_OPTIMIZE_SIZE=ON. Always enable
in the image_classification example.

While the helper reduces code size, it reduces support of standard c++ features. In particular, it does
not support printing %zu, i.e. size_t:s. The impact can be reduced by instead using unsigned longs
and printing with %lu, which is easily done in our code. For ET runtime code, it is a bit more complicated. Reduce impact by extending the ArmMemoryAllocator
subclass to fix its error messages, to at least print proper diagnostics for memory problems.

cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani

@Erik-Lundell Erik-Lundell added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk release notes: none Do not include this in the release notes labels Aug 5, 2026
@pytorch-bot

pytorch-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 1 New Failure, 52 Pending

As of commit cea0b38 with merge base 2afdd93 (image):

NEW FAILURE - The following job has failed:

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 Aug 5, 2026
@github-actions github-actions Bot added the module: arm Issues related to arm backend label Aug 5, 2026
@Erik-Lundell
Erik-Lundell force-pushed the minimal-specs branch 2 times, most recently from 48504be to 7ed920c Compare August 6, 2026 08:18
Add a helper arm_runner_link_minimal_specs
that adds preffered minimal specs, in particular
nano.specs with float printing included.

Enable this in the example arm_executor_runner
when EXECUTORCH_OPTIMIZE_SIZE=ON. Always enable
in the image_classification example.

While the helper reduces code size, it reduces support
of standard c++ features. In particular, it does
not support printing %zu, i.e. size_t:s. The impact
can be reduced by instead using unsigned longs
and printing with %lu, which is easily done in our
code. For ET runtime code, it is a bit more complicated.
Reduce impact by extending the ArmMemoryAllocator
subclass to fix its error messages, to at least print
proper diagnostics for memory problems.

Signed-off-by: Erik Lundell <erik.lundell@arm.com>
Change-Id: I80b127f7a939e7ee29baa59dc87777ae71f81647
@Erik-Lundell

Copy link
Copy Markdown
Collaborator Author

test-arm-backend-ethos-u (test_ootb_tests_tosa) with new test passes.

@Erik-Lundell
Erik-Lundell merged commit b21661f into pytorch:main Aug 6, 2026
493 of 506 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. module: arm Issues related to arm backend partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants