Demystifying NVSHMEM: A System-Level Analysis on Symmetric Memory and Device-Initiated Operations in GPU Communication

Yijun Ma, Siyuan Shen, Tiancheng Chen, Akhil Langer, Jiri Kraus, Benjamin Glick, Craig Belusar, Jeff Hammond, Torsten Hoefler | ETH Zürich / NVIDIA Corporation | Preprint, arXiv:2606.05951v1 [cs.DC], 4 Jun 2026 | (* Ma and Shen contributed equally)**


Problem

NVSHMEM is NVIDIA's OpenSHMEM-based PGAS communication library for GPU clusters, enabling GPU-initiated, one-sided communication through symmetric memory. It fills a gap left by NCCL, whose conventional interface is host-driven (the CPU enqueues collectives and schedules kernels) and therefore ill-suited to fine-grained, data-dependent point-to-point patterns such as stencil halo exchange, irregular graph processing, and sparse/expert-parallel workloads. Despite growing adoption, a system-level understanding of NVSHMEM's design and behavior is scattered across documentation, source code, and application experience — many key behaviors (how symmetric memory is realized, which paths avoid the CPU, how collectives work) are not apparent from the API alone. The study targets NVSHMEM v3.3.9.


Core Insight

A source-level analysis shows NVSHMEM pioneered a device-side symmetric-memory PGAS programming model that lets CUDA threads, warps, and thread blocks initiate one-sided put/get, atomics, and synchronization directly from GPU code. This is implemented through a symmetric heap, two transport paths (a P2P fast path and an IBGDA/proxy slow path), and a layered runtime — enabling fine-grained, GPU-driven communication that approaches hardware limits for bulk write-style traffic, at the cost of an execution model and collective implementations that do not fully exploit GPU parallelism.


Method

The paper traces NVSHMEM's design from programming model to runtime internals and transport mechanisms, then validates with microbenchmarks and a real-world case study (DeepEP). Key structural findings:

Programming model:  PGAS / OpenSHMEM; PE = OS process mapped to 1 GPU;
                    symmetric heap + symmetric objects; teams (lightweight,
                    NVSHMEM_TEAM_WORLD default); dual host + device API
                    (nvshmem_ / nvshmemx_ / nvshmemi_); thread/warp/block scope

Memory:             symmetric heap on CUDA VMM; eager VA reservation,
                    on-demand physical commit; first-fit O(n) host allocator;
                    remote addr = peer_heap_base + (dest_local - heap_base)  [Eq. 1]

One-sided RMA:      Fast path  -> direct GPU load/store on mapped peer heap
                    Slow path  -> IBGDA (GPU posts RDMA to NIC) or host proxy
                                  thread; transports IBRC/IBDEVX/UCX/libfabric

Collectives:        Broadcast / AlltoAll / FCollect / Reduce / ReduceScatter;
                    LL (16 B) & LL128 (120 B + 8 B flag, NVLink-only) protocols;
                    per-team pSync buffer; rule-based decision-tree selection;
                    single-CTA device path vs multi-CTA on-stream (NVLS-gated)

The DeepEP case study examines a DeepSeek MoE expert-parallelism library that uses NVSHMEM as a cross-node RDMA substrate — a high-throughput (HT) training path with a two-stage RDMA-then-NVLink pipeline, eight parallel world teams, and warp specialization; and a low-latency (LL) inference path that drops the NVLink forwarding stage. DeepEP invokes NVSHMEM only at critical RDMA points (chunked puts, atomic credit updates) and builds its own transport pipeline on top.


Experimental Setup

Component Value
Cluster CoreWeave H200
GPUs per node 8 × NVIDIA H200 SXM5, 144 GB HBM3e each
Intra-node NVLink-4; 900 GB/s bidirectional per GPU; NVLink-SHARP (NVLS) multicast
Inter-node ConnectX-7 InfiniBand, 8 NICs/node (single-rail ref ~50 GB/s; 400 GB/s aggregate)
Software CUDA 13.0.88; NVSHMEM 3.3.9 (built from public source)
RMA config device P2P perftests: 32 CTAs × 256 threads/CTA
Inter-node scalar p/g tuned IBGDA: NVSHMEM_IBGDA_NUM_RC_PER_PE=64, 64 CTAs × 1024 threads/CTA
AllReduce sum on float, captured/replayed with CUDA Graphs
Baselines NCCL via nccl-tests — NCCL Ring and NCCL NVLS
Trials averaged over 8 trials

Headline Quantitative Results

One-sided RMA bandwidth:

Operation Intra-node Inter-node (tuned IBGDA)
bulk put 313 GB/s 48.0 GB/s
bulk get 141 GB/s 48.2 GB/s
scalar p 172 GB/s 15.6 GB/s
scalar g < 9 GB/s 1.28 GB/s
reference NVLink 450 GB/s single-rail IB ~48 GB/s

AllReduce (intra-node 8 H200 / inter-node 16 H200):

Path Intra-node Inter-node
NVSHMEM On-stream 264 GB/s < 0.20 GB/s
NVSHMEM Device-Block (single CTA) 30 GB/s < 0.20 GB/s
NCCL Ring (outperformed by on-stream) 180 GB/s
NCCL NVLS 276 GB/s 252 GB/s (NVLS Tree)

DeepEP: in NVIDIA's prior comparison, NCCL GIN matches the NVSHMEM-based DeepEP within about 1–2% on both HT and LL dispatch/combine kernels.


Limitations


Open Problems

  1. Whether NVSHMEM retains a long-term advantage as a lower-level one-sided RMA substrate as NCCL's device API and GIN interface narrow the gap (the GIN comparison suggests it still does at the low level).
  2. NVSHMEM's execution model does not fully exploit GPU parallelism (single-threadgroup collectives, no public _grid variants) — a tension between grid-wide synchronization cost and kernel-relaunch cost.
  3. Lack of hierarchical composition (single symmetric heap, flat remote-memory view) versus NCCL's explicit scale-up/scale-out distinction.
  4. Device-initiated PGAS is a broader vendor trend (rocSHMEM, Intel SHMEM, GICC/Slingshot); portability and convergence across compiler stacks, memory models, and transports remains open.
  5. NVSHMEM stays relevant for fine-grained, irregular, data-dependent communication (sparse/MoE/expert-parallel, stencil halo, irregular graph) where collective libraries are inefficient — as DeepEP demonstrates.

Note on NCCL Tuning

The paper documents NVSHMEM's runtime collective-algorithm choice as a rule-based decision tree keyed on capability checks, datatype/scope constraints, scratch-space availability, and fixed message-size thresholds — the same kind of static threshold logic NCCL uses to pick Ring vs. NVLS vs. Tree. The microbenchmarks make the stakes concrete: intra-node, the on-stream NVLS path reaches 264 GB/s while the single-CTA device-block AllReduce caps at 30 GB/s, yet that device path wins on small-message latency (3.8–7.1 µs up to 64 KiB vs NCCL Ring's 4.7–8.9 µs). It also reaffirms that LL128's 128-byte atomic stores are safe only over NVLink and unsafe on PCIe — a protocol-eligibility constraint any algorithm/protocol selector must respect when the interconnect changes.