Skip to content

Add pass to make the model inputs use the channels last dim order.#21392

Open
MartinPavella wants to merge 3 commits into
pytorch:mainfrom
nxp-upstream:nxg01483/EIEX-1009-handle-graphs-not-exportable-in-channels-last-format
Open

Add pass to make the model inputs use the channels last dim order.#21392
MartinPavella wants to merge 3 commits into
pytorch:mainfrom
nxp-upstream:nxg01483/EIEX-1009-handle-graphs-not-exportable-in-channels-last-format

Conversation

@MartinPavella

Copy link
Copy Markdown
Collaborator

Summary

This PR enables any model with 4D inputs to consume channels last data. As part of #19299, it is a step towards a model with channels last operators and no runtime permutations.

Fixes #20096.

This PR is based on 2 others for testing purposes. Before merging, this dependency will be removed, so only the last commit is relevant for review.

Test plan

pytest backends/transforms/test/test_make_inputs_channels_last.py

@MartinPavella MartinPavella self-assigned this Jul 27, 2026
@MartinPavella MartinPavella added the python Pull requests that update python code label Jul 27, 2026
@pytorch-bot

pytorch-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 1 New Failure

As of commit 5c49b2c with merge base ad52be9 (image):

NEW FAILURE - The following job has failed:

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 Jul 27, 2026
@linux-foundation-easycla

Copy link
Copy Markdown

CLA Not Signed

@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.

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. python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Memory-layout infra] Handle graphs not exportable in channels-last format

1 participant