Skip to content

Conversation

@GregoryComer
Copy link
Member

@GregoryComer GregoryComer commented Jan 17, 2026

Summary:
Add a pass in to_edge to ensure all constant tensors have contiguous or channels-last dim order. Tensors with dim orders not present in this list get converted to contiguous. This solves a class of bugs related to strided constant tensors, such as the one causing #14644.

As per discussion with @Gasoonjia, EXIR already assumes that tensors have one of these two dim orders.

Differential Revision: D90898806

@pytorch-bot
Copy link

pytorch-bot bot commented Jan 17, 2026

🔗 Helpful Links

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

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

❌ 2 Cancelled Jobs

As of commit 3d6c64a with merge base af69d08 (image):

CANCELLED JOBS - The following jobs were cancelled. Please retry:

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 Jan 17, 2026
@meta-codesync
Copy link
Contributor

meta-codesync bot commented Jan 17, 2026

@GregoryComer has exported this pull request. If you are a Meta employee, you can view the originating Diff in D90898806.

@GregoryComer GregoryComer marked this pull request as draft January 17, 2026 00:03
@GregoryComer GregoryComer changed the title Convert constant tensor dim order in to_edge Convert constant and buffer dim order in to_edge Jan 17, 2026
@GregoryComer GregoryComer changed the title Convert constant and buffer dim order in to_edge Normalize constant and buffer dim order in to_edge Jan 17, 2026
@GregoryComer GregoryComer added the release notes: exir Changes to any dialects and passes on these dialects, such as memory planning label Jan 17, 2026
@GregoryComer GregoryComer force-pushed the export-D90898806 branch 2 times, most recently from 35f560f to a775bbc Compare January 17, 2026 04:40
Summary:
Add a pass in to_edge to ensure all constant tensors have contiguous or channels-last dim order. Tensors with dim orders not present in this list get converted to contiguous. This solves a class of bugs related to strided constant tensors, such as the one causing pytorch#14644.

As per discussion with Gasoonjia, exir already assumes that tensors have one of these two dim orders.

Differential Revision: D90898806
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. fb-exported meta-exported release notes: exir Changes to any dialects and passes on these dialects, such as memory planning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant