Skip to content

Milestone2.1: Partition to_dim_order_copy op in XNN delegate #11286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

leafs1
Copy link
Contributor

@leafs1 leafs1 commented Jun 2, 2025

Summary

Add to_dim_order_copy op to the partitioner in XNN delegate and delegate dim order conversions (to_dim_order_copy op) manually initiated by user using .to(memory_format=)

Test plan

Confirmed expected output when having user specified dim order conversions as well as appropriate partitioning

@leafs1 leafs1 requested review from digantdesai and mcr229 as code owners June 2, 2025 16:58
Copy link

pytorch-bot bot commented Jun 2, 2025

🔗 Helpful Links

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

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

❌ 2 New Failures

As of commit 549b361 with merge base 18e4240 (image):

NEW FAILURES - The following jobs have failed:

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

@facebook-github-bot facebook-github-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 Jun 2, 2025
@leafs1
Copy link
Contributor Author

leafs1 commented Jun 2, 2025

@pytorchbot label "release notes: none"

@pytorch-bot pytorch-bot bot added the release notes: none Do not include this in the release notes label Jun 2, 2025
@leafs1 leafs1 force-pushed the milestone2.1 branch 4 times, most recently from 7dc20ef to a8e4be4 Compare June 3, 2025 21:21
@mergennachin
Copy link
Contributor

Add a more descriptive name to the Title of this PR

@leafs1 leafs1 changed the title Milestone2.1 Milestone2.1: Partition to_dim_order_copy op in XNN delegate Jun 5, 2025
Copy link
Member

@GregoryComer GregoryComer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation looks good to me. In addition to the test you added in in the pass tests, can you create a test file for to_copy under backends/xnnpack/test/ops? It might be good to add cover the following cases:

  • to(channels_last) before linear.
  • to(contiguous) before conv.
  • Convert both dtype and dim order (for example, .to(torch.float, memory_format=torch.channels_last) with non-float inputs).

@leafs1 leafs1 force-pushed the milestone2.1 branch 4 times, most recently from 74a7331 to d195f85 Compare June 23, 2025 17:23
@facebook-github-bot
Copy link
Contributor

@leafs1 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@leafs1 leafs1 force-pushed the milestone2.1 branch 2 times, most recently from d029d18 to 3e1a4e3 Compare June 23, 2025 23:20
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. release notes: none Do not include this in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants