You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use minimal PAL and nano libraries in Cortex-M size tests - #24216
The Cortex-M size tests should measure ExecuTorch's contribution to binary size. The POSIX platform layer and, for GNU, the full C/C++ libraries with exception support and demangling obscure that contribution. Select minimal PAL for both existing configurations and nano.specs for the GNU build to reduce this overhead and make the tests more sensitive to changes in ExecuTorch.
Initialize C and C++ flags with nano.specs so it applies during compilation and linking while preserving the build script's existing flags. Set the runtime size limits to 34,000 bytes for GNU and 57,000 bytes for Zephyr. The GNU configuration uses nano's abort-on-allocation-failure behavior.
Test plan
Built both size targets on base 0549e1ee61 using Cortex-M55, C++17, Release with size optimization and logging disabled; GNU Arm 15.2.Rel1 and Zephyr SDK 1.0.1 (GCC 14.3.0). Stripped ELF file sizes in bytes:
Configuration
Binary
Before
After
Saved
GNU bare-metal
size_test
117,348
33,372
83,976
GNU bare-metal
size_test_all_ops
1,245,820
1,156,180
89,640
Zephyr
size_test
56,332
55,800
532
Zephyr
size_test_all_ops
1,155,048
1,154,512
536
All 263 C/C++ compile commands and both size-test compile/link commands select nano.specs while retaining the existing compiler flags. Both GNU binaries retain FileDataLoader and contain no exception-unwinder or demangler symbols. Workflow YAML parsing, shell syntax, and both size limits pass.
Note: Links to docs will display an error until the docs builds have been completed.
✅ No Failures
As of commit 038aacb with merge base 0549e1e ():
💚 Looks good so far! There are no failures yet. 💚
This comment was automatically generated by Dr. CI and updates every 15 minutes.
meta-claBot
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
Oct 27, 2026
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"
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
CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
2 participants
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
The Cortex-M size tests should measure ExecuTorch's contribution to binary size. The POSIX platform layer and, for GNU, the full C/C++ libraries with exception support and demangling obscure that contribution. Select minimal PAL for both existing configurations and
nano.specsfor the GNU build to reduce this overhead and make the tests more sensitive to changes in ExecuTorch.Initialize C and C++ flags with
nano.specsso it applies during compilation and linking while preserving the build script's existing flags. Set the runtime size limits to 34,000 bytes for GNU and 57,000 bytes for Zephyr. The GNU configuration uses nano's abort-on-allocation-failure behavior.Test plan
Built both size targets on base
0549e1ee61using Cortex-M55, C++17, Release with size optimization and logging disabled; GNU Arm 15.2.Rel1 and Zephyr SDK 1.0.1 (GCC 14.3.0). Stripped ELF file sizes in bytes:size_testsize_test_all_opssize_testsize_test_all_opsAll 263 C/C++ compile commands and both size-test compile/link commands select nano.specs while retaining the existing compiler flags. Both GNU binaries retain FileDataLoader and contain no exception-unwinder or demangler symbols. Workflow YAML parsing, shell syntax, and both size limits pass.
Authored with AI assistance using Codex.