Arm backend: Move to sha-1 on main branch for tosa-tools#18841
Arm backend: Move to sha-1 on main branch for tosa-tools#18841per wants to merge 1 commit intopytorch:mainfrom
Conversation
Move to sha-1 on main branch until new release is done. Signed-off-by: Per Åstrand <per.astrand@arm.com> Change-Id: I717d59011bd211e3586e656a8dad62e77a8660dd
🔗 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 SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 1 Awaiting Approval, 5 New Failures, 3 Unrelated FailuresAs of commit f7403e2 with merge base 266ff2d ( 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. |
This PR needs a
|
There was a problem hiding this comment.
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-toolsfrom a pinned Git commit (SHA-1) instead of a released tag. - Introduce a
tosa_dev_modecompile-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.
| ) | ||
| .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) | ||
| ) |
There was a problem hiding this comment.
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.
| 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 |
There was a problem hiding this comment.
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.
| _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" |
There was a problem hiding this comment.
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.
| _TOSA_DEV_MODE = "tosa_sw_dev_mode" | |
| _TOSA_DEV_MODE_KEY = "tosa_sw_dev_mode" |
| } | ||
|
|
||
| table OpLocation { | ||
| text: string; // Opaque string, interpretted by user |
There was a problem hiding this comment.
Typo in comment: "interpretted" should be "interpreted".
| text: string; // Opaque string, interpretted by user | |
| text: string; // Opaque string, interpreted by user |
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