Repository navigation
Make ProcessGroup opaque - #172566
Make ProcessGroup opaque#172566angelayi wants to merge 27 commits into
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/172566
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (4 Unrelated Failures)As of commit 02e0b16 with merge base 6335300 ( FLAKY - The following job failed but was likely due to flakiness present on trunk:
BROKEN TRUNK - The following jobs failed but was 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. |
| ::c10d::ProcessGroup, ::c10d::PyProcessGroup>( | ||
| module, | ||
| "ProcessGroup", | ||
| py::metaclass(abc_meta.ptr()), |
There was a problem hiding this comment.
What happens to the reference count of abc_meta here? Won't it get decremented?
Do you actually want?
| py::metaclass(abc_meta.ptr()), | |
| py::metaclass(abc_module.attr("ABCMeta")), |
RIght now this creates a temporary object, increments, gives the pointer, and then decrements it.
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
In order to register ProcessGroup as an opaque object we need to make it subclass ABC. 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 [ghstack-poisoned]
In order to register ProcessGroup as an opaque object we need to make it subclass ABC. 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 [ghstack-poisoned]
In order to register ProcessGroup as an opaque object we need to make it subclass ABC. 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 [ghstack-poisoned]
In order to register ProcessGroup as an opaque object we need to make it subclass ABC. 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 [ghstack-poisoned]
zou3519
left a comment
There was a problem hiding this comment.
looks fine but do you have a test?
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 cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo [ghstack-poisoned]
|
@pytorchbot merge |
Merge startedYour 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 |
|
@pytorchmergebot revert -c nosignal -m "GH job link HUD commit link" |
|
@pytorchbot successfully started a revert job. Check the current status here. |
This reverts commit 1b3ec47. Reverted #172566 on behalf of https://github.com/atalman due to [GH job link](https://github.com/pytorch/pytorch/actions/runs/22169966163/job/64112183461) [HUD commit link](https://hud.pytorch.org/pytorch/pytorch/commit/1b3ec474f6657f014d924d81982de6ec9bd83daa) ([comment](#172566 (comment)))
|
@angelayi your PR has been successfully reverted. |
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 cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo [ghstack-poisoned]
|
@pytorchbot merge |
Merge startedYour 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 |
Merge failedReason: Command Details for Dev Infra teamRaised by workflow job |
This reverts commit a92486a. Reverted pytorch#172566 on behalf of https://github.com/izaitsevfb due to breaking internal conveyor, see D91862782 ([comment](pytorch#171482 (comment)))
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 cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo [ghstack-poisoned]
|
@pytorchbot merge |
Merge startedYour 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 |
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
This reverts commit 1b3ec47. Reverted #172566 on behalf of https://github.com/atalman due to [GH job link](https://github.com/pytorch/pytorch/actions/runs/22169966163/job/64112183461) [HUD commit link](https://hud.pytorch.org/pytorch/pytorch/commit/1b3ec474f6657f014d924d81982de6ec9bd83daa) ([comment](#172566 (comment)))
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
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
Stack from ghstack (oldest at bottom):
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @kadeng @chauhang @amjames @Lucaskabela @jataylo