Skip to content

Add NVLS switch-channel cross-rank barrier api - #863

Open
RJ Souza (Empyreus) wants to merge 2 commits into
mainfrom
rjsouza/nvls-barrier-cpp
Open

Add NVLS switch-channel cross-rank barrier api#863
RJ Souza (Empyreus) wants to merge 2 commits into
mainfrom
rjsouza/nvls-barrier-cpp

Conversation

@Empyreus

Copy link
Copy Markdown
Contributor

Adds a device-side group barrier built directly on the NVLS switch (NVLink SHARP multicast). A barrier becomes a single  signal() / wait()  pair backed by one  multimem  atomic on a shared arrival counter that the switch reflects into every rank — replacing the O(n²) mesh of memory-channel semaphores previously needed to synchronize a multicast group.

RJ Souza (Empyreus) and others added 2 commits August 7, 2026 00:30
Introduce SwitchDevice2DeviceSemaphore, a switch (NVLS multicast) group
barrier backed by multimem atomics: one signal() issues a multimem add on
the shared arrival counter and wait() spins on this rank's reflected copy
until all ranks arrive. Ordered (release/acquire) and relaxed variants are
provided. Wire it into SwitchChannel as the barrier backend so no separate
memory-channel semaphores or host-side barrier are needed; the barrier flag
is carved from the connection's own multicast region.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6f77eb0b-a070-4b73-b532-58ce7e39c93e
Cover the NVLS switch-channel barrier semaphore correctness and add
relaxed/ordered barrier performance microbenchmarks under test/mp_unit.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6f77eb0b-a070-4b73-b532-58ce7e39c93e
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant