Skip to content

expose window AGP via ncclx#2001

Open
tianfengfrank wants to merge 3 commits intomainfrom
export-D99930047
Open

expose window AGP via ncclx#2001
tianfengfrank wants to merge 3 commits intomainfrom
export-D99930047

Conversation

@tianfengfrank
Copy link
Copy Markdown
Contributor

Differential Revision: D99930047

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:


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
Differential Revision: D99930047
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 8, 2026
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync bot commented Apr 8, 2026

@tianfengfrank has exported this pull request. If you are a Meta employee, you can view the originating Diff in D99930047.

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 Meta Open Source bot. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant