Registry / ai-ml / nvidia-nccl-cu11

nvidia-nccl-cu11

JSON →
library2.21.5pypypi✓ verified 22d ago

The `nvidia-nccl-cu11` package provides the NVIDIA Collective Communication Library (NCCL) runtime binaries specifically compiled for CUDA 11. NCCL is a high-performance library for collective communication operations (e.g., all-reduce, all-gather, broadcast) across multiple GPUs, both within a single node and across multiple nodes. It is optimized for NVIDIA GPUs and high-speed interconnects like NVLink and InfiniBand. This package primarily serves as a backend dependency for deep learning frameworks (like PyTorch, TensorFlow) and other GPU-accelerated libraries that require NCCL's capabilities for distributed computing. The current version is 2.21.5, with frequent updates corresponding to new NCCL releases and CUDA versions.

pip install nvidia-nccl-cu11
INSTALL
IMPORT
SIG · NVIDIA-NCCL-CU11
N
nvidia-nccl-cu11
ai-mlpythonv2.21.5
Install
4.3s avg
Import
Disk
200MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.21.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 4.3s · import 0.000s · 202MB
200MB installed
● package 200MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

nccl
from nvidia import nccl
import torch; torch.cuda.nccl.version()

This quickstart demonstrates how to verify that NCCL is detected and its version reported by a common deep learning framework like PyTorch. The `nvidia-nccl-cu11` package provides the backend, and frameworks then expose its capabilities. This code checks for CUDA availability and attempts to retrieve the NCCL version via PyTorch's API, which is a common way users confirm NCCL's presence and compatibility.

import torch if torch.cuda.is_available(): print(f"CUDA available: {torch.cuda.is_available()}") print(f"CUDA version: {torch.version.cuda}") if hasattr(torch.cuda, 'nccl'): print(f"NCCL version (via PyTorch): {torch.cuda.nccl.version()}") else: print("PyTorch's CUDA backend does not expose NCCL version directly, or NCCL not linked.") else: print("CUDA is not available. NCCL requires NVIDIA GPUs and CUDA.")
Debug
Known issues
breakingNCCL versions are tightly coupled with CUDA toolkit versions. Installing `nvidia-nccl-cu11` requires a compatible CUDA 11.x installation. A mismatch between the installed NCCL version and the CUDA version expected by your deep learning framework can lead to runtime errors, particularly in distributed training scenarios.
fix
Ensure that your `nvidia-nccl-cu11` package version, your system's CUDA toolkit version, and your deep learning framework's CUDA compilation version are all compatible. Check the documentation for your framework to identify the required NCCL and CUDA versions. You may need to specify an exact version during installation, e.g., `pip install nvidia-nccl-cu11==X.Y.Z` or manage environments carefully with tools like Conda.
affects: All versions
gotchaThis package is a runtime library, not a direct Python API. Users often expect to `import nccl` and use its functions directly. However, `nvidia-nccl-cu11` provides the C/C++ shared library (`libnccl.so`) that other Python libraries or frameworks link against. Direct Python bindings (like NCCL4Py) are separate projects and may support different CUDA versions.
fix
If you need direct programmatic access to NCCL from Python, investigate dedicated Python bindings like `NCCL4Py` or `pynccl`, being mindful of their specific CUDA version requirements. Otherwise, leverage NCCL's capabilities through the distributed training modules of deep learning frameworks (e.g., `torch.distributed`).
affects: All versions
gotchaWhen running multi-GPU or distributed workloads, NCCL relies on correct system configuration for GPU Direct, PCI topology, and network interfaces. Issues with BIOS settings, virtual machine/container configurations, or network setup can lead to `ncclUnhandledCudaError` or `ncclSystemError`, poor performance, or hangs.
fix
Consult the NVIDIA NCCL documentation for detailed setup and troubleshooting guides. Ensure `/sys` is properly mounted in containers/VMs, verify GPU-to-GPU communication with `p2pBandwidthLatencyTest` from CUDA samples, and set `NCCL_DEBUG=WARN` to get more explicit error messages from NCCL.
affects: All versions
gotchaThe `nvidia-nccl-cu11` package is specifically for CUDA 11. Trying to use it with a system configured for CUDA 12 or newer (e.g., if you have `nvidia-nccl-cu12` installed by another dependency) can lead to conflicts and runtime errors due to symbol mismatches or incompatible library versions.
fix
Maintain consistent CUDA versions across all your deep learning ecosystem components. If you require CUDA 12+, use `nvidia-nccl-cu12`. If multiple dependencies inadvertently install different NCCL CUDA versions, environment isolation (e.g., with Conda or virtual environments) is crucial. Prioritize the NCCL version compatible with your primary deep learning framework.
affects: All versions when used with incorrect CUDA versions
gotchaWindows support for `nvidia-nccl-cu11` can be challenging. While the PyPI page lists Windows as a supported OS, many deep learning ecosystems and NCCL's underlying C/C++ nature are primarily optimized for Linux environments, and users report installation difficulties.
fix
For Windows, ensure you have the correct NVIDIA drivers and CUDA Toolkit installed. Refer to specific guides for installing deep learning frameworks with GPU support on Windows, as they often handle NCCL dependencies. Be prepared for potential manual library path configurations or consider using WSL2 or Docker for a more consistent Linux-like environment.
affects: All versions on Windows
Upgrade
Version history
2.21.5latest on PyPI · released Apr 3, 2024
Audit
Dependencies
CUDA Toolkit (runtime)requiredNCCL is a CUDA-dependent library; requires a compatible CUDA installation on the system.
PyTorch or TensorFlow (or similar DL framework)optionalThis package is typically consumed by deep learning frameworks for distributed training; direct Python API usage is rare and requires separate bindings.
Agent activity
5 hits · last 30 days
node
4
Resources
nvidia-nccl-cu11 — pip install nvidia-nccl-cu11 · libregistry