Skip to content

Make placements opaque - #171482

Closed
angelayi wants to merge 29 commits into
gh/angelayi/149/basefrom
gh/angelayi/149/head
Closed

angelayi wants to merge 29 commits into
gh/angelayi/149/basefrom
gh/angelayi/149/head

Conversation

@angelayi

@angelayi angelayi commented Dec 29, 2025 •

Copy link
Copy Markdown
Contributor

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Dec 29, 2025 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ No Failures

As of commit 9fcced0 with merge base ef0353f (image):
💚 Looks good so far! There are no failures yet. 💚

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

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo

[ghstack-poisoned]
Comment thread torch/_dynamo/eval_frame.py Resolved
Comment thread torch/_dynamo/graph_break_registry.json Resolved
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo

[ghstack-poisoned]
angelayi added a commit that referenced this pull request Jan 5, 2026
ghstack-source-id: 64372cc
Pull Request resolved: #171482
@angelayi
angelayi requested a review from zou3519 January 5, 2026 23:27
ezyang pushed a commit that referenced this pull request Jan 7, 2026
ghstack-source-id: 64372cc
Pull Request resolved: #171482
ezyang pushed a commit that referenced this pull request Jan 8, 2026
ghstack-source-id: 64372cc
Pull Request resolved: #171482
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo

[ghstack-poisoned]
@ezyang

ezyang commented Jan 9, 2026

Copy link
Copy Markdown
Contributor

Angela, if you merge only this PR, six tracing will start failing with:

[rank0]: torch._dynamo.exc.Unsupported: User-defined object with overridden __hash__
[rank0]:   Explanation: Found a user-defined object TorchScriptObjectVariable(Replicate) with overridden __hash__ when attempting to hash it
[rank0]:   Hint: Dynamo does not support hashing user-defined objects with overridden __hash__
[rank0]:   Hint: It may be possible to write Dynamo tracing rules for this code. Please report an issue to PyTorch if you encounter this graph break often and it is causing performance issues.

[rank0]:   Developer debug context: hashing object of type=<class 'torch.distributed.tensor.placement_types.Replicate'> and variable tracker TorchScriptObjectVariable(Replicate)

[rank0]:  For more details about this graph break, please visit: https://meta-pytorch.github.io/compile-graph-break-site/gb/gb0364.html

Hopefully you know how to fix this, it seems pretty self explanatory.

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo

[ghstack-poisoned]
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo

[ghstack-poisoned]
@angelayi

angelayi commented Jan 9, 2026

Copy link
Copy Markdown
Contributor Author

Updated to hopefully fix the hashing error!

pytorchmergebot pushed a commit that referenced this pull request Jan 29, 2026
In order to register ProcessGroup as an opaque object we need to make it metaclass torch._opaque_base.OpaqueBaseMeta. This allows us to register FakeScriptObject as a virtual subclass of ProcessGroup, allowing us to trace through isinstance(x, ProcessGroup) correctly when x is a FakeScriptObject

Pull Request resolved: #172566
Approved by: https://github.com/zou3519
ghstack dependencies: #171482
kapilsh pushed a commit to kapilsh/pytorch that referenced this pull request Feb 2, 2026
kapilsh pushed a commit to kapilsh/pytorch that referenced this pull request Feb 2, 2026
kapilsh pushed a commit to kapilsh/pytorch that referenced this pull request Feb 2, 2026
In order to register ProcessGroup as an opaque object we need to make it metaclass torch._opaque_base.OpaqueBaseMeta. This allows us to register FakeScriptObject as a virtual subclass of ProcessGroup, allowing us to trace through isinstance(x, ProcessGroup) correctly when x is a FakeScriptObject

Pull Request resolved: pytorch#172566
Approved by: https://github.com/zou3519
ghstack dependencies: pytorch#171482
@izaitsevfb

Copy link
Copy Markdown
Contributor

@pytorchbot revert -m "breaking internal conveyor, see D91862782" -c ghfirst

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@pytorchbot successfully started a revert job. Check the current status here.
Questions? Feedback? Please reach out to the PyTorch DevX Team

pytorchmergebot added a commit that referenced this pull request Feb 3, 2026
pytorchmergebot added a commit that referenced this pull request Feb 3, 2026
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@angelayi your PR has been successfully reverted.



cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo

[ghstack-poisoned]


cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo

[ghstack-poisoned]


cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo

[ghstack-poisoned]
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Starting merge as part of PR stack under #172566

@angelayi

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

radeksm pushed a commit to radeksm/pytorch that referenced this pull request Feb 20, 2026
radeksm pushed a commit to radeksm/pytorch that referenced this pull request Feb 20, 2026
@laithsakka

Copy link
Copy Markdown
Contributor

FYI
Screenshot 2026-02-20 at 10 36 56 AM
cc @wconstab

libohao1201 pushed a commit to libohao1201/pytorch that referenced this pull request Mar 2, 2026
libohao1201 pushed a commit to libohao1201/pytorch that referenced this pull request Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants