Skip to content

Conversation

@GregoryComer
Copy link
Member

@GregoryComer GregoryComer commented Jan 27, 2025

Summary

Expand is sometimes used to to express an unsqueeze operation (inserting singleton dims) - one motivating example is in MobileBERT (link). This PR allows XNNPACK to conditionally lower expand_copy, as long as the expand is used solely to add singleton dimensions.

Test plan

Added test coverage in backends/xnnpack/test/ops/test_expand.py.

@GregoryComer GregoryComer added the release notes: xnnpack Changes to the XNNPack backend delegate label Jan 27, 2025
@pytorch-bot
Copy link

pytorch-bot bot commented Jan 27, 2025

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit 144b550 with merge base d886373 (image):

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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 Jan 27, 2025
@GregoryComer GregoryComer requested a review from mcr229 January 27, 2025 08:42
@GregoryComer GregoryComer marked this pull request as ready for review January 27, 2025 08:42
Copy link
Contributor

@mcr229 mcr229 left a comment

Choose a reason for hiding this comment

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

looks good let's just address those comments

@github-actions
Copy link

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the stale PRs inactive for over 60 days label Aug 30, 2025
@github-actions
Copy link

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@GregoryComer GregoryComer removed the stale PRs inactive for over 60 days label Dec 5, 2025
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: xnnpack Changes to the XNNPack backend delegate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants