Open
Conversation
Contributor
|
@tianfengfrank has exported this pull request. If you are a Meta employee, you can view the originating Diff in D100036330. |
2512811 to
28bff31
Compare
meta-codesync bot
pushed a commit
that referenced
this pull request
Apr 8, 2026
Summary: Expose window based AGP via ncclx 2.28 Differential Revision: D100036330
Summary: We need to align AGP's internal persistent request with the window API so that regular AllGather can be converted to AGP in graph capture mode (window init + dry-run exec at capture time, SM-free CE replay at execution time). In this diff, we extract `initResources` to a public func so that window AGP can directly call it Reviewed By: dsjohns2 Differential Revision: D99514784
Summary: The NvlEnabledTestParam test was hanging because it had two NCCL communicators alive simultaneously — and it only needed one. How it happened: D95122239 migrated RMATest from ::testing::Test to NcclxBaseTest, which made SetUp() create a full NCCL communicator (this->comm) for every test. This was correct for RMATestParam and MultiWindowTestParam which use this->comm. But NvlEnabledTestParam never uses it — it creates its own communicator with parameterized backends (NVL+IB or IB-only). Nobody noticed the test body was now running with two active comms. Why it hangs: After 97 prior test cycles (each creating/destroying a comm with ~54MB pinned memory across 8 ranks), the CUDA pinned memory pool is fragmented. When NvlEnabledTestParam tries to bootstrap its second comm while the fixture's comm is still alive, one or more ranks can't complete cudaHostAlloc → ncclSocketAccept blocks waiting for that rank → all ranks hang → parent process sends SIGTERM. The fix: Override SetUp()/TearDown() in NvlEnabledTestParam to skip the unnecessary fixture comm creation. Now only one comm exists at a time, and the bootstrap completes cleanly. NOTE: we also decrease the NumIter to save test resources. And add re_timeout to avoid false alarm. Reviewed By: dolpm Differential Revision: D100051366
Summary:
Enables window based AGP using the same SM-free CE+IB algorithm as the persistent AGP path, the memory registration & handler exchange is handled by window, while the core algorithm is reusing the existing AGP. The work flow is as following:
```
cudaMalloc()
→ user allocates recv buffer
│
ctranWinRegister()
→ register buffer with window
│
exchange()
→ populates remWinInfo with remote addresses and keys
│
allGatherWinInit()
→ pArgs.recvbuff = win->winDataPtr
→ pArgs.recvHdl = win->dataRegHdl
→ pArgs.remoteRecvBuffs[r] = win->remWinInfo[r].dataAddr
→ pArgs.remoteAccessKeys[r]= win->remWinInfo[r].dataRkey
→ pArgs.initialized = true (skip waitInit)
→ initResources() (allocate pipeSync)
│
allGatherWinExec()
→ algo->execDirect() or algo->execPipeline()
→ same code path as legacy persistent AGP
│
allGatherWinDestroy()
→ algo->destroy(), free resources
```
Reviewed By: dsjohns2
Differential Revision: D99771595
Summary: Expose window based AGP via ncclx 2.28 Differential Revision: D100036330
28bff31 to
e18b44e
Compare
tianfengfrank
added a commit
to tianfengfrank/torchcomms-1
that referenced
this pull request
Apr 9, 2026
Summary: Pull Request resolved: meta-pytorch#2003 - Expose window based AGP via ncclx - add UT for testing Differential Revision: D100036330
tianfengfrank
pushed a commit
to tianfengfrank/torchcomms-1
that referenced
this pull request
Apr 9, 2026
Summary: Pull Request resolved: meta-pytorch#2003 Expose window based AGP via ncclx 2.28 Differential Revision: D100036330
tianfengfrank
added a commit
to tianfengfrank/torchcomms-1
that referenced
this pull request
Apr 9, 2026
Summary: Pull Request resolved: meta-pytorch#2018 Pull Request resolved: meta-pytorch#2003 - Expose window based AGP via ncclx - add UT for testing Differential Revision: D100036330
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Expose window based AGP via ncclx 2.28
Differential Revision: D100036330