Skip to content

Arm backend: support standalone executor_runner#17814

Closed
usamahz wants to merge 2 commits into
pytorch:mainfrom
usamahz:main
Closed

Arm backend: support standalone executor_runner#17814
usamahz wants to merge 2 commits into
pytorch:mainfrom
usamahz:main

Conversation

@usamahz
Copy link
Copy Markdown
Collaborator

@usamahz usamahz commented Mar 3, 2026

Problem

Standalone Arm runner builds were drifting from the top-level ExecuTorch configuration: presets weren’t reused, paths/defaults were inconsistent, and missing targets could silently fall back to local builds, hiding configuration issues.

What this PR changes

  • Uses the shared arm_baremetal preset/Utils in standalone mode so the runner inherits the same ExecuTorch settings as top-level builds.
  • Aligns Ethos-U defaults (arm-scratch paths, in-repo core driver) to avoid mismatched SDK sources.
  • Updates build scripts/preset to rely on preset-driven configuration (no install step) and adjusts the minimal notebook accordingly.

UX impact (two build modes)

  • Standalone build (run.sh / cmake -S examples/arm/executor_runner): easier to use, consistent defaults, clear errors.
  • Integrated/superbuild (top-level ExecuTorch): unchanged behavior; no global overrides.

Metrics

  • ~8× faster rebuilds in local Arm runner workflow (per local testing).

cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani @SS-JIA @Erik-Lundell

Allow the Arm executor runner to be configured standalone by
defaulting EXECUTORCH_ROOT, marking standalone configs explicitly, and
pulling ExecuTorch into the build tree as a subdirectory. This gives
run.sh (and downstream integrators) a single CMake entry point instead
of relying on a preconfigured top-level build.

Signed-off-by: Usamah Zaheer <[email protected]>
Change-Id: I81c5f92de5c6dafe0db28e14f618f84823f3009c
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Mar 3, 2026

🔗 Helpful Links

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

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:

❌ 31 New Failures, 1 Cancelled Job, 2 Unrelated Failures

As of commit 5db85f2 with merge base 0d010de (image):

NEW FAILURES - The following jobs have failed:

CANCELLED JOB - The following job was cancelled. Please retry:

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 Mar 3, 2026
@usamahz
Copy link
Copy Markdown
Collaborator Author

usamahz commented Mar 3, 2026

@pytorchbot label "partner:arm" , "release notes: arm" , "ciflow/trunk"

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Mar 3, 2026

To add these label(s) (ciflow/trunk) to the PR, please first approve the workflows that are awaiting approval (scroll to the bottom of this page).

This helps ensure we don't trigger CI on this PR until it is actually authorized to do so. Please ping one of the reviewers if you do not have access to approve and run workflows.

@zingo zingo added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk labels Mar 3, 2026
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Mar 3, 2026

To add the ciflow label ciflow/trunk please first approve the workflows that are awaiting approval (scroll to the bottom of this page).

This helps ensure we don't trigger CI on this PR until it is actually authorized to do so. Please ping one of the reviewers if you do not have access to approve and run workflows.

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Mar 3, 2026

To add the ciflow label ciflow/trunk please first approve the workflows that are awaiting approval (scroll to the bottom of this page).

This helps ensure we don't trigger CI on this PR until it is actually authorized to do so. Please ping one of the reviewers if you do not have access to approve and run workflows.

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Mar 3, 2026

To add the ciflow label ciflow/trunk please first approve the workflows that are awaiting approval (scroll to the bottom of this page).

This helps ensure we don't trigger CI on this PR until it is actually authorized to do so. Please ping one of the reviewers if you do not have access to approve and run workflows.

@pytorch-bot pytorch-bot Bot removed the ciflow/trunk label Mar 3, 2026
@usamahz
Copy link
Copy Markdown
Collaborator Author

usamahz commented Mar 3, 2026

@pytorchbot label "release notes: arm"

@pytorch-bot pytorch-bot Bot added the release notes: arm Changes to the ARM backend delegate label Mar 3, 2026
Use the shared arm_baremetal preset (and Utils.cmake) whenever the
runner is configured standalone so required ExecuTorch options stay
centralized. Default EXECUTORCH_ROOT/ET_DIR_PATH to the repo root,
document why the Ethos-U SDK path points at examples/arm/arm-scratch,
keep running with the user-provided Python interpreter, move the
ET_PTE_FILE_PATH guard ahead of the fatal check, and fail fast if
required ExecuTorch targets (extension_runner_util,
quantized/cortex_m kernels) are missing instead of silently building
local copies.

Signed-off-by: Usamah Zaheer <[email protected]>
Change-Id: Idd8c47702649f503e3c0e7aa0c0dcd0fdbce063e
@zingo
Copy link
Copy Markdown
Collaborator

zingo commented Mar 3, 2026

OK to merge after all test-arm /cortex-m tests PASS
There some to be some problems with test-arm-ootb-linux tests that need attention.

@zingo
Copy link
Copy Markdown
Collaborator

zingo commented Mar 3, 2026

I started a re-run of the failed test, but I spot that the PR needs a rebase also 😥

# tooling directory rather than assuming a fixed relative depth.
set(_candidate_executorch_root "${CMAKE_CURRENT_LIST_DIR}")
set(_default_executorch_root "")
while(TRUE)
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.

This is a bit fragile, any better way to do this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This has been reworked in the newer iteration: #19018

set(ET_DIR_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/../../.."
CACHE PATH "Path to ExecuTorch dir"
set(_arm_runner_placeholder_pte
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.

curious why do we need this?

Copy link
Copy Markdown
Collaborator Author

@usamahz usamahz May 12, 2026

Choose a reason for hiding this comment

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

This has been removed in the newer iteration: #19018

Copy link
Copy Markdown
Contributor

@digantdesai digantdesai left a comment

Choose a reason for hiding this comment

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

I like it. But with any big change, make sure existing CI is green, and you have enough testing. Also sorry for a very late review. CC: @GregoryComer for FYI

@usamahz
Copy link
Copy Markdown
Collaborator Author

usamahz commented May 12, 2026

This PR is superseded by the newer iteration PR: #19018

PR #19018 contains the updated version of this work, so reviews and further discussion can continue there.

@usamahz usamahz closed this May 13, 2026
@usamahz usamahz reopened this May 13, 2026
@usamahz usamahz closed this May 13, 2026
@github-actions github-actions Bot added the module: arm Issues related to arm backend label May 13, 2026
@usamahz usamahz reopened this May 13, 2026
@usamahz
Copy link
Copy Markdown
Collaborator Author

usamahz commented May 13, 2026

This PR is superseded by the newer iteration PR: #19018

PR #19018 contains the updated version of this work, so reviews and further discussion can continue there.

@usamahz usamahz closed this May 13, 2026
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: arm Changes to the ARM backend delegate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants