Arm backend: Reject symbolic shapes without shape extension#19689
Merged
bdemirb merged 3 commits intoMay 21, 2026
Conversation
This patch prevents unsupported dynamic-shape PAD cases from being delegated to TOSA specs that do not support the shape extension. Dynamic PAD lowering needs symbolic shape handling. When symbolic tensor shapes are serialized for a spec without the TOSA shape extension, symbolic dimensions can be emitted as -1. For PAD this can make Vela validate output shapes with checks such as -1 == -1 + 1, which reports a PAD output shape mismatch instead of rejecting the unsupported dynamic-shape case earlier. Add a shared TOSA partitioner support check that rejects nodes with symbolic tensor input or output shapes when the active TOSA spec does not enable the shape extension. Known supported symbolic-shape cases, such as upsample_nearest2d.vec and quantize/dequantize boundaries, remain delegable. This keeps the restriction tied to the TOSA spec capability while preserving existing dynamic upsample coverage. The regression coverage verifies that U55 and U85 dynamic PAD cases are not delegated and that static 5D PAD still delegates through Ethos-U lowering. Signed-off-by: Baris Demir <baris.demir@arm.com> Change-Id: If2912c1badcb6528c4869e5bc716aa8da136ff2a
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19689
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 New Failure, 1 Cancelled Job, 3 Unrelated FailuresAs of commit ea4a7c3 with merge base b4a9e72 ( NEW FAILURE - The following job has failed:
CANCELLED JOB - The following job was cancelled. Please retry:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Collaborator
Author
|
@pytorchbot label "partner: arm" |
Collaborator
Author
|
@pytorchbot label "release notes: arm" |
oscarandersson8218
approved these changes
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch prevents unsupported dynamic-shape PAD cases from being delegated to TOSA specs that do not support the shape extension.
Dynamic PAD lowering needs symbolic shape handling. When symbolic tensor shapes are serialized for a spec without the TOSA shape extension, symbolic dimensions can be emitted as -1. For PAD this can make Vela validate output shapes with checks such as -1 == -1 + 1, which reports a PAD output shape mismatch instead of rejecting the unsupported dynamic-shape case earlier.
Add a shared TOSA partitioner support check that rejects nodes with symbolic tensor input or output shapes when the active TOSA spec does not enable the shape extension. Known supported symbolic-shape cases, such as upsample_nearest2d.vec and quantize/dequantize boundaries, remain delegable. This keeps the restriction tied to the TOSA spec capability while preserving existing dynamic upsample coverage.
The regression coverage verifies that U55 and U85 dynamic PAD cases are not delegated and that static 5D PAD still delegates through Ethos-U lowering.
Signed-off-by: Baris Demir baris.demir@arm.com
Change-Id: If2912c1badcb6528c4869e5bc716aa8da136ff2a
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani