Skip to content

[CI][binary-size] Add bloaty measurement to arm-bare-metal size job#19968

Merged
rascani merged 1 commit into
pytorch:mainfrom
rascani:binary-size-bloaty-1-measure
Jun 3, 2026
Merged

[CI][binary-size] Add bloaty measurement to arm-bare-metal size job#19968
rascani merged 1 commit into
pytorch:mainfrom
rascani:binary-size-bloaty-1-measure

Conversation

@rascani

@rascani rascani commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a custom bloaty data source that buckets demangled symbols into ExecuTorch-meaningful groups (runtime / extension / backends / kernels / flatbuffer / stdlib / libc / etc), and a helper script that runs bloaty against the size_test ELF, writes metadata.json + human-readable text output as a CI artifact, and appends a per-bucket markdown table to the GitHub Actions step summary.

Wired into the test-arm-cortex-m-size-test job only — the existing ls -la threshold check is untouched. Other size jobs will be wired up in follow-up PRs in this stack; later PRs add the sticky PR comment and replace the coarse byte threshold with per-bucket gating.

Test Plan

CI artifact creation

Authored with Claude.

@pytorch-bot

pytorch-bot Bot commented Jun 3, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ You can merge normally! (2 Unrelated Failures)

As of commit 68e12bc with merge base 915a82d (image):

BROKEN TRUNK - The following jobs 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 Jun 3, 2026
@github-actions

github-actions Bot commented Jun 3, 2026

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.

Adds a custom bloaty data source that buckets demangled symbols into
ExecuTorch-meaningful groups (runtime / extension / backends / kernels /
flatbuffer / stdlib / libc / etc), and a helper script that runs bloaty
against the size_test ELF, writes metadata.json + human-readable text
output as a CI artifact, and appends a per-bucket markdown table to the
GitHub Actions step summary.

Wired into the test-arm-cortex-m-size-test job only — the existing
ls -la threshold check is untouched. Other size jobs will be wired up
in follow-up PRs in this stack; later PRs add the sticky PR comment and
replace the coarse byte threshold with per-bucket gating.

Authored with Claude.
@rascani rascani force-pushed the binary-size-bloaty-1-measure branch from 70271e3 to 68e12bc Compare June 3, 2026 18:33
@rascani

rascani commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

@rascani rascani requested review from digantdesai and psiddh June 3, 2026 21:24
@rascani rascani marked this pull request as ready for review June 3, 2026 21:24
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

"""Bloaty binary-size reports for CI."""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can this script be used on a given executirch binary that is locally built say on my local setup too ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, though it is probably of limited use locally. This script is mostly a GitHub CI wrapper around bloaty meant create the markdown and artifacts from the CI build.

@rascani rascani merged commit 9ccc4e7 into pytorch:main Jun 3, 2026
173 of 175 checks passed
@rascani rascani deleted the binary-size-bloaty-1-measure branch June 4, 2026 18:46
Gasoonjia pushed a commit that referenced this pull request Jun 8, 2026
…19968)

### Summary
Adds a custom bloaty data source that buckets demangled symbols into
ExecuTorch-meaningful groups (runtime / extension / backends / kernels /
flatbuffer / stdlib / libc / etc), and a helper script that runs bloaty
against the size_test ELF, writes metadata.json + human-readable text
output as a CI artifact, and appends a per-bucket markdown table to the
GitHub Actions step summary.

Wired into the test-arm-cortex-m-size-test job only — the existing ls
-la threshold check is untouched. Other size jobs will be wired up in
follow-up PRs in this stack; later PRs add the sticky PR comment and
replace the coarse byte threshold with per-bucket gating.

### Test Plan
CI artifact creation

Authored with Claude.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants