Skip to content

Transforms: let a backend declare what counts as a permute - #22125

Open
rascani wants to merge 2 commits into
gh/rascani/28/headfrom
gh/rascani/29/head
Open

Transforms: let a backend declare what counts as a permute#22125
rascani wants to merge 2 commits into
gh/rascani/28/headfrom
gh/rascani/29/head

Conversation

@rascani

@rascani rascani commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

The propagation pass matched a single hardcoded target, aten.permute_copy, so a
backend carrying its own layout dialect got a pass that silently did nothing:
it never recognised the copies, so it never moved them. On the Cortex-M
explicit-layout path that is the difference between 1 cortex_m::transpose and
106, with the driver in place either way.

Take the set through the constructor. The pass still emits _PERMUTE_TARGET when
it has to create a copy, so nothing changes for a caller that does not pass the
argument, and the default is the single target it matched before.

Found by wiring the shared driver into the Cortex-M pipeline and measuring
rather than by reading: every other extension point was exercised by the Arm
suite, and this one was not, because Arm has only one permute target.

No behaviour change for Arm: the pass suite produces a failure set identical to
merge base, name for name.

Authored with Claude Code.

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Aug 25, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

Note: Links to docs will display an error until the docs builds have been completed.

❌ 4 New Failures, 1 Cancelled Job

As of commit 627e259 with merge base e831b3e (image):

NEW FAILURES - The following jobs have failed:

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

This comment was automatically generated by Dr. CI and updates every 15 minutes.

[ghstack-poisoned]
rascani added a commit that referenced this pull request Aug 25, 2026
The propagation pass matched a single hardcoded target, aten.permute_copy, so a
backend carrying its own layout dialect got a pass that silently did nothing:
it never recognised the copies, so it never moved them. On the Cortex-M
explicit-layout path that is the difference between 1 cortex_m::transpose and
106, with the driver in place either way.

Take the set through the constructor. The pass still emits _PERMUTE_TARGET when
it has to create a copy, so nothing changes for a caller that does not pass the
argument, and the default is the single target it matched before.

Found by wiring the shared driver into the Cortex-M pipeline and measuring
rather than by reading: every other extension point was exercised by the Arm
suite, and this one was not, because Arm has only one permute target.

No behaviour change for Arm: the pass suite produces a failure set identical to
merge base, name for name.

Authored with Claude Code.

ghstack-source-id: c7afd33
ghstack-comment-id: 5404820390
Pull-Request: #22125
@rascani
rascani marked this pull request as ready for review August 25, 2026 04:17
@rascani
rascani requested a review from AdrianLundell August 25, 2026 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant