Skip to main content

Module group

Module group 

Source
Expand description

Typed scope guard around ncclGroupStart / ncclGroupEnd.

Usage at the world level:

NcclWorld::group(|w| {
    w.send(buf, peer)?;
    w.recv(buf2, peer)?;
    Ok(())
})?;

At the actor level (one rank), GroupGuard issues group_start on construction and group_end on Drop (or on commit()), while emitting BeginGroup / EndGroup markers via a tracker so tests can assert the begin/end pair fires exactly once.

Structs§

GroupGuard
RAII scope guard for a group call on a single rank. Issues ncclGroupStart on construction; ncclGroupEnd on Drop if commit() was not called (errors logged but swallowed in Drop).
GroupTracker
Counter of begin/end events. Tests construct one, hand it to a GroupGuard, and assert the begin/end pair is balanced.