vllm.utils.nccl
¶
Functions:
-
find_nccl_include_paths–Return possible include paths containing
nccl.h. -
find_nccl_library–Return NCCL/RCCL shared library name to load.
-
find_nccl_library_paths–Return possible library paths containing
libnccl.so. -
pin_nccl_env–Set NCCL variables for this process's own communicators.
-
query_nccl_gin_type–Return the full or railed GIN type, or
Noneon query failure. -
unpinned_nccl_env–Create communicators shared with other processes without the pins.
_swap_env(values)
¶
Set (None: unset) the given variables and return their previous values.
Source code in vllm/utils/nccl.py
find_nccl_include_paths()
¶
Return possible include paths containing nccl.h.
Considers VLLM_NCCL_INCLUDE_PATH and the nvidia-nccl-cuXX package.
Source code in vllm/utils/nccl.py
find_nccl_library()
¶
Return NCCL/RCCL shared library name to load.
Uses VLLM_NCCL_SO_PATH if set; otherwise chooses by torch backend.
Source code in vllm/utils/nccl.py
find_nccl_library_paths()
¶
Return possible library paths containing libnccl.so.
Looks inside the nvidia-nccl-cuXX pip package.
Source code in vllm/utils/nccl.py
pin_nccl_env(pins)
¶
Set NCCL variables for this process's own communicators.
NCCL never reconciles these across ranks, so communicators shared with a
process that does not set them are created without them, see
unpinned_nccl_env. NCCL caches most variables on first read; listing the
pins in NCCL_NO_CACHE makes it re-read them per communicator. NCCL parses
that list once, so this must run before the process's first NCCL call.
Source code in vllm/utils/nccl.py
query_nccl_gin_type(group, *, railed=False)
¶
Return the full or railed GIN type, or None on query failure.
Source code in vllm/utils/nccl.py
unpinned_nccl_env()
¶
Create communicators shared with other processes without the pins.