Peer-to-Peer (P2P) Access is a hardware and software capability that enables GPUs within the same system to directly read from and write to each other's device memory. This is achieved over a high-speed interconnect like NVLink or PCIe, allowing data transfers to occur without staging through the host's CPU memory (RAM). The primary technical benefit is a dramatic reduction in communication latency and an increase in effective bandwidth between accelerators, which is essential for scaling distributed training and large-model inference workloads.
Glossary
Peer-to-Peer (P2P) Access

What is Peer-to-Peer (P2P) Access?
A direct communication channel between GPUs that bypasses the CPU and host memory, crucial for high-performance multi-GPU computing.
For P2P access to be enabled, the GPUs must be on the same PCIe root complex or connected via NVLink, and the operating system driver must support it. In practice, this allows kernels running on one GPU to directly access the global memory of another, enabling efficient model parallelism and parameter synchronization. This direct path eliminates a major bottleneck in multi-GPU systems, as it avoids the bandwidth limitations and added latency of the CPU memory bus, making data exchange between GPUs nearly as fast as accessing their own local memory.
Key Characteristics of P2P Access
Peer-to-Peer (P2P) access is a foundational capability for multi-GPU systems, enabling direct data transfers between accelerator devices. This section details its core mechanisms, enabling technologies, and performance implications.
Direct GPU-to-GPU Transfers
P2P access enables GPUs within the same system to read and write directly to each other's device memory without staging data through the host's CPU memory. This bypasses the PCIe bus for the CPU leg of the transfer, cutting latency and freeing host memory bandwidth for other tasks. It is essential for workloads like large model training where tensors must be shared between GPUs every iteration.
- Mechanism: Managed by the GPU driver and CUDA runtime via APIs like
cudaDeviceEnablePeerAccess(). - Benefit: Can double effective bandwidth for inter-GPU communication compared to a host-mediated copy.
NVLink & High-Speed Interconnects
P2P performance is dictated by the physical interconnect between GPUs. NVLink is NVIDIA's dedicated, high-bandwidth interconnect designed specifically for GPU-to-GPU communication, offering significantly higher bandwidth and lower latency than standard PCIe.
- NVLink: Provides a direct mesh or switch fabric between GPUs (e.g., up to 900 GB/s with NVLink 4.0). Enables a unified memory address space across multiple GPUs.
- PCIe P2P: Also supports direct transfers but is limited by shared PCIe switch bandwidth and higher protocol overhead. Performance is highly dependent on system topology (e.g., GPUs on the same PCIe root complex).
Unified Virtual Addressing (UVA)
Unified Virtual Addressing is a memory model that provides a single, contiguous virtual address space across all GPU and host CPU memory in a system. UVA is a prerequisite for transparent P2P access, as it allows pointers to be dereferenced from any GPU without manual translation.
- Function: The CUDA driver and GPU Memory Management Unit (MMU) translate a virtual address to the correct physical location, whether it's in another GPU's memory or host memory.
- Transparency: Enables APIs like
cudaMemcpyto perform P2P transfers automatically when source and destination pointers reside in different GPU memories, simplifying programmer effort.
Topology & Peer Accessibility
Not all GPU pairs in a system can establish a direct P2P link. Accessibility depends on the physical system topology—how GPUs are connected via PCIe switches and root complexes—and the presence of NVLink bridges.
- Check Peer Access: Use
cudaDeviceCanAccessPeer()to determine if a direct path exists between two GPUs. - PCIe Complexity: In multi-GPU servers, GPUs may be connected via multiple PCIe switches. Optimal P2P bandwidth is achieved when GPUs are on the same NUMA node and PCIe root complex.
- NVIDIA DGX/ HGX Systems: Utilize fully connected NVLink topologies (e.g., NVSwitch) to provide uniform, high-bandwidth P2P access between all GPUs in the pod.
Use Cases: Multi-GPU Training & Inference
P2P access is critical for scaling deep learning training and large-model inference across multiple GPUs.
- Model Parallelism: Different layers of a single model are split across GPUs. Activations and gradients are passed directly between GPUs each forward/backward pass, making P2P latency a major factor in training speed.
- Data Parallelism: While each GPU works on a separate data batch, operations like all-reduce for gradient synchronization (e.g., via NCCL) rely heavily on P2P links for optimal performance.
- Inference for Large Models: Running models that exceed the memory of a single GPU requires tensor parallelism, where intermediate results are directly exchanged between GPUs during the generation phase.
Performance Considerations & Limitations
While powerful, P2P access has specific constraints and performance nuances.
- Bandwidth is Not Symmetric: Transfer speed from GPU A to GPU B may differ from B to A, depending on interconnect topology.
- Memory Allocation Alignment: For best PCIe P2P performance, allocations should be aligned to 64KB boundaries.
- Software Overhead: Enabling peer access has a small, one-time setup cost. The first transfer between a new peer pair may incur additional latency.
- No CPU Access: Direct P2P memory is not directly accessible by the CPU; the CPU must still access it via the GPU's mapped PCIe BAR, which is slower than host memory.
- System BIOS/SW Settings: Features like Above 4G Decoding and SR-IOV must often be configured correctly in the system BIOS for P2P to function.
How Does Peer-to-Peer Access Work?
Peer-to-Peer (P2P) access is a foundational technique for high-performance multi-GPU computing, enabling direct data transfers between accelerator devices.
Peer-to-Peer (P2P) access is a hardware and software capability that allows multiple GPUs within a system to directly read from and write to each other's device memory over a high-speed interconnect, bypassing the host CPU and system memory. This direct path, enabled by technologies like NVLink or via the PCIe bus with P2P support, eliminates the latency and bandwidth bottlenecks of copying data through host memory. It is essential for scaling workloads like large model training and high-performance computing across multiple GPUs, as it facilitates fast collective operations and efficient data sharing between devices.
For P2P access to function, the system hardware must support it, typically requiring GPUs to be on the same PCIe root complex or connected via NVLink. The software stack, through APIs like CUDA, must then explicitly enable the capability, allowing kernels on one GPU to directly access pointers in another GPU's memory. This creates a unified address space across devices, simplifying programming. Effective use of P2P access is a key optimization within the broader GPU memory hierarchy, dramatically reducing inter-GPU communication latency and freeing host resources for other tasks.
Primary Use Cases for P2P Access
Peer-to-Peer (P2P) access enables direct GPU-to-GPU communication, bypassing the CPU and host memory. This capability is foundational for scaling workloads across multiple accelerators. Below are its key applications in high-performance computing and machine learning.
Multi-GPU Model Training
P2P access is essential for data-parallel and model-parallel training strategies. In data parallelism, gradients must be averaged across all GPUs after each backward pass. P2P enables high-speed all-reduce operations directly between GPU memories, drastically reducing synchronization overhead compared to routing through host memory. For model parallelism, where different layers of a single model are split across devices, P2P allows activations and gradients to flow directly between GPUs during the forward and backward passes, minimizing inter-GPU communication latency.
Large Model Inference
Running inference for models whose parameters exceed the memory of a single GPU requires model sharding. P2P access allows different layers or components of the model to reside on separate GPUs. During inference, the intermediate activations are passed directly from one GPU to the next via the high-speed interconnect (e.g., NVLink), creating a pipeline. This avoids the latency of copying data back to the CPU between each layer's execution, which is critical for meeting low-latency service-level agreements (SLAs) for large language models (LLMs) and diffusion models.
High-Performance Computing (HPC)
In scientific computing, applications like computational fluid dynamics (CFD), molecular dynamics, and climate modeling involve massive, spatially decomposed datasets. P2P access allows GPUs working on adjacent spatial domains to exchange halo regions or boundary data directly. This direct exchange is far more efficient than a centralized gather-scatter pattern via the host, enabling stronger scaling and reducing time-to-solution for simulations that require frequent neighbor communication across the GPU grid.
GPU-Accelerated Databases & Analytics
Systems like GPU-accelerated SQL databases and dataframe libraries (e.g., RAPIDS cuDF) use P2P for multi-GPU join, sort, and aggregation operations. When a dataset is partitioned across GPUs, performing a global operation requires shuffling data. P2P enables direct GPU-to-GPU transfers for this shuffle phase, maximizing throughput for in-memory analytics. This is particularly effective for operations that are bandwidth-bound rather than compute-bound.
NVLink-Based GPU Clustering
NVIDIA's NVLink technology provides a switched fabric for connecting multiple GPUs at extremely high bandwidth. P2P access over NVLink creates a unified memory domain across GPUs, allowing them to access each other's memory as if it were their own. This enables:
- GPU Direct RDMA: For MPI-based applications, GPUs can directly read/write to the memory of GPUs in other nodes.
- Large Unified Address Spaces: Applications can allocate a single buffer that is physically distributed across multiple GPUs but accessible from any GPU in the cluster without explicit programming, managed by the UVM driver.
Overcoming PCIe Root Complex Bottlenecks
In multi-GPU systems connected via PCIe, all cross-GPU traffic traditionally routes through the CPU's PCIe root complex. This creates a bottleneck, as bandwidth is shared and latency increases. Enabling P2P access allows GPUs on the same PCIe switch (often within the same root complex) to communicate directly, bypassing the root complex. This topology-aware optimization is crucial for maximizing bandwidth in systems without NVLink, such as those using standard PCIe Gen4/Gen5 switches.
P2P Access vs. Traditional Host-Staged Transfer
A comparison of two fundamental paradigms for moving data between GPUs within a single system, highlighting their impact on latency, bandwidth, and host resource utilization.
| Feature / Metric | Peer-to-Peer (P2P) Access | Traditional Host-Staged Transfer |
|---|---|---|
Primary Data Path | Direct GPU-to-GPU over NVLink/PCIe | GPU → Host Memory → GPU |
Host Memory Bandwidth Consumption | 0 GB/s | ≥ 2x Data Size (Read + Write) |
Typical Latency (for 1GB transfer) | < 5 ms (NVLink) |
|
Effective Bandwidth (NVLink System) | 600-900 GB/s | Limited by PCIe (~64 GB/s) or host memory BW |
CPU Utilization | Minimal (initiation only) | High (DMA engine management, potential CPU copies) |
Required CUDA Support | cudaDeviceEnablePeerAccess | Standard cudaMemcpy |
Use Case Ideal For | Multi-GPU model parallelism, tightly coupled workloads | One-off transfers, systems without P2P topology |
Topology Dependency | Yes (requires NVLink or PCIe P2P support) | No (works on any PCIe topology) |
Frequently Asked Questions
Peer-to-Peer (P2P) access is a critical capability for high-performance multi-GPU computing. These questions address its core mechanisms, requirements, and practical applications.
Peer-to-Peer (P2P) access is a hardware and software capability that enables GPUs within the same system to directly read from and write to each other's memory without routing data through the host CPU's system memory (RAM). It works by leveraging a high-speed interconnect, such as NVLink or PCIe, to establish a direct data path between GPU devices. When enabled, one GPU can perform a Direct Memory Access (DMA) operation to another GPU's memory, bypassing the host entirely. This is managed by the GPU driver and runtime (e.g., CUDA), which sets up the necessary address translations and mappings, allowing kernels on one GPU to use pointers to memory physically located on a peer GPU.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Peer-to-Peer (P2P) access is a foundational technique for multi-GPU systems. Understanding these related concepts is essential for designing high-performance, memory-efficient AI inference pipelines.
Unified Virtual Memory (UVM)
Unified Virtual Memory is a memory management architecture that creates a single, contiguous virtual address space shared between a CPU and GPU(s). It simplifies data sharing and is the conceptual framework that enables seamless P2P transfers.
- Mechanism: Allows both processors to access the same memory pointers using a unified page table.
- Relation to P2P: UVM can manage P2P mappings, allowing a GPU to directly access another GPU's memory through a common virtual address, without programmer intervention for data movement.
- Benefit: Eliminates the need for explicit
cudaMemcpycalls between devices, enabling pointer-based access across the system.
Non-Uniform Memory Access (NUMA)
Non-Uniform Memory Access is a computer memory design where access time depends on the memory location relative to the processor. In multi-GPU systems with P2P, a similar concept applies: accessing local GPU memory is faster than accessing a peer's memory over NVLink/PCIe.
- GPU NUMA: Memory on a directly attached GPU has lower latency than memory on a peer GPU, even with a fast interconnect.
- Design Implication: Optimal algorithm design must consider data locality. Frequently accessed data should reside on the local GPU, with P2P used for less frequent, bulk transfers.
- System Architecture: Modern multi-socket CPU systems and multi-GPU servers are NUMA systems, requiring careful memory allocation and thread placement.
Memory Tiering
Memory tiering is a system architecture that organizes different types of memory into a hierarchy based on performance and capacity. P2P access effectively creates a new, high-performance tier in this hierarchy for multi-GPU systems.
- Tiers in a GPU Server: 1) Local GPU HBM (fastest), 2) Peer GPU HBM via NVLink (very fast), 3) Peer GPU HBM via PCIe (fast), 4) CPU RAM (slower), 5) Storage (slowest).
- Automated Management: Advanced drivers and runtime systems can perform page migration between these tiers based on access patterns ("heat").
- Goal: Keep the most frequently accessed data in the fastest available memory tier, using P2P to make peer GPU memory a viable high-speed tier.
Atomic Memory Operations
Atomic operations are read-modify-write instructions guaranteed to complete without interruption. When using P2P access, atomics can be performed directly on a peer GPU's memory, enabling efficient synchronization and communication across devices.
- Function: Operations like
atomicAdd,atomicCAS(compare-and-swap) can target peer memory addresses. - Use Case: Implementing distributed locks, counters, or consensus mechanisms across GPUs without bouncing data through the host.
- Performance: Atomic operations over NVLink have higher latency than local atomics but are far faster than achieving the same result via CPU-mediated communication. This enables fine-grained, multi-GPU parallel algorithms.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us