IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Mojo function

group

def group() -> _Group

Returns a context manager that groups NCCL/RCCL collective calls.

Use as a with statement to bracket a series of collective API calls between ncclGroupStart and ncclGroupEnd, enabling the NCCL/RCCL library to fuse or pipeline them for better performance.

Returns:

_Group: A _Group context manager that calls ncclGroupStart on entry and ncclGroupEnd on exit.

Was this page helpful?