Support for NVSHMEM and GDRCopy
NVSHMEM and GDRCopy follow a shared responsibility model, the same pattern as other GPU communication libraries such as NCCL and cuDNN:-
CoreWeave provides the host prerequisites in the ncore Node image at the Node level. These include the GDRCopy kernel driver (
gdrdrv), thenvidia-peermemkernel module that enables GPUDirect RDMA, and NVIDIA GPU drivers with peer memory support. The image also sets the following NVIDIA driver options through the kernel command line, so you don’t need to request them or change your workloads:nvidia.NVreg_EnableStreamMemOPs=1nvidia.NVreg_RegistryDwords="PeerMappingOverride=1;"
- You provide the userspace library by installing NVSHMEM or GDRCopy in your own container image. CoreWeave does not install these libraries system-wide.
Prerequisites
To use NVSHMEM and GDRCopy, you must meet the following requirements:- Your Nodes run ncore image version 2.10.1 or later, which includes the GDRCopy kernel driver,
nvidia-peermem, and the required kernel parameters. Recent ncore images include these components by default. If your Nodes run an older image, contact CoreWeave Support to request an update. - For NVSHMEM IBGDA over InfiniBand, select an InfiniBand-capable Node Pool. See the prerequisites in Use GPUDirect RDMA with InfiniBand. CoreWeave recommends NVIDIA driver version 570 or later for IBGDA workloads.
- The NVSHMEM or GDRCopy userspace library is installed in your container image.
Verify the Node prerequisites
Confirm that your Nodes run a supported ncore image and driver version. Replace[NODE-NAME] with the name of a Node in your cluster:
Example output
Enable GDRCopy in your container
Set theNVIDIA_GDRCOPY environment variable in the container so that it can access the gdrdrv driver on the host:
If you use SUNK, this environment variable is already set.
Configure NVSHMEM for CoreWeave InfiniBand devices
CoreWeave presents InfiniBand host channel adapters (HCAs) with device names that begin withibp (for example, ibp0), rather than the mlx5 naming that NVSHMEM’s IBGDA transport expected in earlier versions. The configuration required depends on your NVSHMEM version:
-
NVSHMEM 3.5 or later: No configuration is needed. NVSHMEM accepts
ibpdevice names by default. -
NVSHMEM 3.4.5: Set the
NVSHMEM_HCA_PREFIXenvironment variable in your container. In this version, the default HCA prefix ismlx5, so NVSHMEM skipsibpdevices unless you set the variable explicitly: -
NVSHMEM earlier than 3.4.5: These versions recognize only
mlx5device names and don’t include theNVSHMEM_HCA_PREFIXenvironment variable. Patch the NVSHMEM source as described in Patch NVSHMEM versions earlier than 3.4.5.
NCCL_IB_HCA to ibp for all NVSHMEM versions, as described in Use GPUDirect RDMA with InfiniBand.
Patch NVSHMEM versions earlier than 3.4.5
These instructions apply only to NVSHMEM versions earlier than 3.4.5. Later versions don’t require a source patch. See Configure NVSHMEM for CoreWeave InfiniBand devices.
ibgda in your container. The following example applies to NVSHMEM version 3.2.5. Download NVSHMEM version 3.2.5.
In src/modules/transport/ibgda/ibgda.cpp, change the device-name check from mlx5 to ibp.
Original code: