Skip to content

Conversation

pytorchbot
Copy link
Collaborator

This PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #9435 by @mcr229
^ Please use this as the source of truth for the PR details, comments, and reviews
ghstack PR base: https://github.com/pytorch/executorch/tree/gh/mcr229/15/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/mcr229/15/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/main
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/mcr229/15/orig
@diff-train-skip-merge

Pull Request resolved: #9435

There was a slight bug i found when lowering with:

XnnpackDynamicallyQuantizedPartitioner --> XnnpackPartitioner. The issue arrises because the second time we partition, delegation tags from the previous partitioner still exist. Specifically they exist on the getitem node because the metadata was propagated.

See:
https://github.com/pytorch/pytorch/blob/main/torch/fx/passes/utils/fuser_utils.py#L235

Since the getitem nodes created in by the XnnpackDynamicallyQuantizedPartitioner still have the delegation tags, they sneak into partitions from XnnpackPartitioner. This shouldn't happen because delegation tags from previous Partitioner should not exist after the previous lowering.

We update the code in to_backend here to erase all the "delegation_tags" from node.meta after we've performed all `_partition_and_lower`
ghstack-source-id: 273078717
@exported-using-ghexport

Differential Revision: [D71518362](https://our.internmc.facebook.com/intern/diff/D71518362/)
Copy link

pytorch-bot bot commented Mar 21, 2025

🔗 Helpful Links

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

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

❌ 2 New Failures, 7 Pending

As of commit ee37db4 with merge base 1300cda (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 Mar 21, 2025
@kirklandsign kirklandsign merged commit a0bc7ea into main Mar 21, 2025
78 of 81 checks passed
@kirklandsign kirklandsign deleted the gh/mcr229/15/orig branch March 21, 2025 18:46
DannyYuyang-quic pushed a commit to CodeLinaro/executorch that referenced this pull request Apr 2, 2025
There was a slight bug i found when lowering with:

XnnpackDynamicallyQuantizedPartitioner --> XnnpackPartitioner. The issue arrises because the second time we partition, delegation tags from the previous partitioner still exist. Specifically they exist on the getitem node because the metadata was propagated.

See:
https://github.com/pytorch/pytorch/blob/main/torch/fx/passes/utils/fuser_utils.py#L235

Since the getitem nodes created in by the XnnpackDynamicallyQuantizedPartitioner still have the delegation tags, they sneak into partitions from XnnpackPartitioner. This shouldn't happen because delegation tags from previous Partitioner should not exist after the previous lowering.

We update the code in to_backend here to erase all the "delegation_tags" from node.meta after we've performed all _partition_and_lower

Differential Revision: D71518362
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. topic: not user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants