Skip to content

Arm backend: Move to sha-1 on main branch for tosa-tools#18841

Draft
per wants to merge 1 commit intopytorch:mainfrom
per:update_tosa_tools
Draft

Arm backend: Move to sha-1 on main branch for tosa-tools#18841
per wants to merge 1 commit intopytorch:mainfrom
per:update_tosa_tools

Conversation

@per
Copy link
Copy Markdown
Collaborator

@per per commented Apr 13, 2026

Summary

Move to sha-1 on main branch until new release is done.
Use the experimental dev mode to allow for FC handling in VGF backend.

Test plan

Tested through existing CI tests.

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

Move to sha-1 on main branch until new release is done.

Signed-off-by: Per Åstrand <per.astrand@arm.com>
Change-Id: I717d59011bd211e3586e656a8dad62e77a8660dd
Copilot AI review requested due to automatic review settings April 13, 2026 11:43
@per per added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk labels Apr 13, 2026
@per per requested a review from digantdesai as a code owner April 13, 2026 11:43
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Apr 13, 2026

🔗 Helpful Links

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

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 Awaiting Approval, 5 New Failures, 3 Unrelated Failures

As of commit f7403e2 with merge base 266ff2d (image):

AWAITING APPROVAL - The following workflow needs approval before CI can run:

NEW FAILURES - The following jobs have failed:

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 Apr 13, 2026
@github-actions
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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Arm backend’s TOSA tooling integration by pinning tosa-tools to a specific main-branch commit and enabling experimental “dev mode” behavior needed by the VGF backend, alongside adding the TOSA 1.1 FlatBuffers schema.

Changes:

  • Switch Arm example setup to install tosa-tools from a pinned Git commit (SHA-1) instead of a released tag.
  • Introduce a tosa_dev_mode compile-spec flag and plumb it into TOSA serialization (including VGF enabling it by default).
  • Add the TOSA 1.1 FlatBuffers schema file to the repository.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
examples/arm/setup.sh Pins tosa-tools installation to a specific Git commit via pip install git+…@<sha>.
backends/arm/vgf/compile_spec.py Enables TOSA software dev mode for VGF compile specs.
backends/arm/tosa/schemas/tosa_1.1.fbs Adds the TOSA 1.1 schema definition.
backends/arm/tosa/backend.py Enables experimental dev version in the serializer when tosa_dev_mode is set; propagates the flag when filtering compile specs.
backends/arm/common/arm_compile_spec.py Adds tosa_dev_mode to compile spec parsing/serialization and an internal setter.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 443 to 447
)
.dump_debug_info(compile_spec.tosa_debug_mode)
.set_output_order_workaround(compile_spec.output_order_workaround)
._set_tosa_dev_mode(compile_spec.tosa_dev_mode)
)
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

filter_tosa_compile_specs() calls ._set_tosa_dev_mode(compile_spec.tosa_dev_mode) where tosa_dev_mode can be None. This currently conflicts with _set_tosa_dev_mode(self, tosa_dev_mode: bool) and can trip static type checks; also it’s clearer to only set the flag when it’s explicitly provided. Consider guarding the call (only call when not None) or updating _set_tosa_dev_mode to accept bool | None.

Copilot uses AI. Check for mistakes.
Comment on lines +322 to +330
def _set_tosa_dev_mode(self, tosa_dev_mode: bool):
"""Sets whether to enable TOSA software development mode.

Args:
tosa_dev_mode: Boolean indicating whether to enable TOSA software development mode.

"""
self.tosa_dev_mode = tosa_dev_mode
return self
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

tosa_dev_mode is declared as bool | None, but _set_tosa_dev_mode only accepts bool. Since call sites may pass through an unset value, consider changing the parameter type to bool | None (and documenting what None means), or enforce non-None at all call sites.

Copilot uses AI. Check for mistakes.
_DEBUG_MODE_KEY = "dump_debug_info"
_OUTPUT_REORDER_KEY = "ouput_reorder_workaround"
_TRANSFORM_PIPELINE_CONFIG_KEY = "transform_pipeline_config"
_TOSA_DEV_MODE = "tosa_sw_dev_mode"
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

Constant naming is inconsistent with the other compile-spec keys (_TOSA_SPEC_KEY, _COMPILE_FLAGS_KEY, ...). Consider renaming _TOSA_DEV_MODE to _TOSA_DEV_MODE_KEY (and updating references) to match the established pattern.

Suggested change
_TOSA_DEV_MODE = "tosa_sw_dev_mode"
_TOSA_DEV_MODE_KEY = "tosa_sw_dev_mode"

Copilot uses AI. Check for mistakes.
}

table OpLocation {
text: string; // Opaque string, interpretted by user
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

Typo in comment: "interpretted" should be "interpreted".

Suggested change
text: string; // Opaque string, interpretted by user
text: string; // Opaque string, interpreted by user

Copilot uses AI. Check for mistakes.
@per per marked this pull request as draft April 13, 2026 12:22
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. partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants