Skip to content

Arm: fix size_t log format specifiers - #22946

Merged
Erik-Lundell merged 2 commits into
pytorch:mainfrom
ricardoasouz:fix/13038-arm-log-format-specifiers
Sep 22, 2026
Merged

Erik-Lundell merged 2 commits into
pytorch:mainfrom
ricardoasouz:fix/13038-arm-log-format-specifiers

Conversation

@ricardoasouz

@ricardoasouz ricardoasouz commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Fixes #13038.

Summary

Replace the remaining %zu / %zd format specifiers in the Arm executor runner with %lu using the existing printf_size_t logging type.

The runner already documents this convention because newlib-nano printf does not reliably handle the z length modifier on the bare-metal/FVP path. A few logging sites still used z, which could result in malformed output on FVP.

Validation

  • git diff --check
  • ExecuTorch lintrunner: no lint issues
  • Built arm_executor_runner for ethos-u55-128 with Arm GNU Toolchain 15.2.1
  • Ran on Corstone-300 FVP with Ethos-U55-128
  • Enabled:
    • ET_ARM_ETHOSU_PER_DELEGATE_PROFILING=ON
    • ET_ARM_ETHOSU_PROFILE_IO_COPIES=ON
  • Verified one Ethos-U delegated partition executed
  • Verified per-delegate PMU and I/O-copy logs render numeric indices correctly
  • FVP completed with exit status 0 and reported no problems

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

Signed-off-by: Ricardo Alves de Souza <ricardoasouz@hotmail.com>
@pytorch-bot

pytorch-bot Bot commented Sep 19, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 1 New Failure, 1 Pending

As of commit f27edb6 with merge base 6cbdc03 (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 Sep 19, 2026
@github-actions github-actions Bot added ciflow/trunk module: arm Issues related to arm backend labels Sep 19, 2026
@pytorch-bot

pytorch-bot Bot commented Sep 19, 2026

Copy link
Copy Markdown

Workflows were awaiting approval. CI has now been triggered for the ciflow labels on this PR.

@ricardoasouz

Copy link
Copy Markdown
Contributor Author

@pytorchbot label "release notes: none"

@pytorch-bot pytorch-bot Bot added the release notes: none Do not include this in the release notes label Sep 19, 2026
@Erik-Lundell

Copy link
Copy Markdown
Collaborator

Hey, thanks for the fix! The runner defines printf_size_t, could you use that instead of unsigned long?

Signed-off-by: Ricardo Alves de Souza <ricardoasouz@hotmail.com>
@ricardoasouz

Copy link
Copy Markdown
Contributor Author

Hey, thanks for the fix! The runner defines printf_size_t, could you use that instead of unsigned long?

Thanks! Updated the casts introduced by this PR to use printf_size_t. arm_perf_monitor.cpp defines the alias locally, consistent with the other Arm translation units. Re-validated on Corstone-300 FVP with per-delegate and I/O-copy profiling enabled.

@Erik-Lundell
Erik-Lundell merged commit b75c738 into pytorch:main Sep 22, 2026
452 of 453 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 release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect display of logs for ARM bulds on FVP

3 participants