Skip to content

Arm backend: Reject symbolic shapes without shape extension#19689

Merged
bdemirb merged 3 commits into
pytorch:mainfrom
bdemirb:baris_mletorch-2055_dynamic-pad-guard
May 21, 2026
Merged

Arm backend: Reject symbolic shapes without shape extension#19689
bdemirb merged 3 commits into
pytorch:mainfrom
bdemirb:baris_mletorch-2055_dynamic-pad-guard

Conversation

@bdemirb
Copy link
Copy Markdown
Collaborator

@bdemirb bdemirb commented May 20, 2026

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

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
@bdemirb bdemirb requested a review from digantdesai as a code owner May 20, 2026 10:39
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented May 20, 2026

🔗 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 SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 1 New Failure, 1 Cancelled Job, 3 Unrelated Failures

As of commit ea4a7c3 with merge base b4a9e72 (image):

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.

@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 May 20, 2026
@github-actions github-actions Bot added ciflow/trunk module: arm Issues related to arm backend labels May 20, 2026
@bdemirb
Copy link
Copy Markdown
Collaborator Author

bdemirb commented May 20, 2026

@pytorchbot label "partner: arm"

@bdemirb
Copy link
Copy Markdown
Collaborator Author

bdemirb commented May 20, 2026

@pytorchbot label "release notes: arm"

@pytorch-bot pytorch-bot Bot added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: arm Changes to the ARM backend delegate labels May 20, 2026
@bdemirb bdemirb merged commit 161376d into pytorch:main May 21, 2026
454 of 460 checks passed
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.

2 participants