Skip to content

Arm backend: Fix MobileSAM setup and FVP measurements - #24118

Open
usamahz wants to merge 2 commits into
pytorch:mainfrom
usamahz:codex/mobilesam-release-fvp-reporting
Open

usamahz wants to merge 2 commits into
pytorch:mainfrom
usamahz:codex/mobilesam-release-fvp-reporting

Conversation

@usamahz

@usamahz usamahz commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fix the MobileSAM Python 3.12 CPU setup failing on an unavailable TorchAO nightly by using released PyTorch/TorchAO wheels and aligning FlatBuffers with TOSA's requirement.

Make the shared FVP launcher report unsupported CPU timing, CPU/NPU ratios and fast-mode NPU counters as unavailable. Timed runs retain simulated NPU counters, including valid zeros. This also covers runners built without semihosting and preserves hardware reporting. Keep the existing example flow and add run.sh --timed.

Test plan

  • Ran the README install/setup sequence and ./examples/arm/mobilesam_prompt_segmentation_example_ethos_u/run.sh with Python 3.12 on Ubuntu 24.04 amd64 in Docker under Apple silicon emulation: PASS, mask IoU 0.977785; output unchanged.
  • python -m pytest -q .ci/scripts/tests/test_cu134_dependencies.py backends/arm/test/test_run_fvp.py: 30 tests passed.
  • Ran the same non-semihosting U85 ELF through backends/arm/scripts/run_fvp.sh with and without --fast: bundled output checks passed; timed mode retained 3,127 NPU cycles and valid zero counters, while fast mode suppressed unavailable measurements.
  • backends/arm/scripts/pre-push: all checks passed, including lint, commit/license checks, operator documentation and public API manifests.

Authored with assistance from Codex.

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

Use PyTorch 2.14.0 CPU and TorchAO 0.18.0 from release indexes for
the MobileSAM Python 3.12 setup. Align FlatBuffers with TOSA to
keep the example in one venv. Preserve GPU, source-build and
Python 3.15 package selections.

Let the shared FVP launcher qualify console measurements using
its simulation mode, including runners without semihosting.
Report unavailable CPU timing, ratios and fast-mode NPU counters
once. Retain simulated NPU counters in timed mode and preserve
hardware reporting. Remove the separate runner mode argument.
Keep the README flow simple with an optional run.sh --timed.

Validated the README install, export, cross-build and FVP flow in
a fresh Python 3.12 venv on Ubuntu 24.04 amd64 in Docker under
Apple silicon emulation: PASS, mask IoU 0.977785. Release-wheel
hashes and output match the previously tested artifacts.
Launcher regression tests cover both modes on U55, U65 and U85,
valid zero counters, and error and execution-count preservation.
Non-semihosting FVP runs pass in both modes with bundled output
checks.

Authored with assistance from Codex.

Signed-off-by: Usamah Zaheer <usamah.zaheer@arm.com>
Change-Id: I05452fe9a3a760673faf069cfd1110ef7d1d24f6
@usamahz usamahz added the release notes: arm Changes to the ARM backend delegate label Oct 23, 2026
@pytorch-bot

pytorch-bot Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 2 New Failures, 13 Unrelated Failures

As of commit fe93a8b with merge base 0295293 (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

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 Oct 23, 2026
@github-actions github-actions Bot added ciflow/trunk module: arm Issues related to arm backend labels Oct 23, 2026
@Sebastian-Larsson Sebastian-Larsson added the help wanted Extra attention is needed label Oct 23, 2026
@zingo

zingo commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

@digantdesai or @rascani you probably want to check this one, do it need a internal test?

@rascani

rascani commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

@digantdesai or @rascani you probably want to check this one, do it need a internal test?

No internal test needed, but I think I'd like to better understand the problem with the torchao dependency. It seems like this has several conditionals that may just be working around temporary issues.

This branch has not been deployed

No deployments
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. help wanted Extra attention is needed module: arm Issues related to arm backend release notes: arm Changes to the ARM backend delegate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants