Repository navigation
Conversation
…e clean; forward nccl-lazy mem pool [ghstack-poisoned]
PR Status: Approved 🚀Please fix all CI failures and trigger merge by commenting "@pytorchbot merge". ✅ AUTOMATED REVIEW - Ready for human review:
Reviewed commit: 🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/201432
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 7742be5 with merge base ff4f371 ( 🟡 GREEN LIGHT - PR requires human review:
reason: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…ated [ghstack-poisoned]
`ProcessGroupNCCLLazy` forwards `mem_allocator` and windows to its primary `ProcessGroupNCCL`, but not `register_mem_pool` / `deregister_mem_pool`, so nccl-lazy users can't register a pool as symmetric or tear its windows down safely before freeing it. Adds both bindings, forwarding to the primary communicator (pair comms are not registered; windows don't use them), and documents them for both backends. Test plan: `test/distributed/test_c10d_window.py` (new `test_symmetric_mem_pool_teardown`) on 2 GB200s for nccl2 and nccl-lazy. This PR was authored with the assistance of an AI coding agent. ghstack-source-id: 81a96c1 Pull-Request: #201432
… symm test [ghstack-poisoned]
…r, map_remote_tensor doc [ghstack-poisoned]
[ghstack-poisoned]
There was a problem hiding this comment.
Automated review of 7742be5: nothing blocking; ready for human review.
The PR adds register_mem_pool/deregister_mem_pool bindings to ProcessGroupNCCLLazy. They forward to the primary ProcessGroupNCCL, and the PR also adds a matching .pyi stub and an nccl-lazy test subclass. Recommendation: Approve, since the review found no issues.
This review is AI-generated and advisory. Each new automated review replaces the previous one.
Withdrawn: the automated review of 7742be5 found nothing blocking.
|
Starting merge as part of PR stack under #201436 |
2 similar comments
|
Starting merge as part of PR stack under #201436 |
|
Starting merge as part of PR stack under #201436 |
) `dist._new_window` / `Window` had no user docs, and the `Window` pybind class had no docstrings. Adds docstrings to the `Window` bindings and its option/attribute types in `init.cpp`, re-exports `PutOptions`, `SignalOptions`, `WaitSignalOptions`, `WindowAttr` and `WindowAccessType` from `distributed_c10d` (not in `__all__`, matching `Window`), and an experimental "One-sided communication" section to distributed.md: backend/NCCL requirements, the memory-pool requirement, a ring put/wait_signal example, and autodoc entries. Adds nccl-lazy to the window tests, plus a test for the `register_mem_pool(symm=True)` window flow and teardown the docs recommend. Review points intentionally not addressed: `nccl2` isn't listed separately since `nccl` resolves to it; only `nccl-legacy` is called out. The out-of-tree, deprecated torchcomms backend and the `TORCH_DISTRIBUTED_DEBUG=DETAIL` wrapper aren't covered, to keep the section to the common cases. `_new_window`/`Window` stay private and outside `__all__` while experimental; this documents them without committing to a public API. `test_symmetric_mem_pool_teardown` has no try/finally: an earlier review asked to drop it, and cleanup after a failure would itself run collectives that can hang when ranks diverge. Test plan: Built torch from source and checked the docstrings. Ran the docs ring example on 2 GB200s with `nccl` and `nccl-lazy` (nightly + NCCL 2.32.3), and `test/distributed/test_c10d_window.py` passes for nccl2 and nccl-lazy. `sphinx-build -M html source build` in docs/; the section renders, cross-references resolve, and no new warnings vs main. This PR was authored with the assistance of an AI coding agent. Pull Request resolved: #201405 Approved by: https://github.com/kapilsh ghstack dependencies: #201403, #201404, #201432
…ctory (#201413) `distributed/elastic/run.md` was the only subdirectory page using a bare `:toctree: generated`, so a docs build wrote stubs to `docs/source/distributed/elastic/generated/`, which isn't ignored, isn't removed by `make clean`, and isn't recognized by the `generated/` checks in conf.py (edit button, last-updated date). Point it at `../../generated` like the other subdirectory pages, add redirects from the old URLs, exclude `distributed/elastic/generated/` from the build so stale local stubs don't clash with the redirects, and drop the stale `docs/source/compile/generated/` `.gitignore` entries (`docs/source/compile/` no longer exists). Test plan: Built docs locally; the torchrun stubs land in `docs/source/generated/`, `git status` is clean, and the redirect pages for the old URLs are generated. This PR was authored with the assistance of an AI coding agent. Pull Request resolved: #201413 Approved by: https://github.com/kapilsh ghstack dependencies: #201403, #201404, #201432, #201405
ProcessGroup pre/post/abort hooks, their argument types, and the built-in FlightRecorderHook/NanCheckHook/HealthCheckHook had one-line or no docstrings and no docs page. This adds docstrings to the pybind bindings (semantics: issue-time vs completion, op_id pairing, hook_id ordering/replacement, exception behavior, abort hook idempotence, auto-attach env vars), re-exports HookOpName/PreHookArgs/PostHookArgs from torch.distributed.distributed_c10d like the window types, and adds a "Hooks" section to distributed.md. Review points intentionally not addressed: exhaustive per-op hook coverage and HookOpName mapping exceptions (monitored_barrier, coalesced Work, sparse allreduce, gather_into_tensor, barrier tensor lists), split_group not attaching NanCheckHook, and TORCH_NCCL_NAN_CHECK; docs are kept to common cases. Test plan: ``` pip install -e . -v --no-build-isolation python test/test_public_bindings.py cd docs && sphinx-build -M html source build -j 24 -T --keep-going -D katex_prerender=0 ``` Also ran the docs example on a single-rank gloo group and checked the rendered docstrings. This PR was authored with an AI assistant (Claude). Pull Request resolved: #201436 Approved by: https://github.com/kapilsh ghstack dependencies: #201403, #201404, #201432, #201405, #201413
Stack from ghstack (oldest at bottom):
ProcessGroupNCCLLazyforwardsmem_allocatorand windows to its primaryProcessGroupNCCL, but notregister_mem_pool/deregister_mem_pool, so nccl-lazy users can't register a pool (e.g. as symmetric) or tear its windows down before freeing it. Adds both bindings, forwarding to the primary communicator (pair comms are not registered; windows don't use them).Test plan:
New
ProcessGroupNCCLLazyMemPoolTestintest/distributed/test_c10d_nccl2.pyruns the existingregister_mem_pooltests on nccl-lazy; run on 2 GB200s.This PR was authored with the assistance of an AI coding agent.