Inferensys

Glossary

Compute Express Link (CXL)

Compute Express Link (CXL) is an open industry-standard interconnect that provides high-bandwidth, low-latency connectivity between CPUs and devices like accelerators while maintaining memory coherency.
Performance engineer optimizing AI latency on laptop, latency charts visible, technical optimization session.
HARDWARE INTERCONNECT

What is Compute Express Link (CXL)?

Compute Express Link (CXL) is an open, cache-coherent interconnect standard for high-performance computing.

Compute Express Link (CXL) is an open industry-standard interconnect that provides high-bandwidth, low-latency connectivity between a host processor (CPU) and devices like accelerators (GPUs, FPGAs, NPUs) or memory expanders, while maintaining memory coherency between the CPU and device caches. Built on the physical layer of PCI Express (PCIe), CXL adds crucial protocols for coherency, memory semantics, and streamlined I/O, enabling accelerators to share memory with the CPU as a unified resource rather than copying data across separate pools.

For hardware-aware model optimization, CXL is transformative. It allows a Neural Processing Unit (NPU) to access massive, coherent host memory directly, bypassing traditional bottlenecks. This enables techniques like unified memory for large model weights, efficient heterogeneous memory pooling, and low-overhead data sharing between the CPU and accelerator during complex compilation and execution pipelines, directly impacting performance in workloads involving graph compilation and operator fusion.

COMPUTE EXPRESS LINK (CXL)

CXL Protocol Layers

Compute Express Link (CXL) is a high-speed CPU-to-device interconnect built on the physical and electrical layers of PCI Express® (PCIe®). Its layered protocol stack enables cache-coherent memory sharing, low-latency I/O, and efficient accelerator attachment.

01

CXL.io (I/O) Protocol

The foundational protocol layer, CXL.io, is essentially PCIe 5.0+ with CXL-specific enhancements. It provides the basic I/O semantics for device discovery, configuration, and initialization, ensuring full backward compatibility with the vast PCIe ecosystem. This layer handles:

  • Enumeration and configuration of CXL devices.
  • Standard DMA (Direct Memory Access) operations.
  • Legacy interrupt and error handling. It serves as the essential transport for the higher-level CXL.mem and CXL.cache protocols.
02

CXL.cache Protocol

The CXL.cache protocol enables a device (like a GPU or FPGA) to cache host CPU memory coherently. It defines a set of transactions that allow the device to:

  • Request and snoop cache lines from the host's memory.
  • Maintain coherency using a directory-based or snoop-based model.
  • Reduce latency for accelerator access to frequently used data. This protocol is critical for workloads where the accelerator needs low-latency, coherent access to data structures managed by the CPU, avoiding costly software-managed coherence overhead.
03

CXL.mem Protocol

The CXL.mem protocol allows the host processor to access device-attached memory (e.g., pooled DRAM, persistent memory) using load/store instructions, making it appear as part of the system's unified memory address space. Key functions include:

  • Host-initiated reads and writes to device memory.
  • Support for memory pooling and expansion.
  • Atomic operations for synchronization. This enables efficient memory capacity scaling and is fundamental for memory-centric architectures and composable infrastructure.
04

Link Layer & Transaction Layer

Operating above the physical layer (PCIe), these layers manage reliable packet delivery and transaction semantics:

  • Transaction Layer: Generates and processes Transaction Layer Packets (TLPs) for read/write requests and completions. It is shared across CXL.io, .cache, and .mem, with specific Transaction IDs and attributes for each protocol.
  • Link Layer: Ensures data integrity via CRC (Cyclic Redundancy Check) and manages flow control and link state through a shared credit system. It handles packet acknowledgment and retry mechanisms for reliable transmission.
05

Physical Layer (PCIe Foundation)

CXL 1.x/2.x uses the PCIe 5.0 physical layer, and CXL 3.0 uses PCIe 6.0. This includes:

  • Electrical specifications (signaling, equalization).
  • Lane configuration (x16, x8, etc.).
  • Initialization and training sequence. The shared physical layer is why a CXL device can operate in legacy PCIe mode during boot. The key differentiator is the Flex Bus interface, which dynamically negotiates whether the link operates in PCIe or CXL mode after initialization.
06

Device Types & Protocol Usage

CXL defines device types based on which protocols they implement, dictating their functionality:

  • Type 1 Devices (Accelerators): Use CXL.io + CXL.cache. Example: Smart NICs or FPGAs that cache host memory.
  • Type 2 Devices (GPUs/AI Accelerators): Use CXL.io + CXL.cache + CXL.mem. They have their own memory but can also cache host memory and offer it to the host.
  • Type 3 Devices (Memory Buffers): Use CXL.io + CXL.mem. Example: Memory expanders or persistent memory devices that provide host-accessible memory but do no compute.
HARDWARE INTERCONNECT

How CXL Works: The Technical Mechanism

Compute Express Link (CXL) is a high-speed CPU-to-device interconnect that maintains memory coherency between the host processor and accelerators or memory buffers.

CXL operates over the physical layer of PCI Express (PCIe) but adds critical protocol layers for coherent memory access. The CXL.io protocol provides foundational PCIe-like enumeration and I/O. CXL.cache allows a device like a GPU to cache host memory, while CXL.mem enables the CPU to access a device's attached memory as if it were its own. This three-protocol stack is managed by the CPU's integrated CXL controller, which handles coherency and address translation.

The mechanism hinges on a coherency protocol that ensures all participants see a consistent view of memory. When a device accesses a memory address, the CXL controller checks and updates the system's cache coherency domain. This enables memory pooling and composability, allowing CPUs to dynamically share accelerator-attached memory. The link uses flit-based packetization and advanced link layer retry for reliable, low-latency data transfer, making it ideal for heterogeneous computing with AI accelerators and disaggregated memory.

PROTOCOL COMPARISON

CXL vs. Traditional Interconnects

A technical comparison of Compute Express Link (CXL) against legacy CPU-to-device interconnects, highlighting key architectural differences relevant to hardware-aware model optimization and NPU acceleration.

Feature / MetricCompute Express Link (CXL)PCI Express (PCIe)HyperTransport (HT) / Infinity Fabric

Primary Design Goal

Cache-coherent, memory-semantic interconnect for accelerators & memory

High-bandwidth, packet-switched I/O expansion

Low-latency, coherent interconnect for multi-socket CPUs

Memory Coherency Protocol

Native hardware-enforced coherency (CXL.cache, CXL.mem)

No native coherency; requires software-managed buffers

Native coherency, but primarily CPU-to-CPU

Latency (Typical)

< 100 ns for cache-coherent accesses

500-1000 ns (software stack overhead)

50-100 ns (CPU-to-CPU)

Bandwidth per Lane (Gen5)

32 GT/s (same physical layer as PCIe)

32 GT/s

Varies by generation; ~32 GT/s for modern IF

Addressing Semantics

Memory-semantic (load/store), I/O-semantic

I/O-semantic (read/write) only

Memory-semantic for coherent traffic

Use Case for NPUs/Accelerators

Direct, coherent access to CPU memory; shared virtual memory

DMA via driver; pinned host memory

Not typically used for accelerator attachment

Power Management

Fine-grained, link-level power states (CXL.io based on PCIe)

Link-level power states (ASPM, L1)

Power management for CPU complexes

Standardization Body

CXL Consortium (Intel, AMD, ARM, Google, Meta, etc.)

PCI-SIG

AMD (Infinity Fabric); de facto for HT

HARDWARE INTERCONNECT

CXL in AI & Machine Learning

Compute Express Link (CXL) is an open, cache-coherent interconnect standard that provides high-bandwidth, low-latency connectivity between the CPU and devices like accelerators and memory expanders, fundamentally reshaping heterogeneous compute architectures.

01

Cache Coherent Interconnect

CXL's defining feature is its maintenance of memory coherency between the host CPU and connected devices (e.g., GPUs, FPGAs, Smart NICs). This allows accelerators to share a unified memory space with the CPU, eliminating the need for explicit, software-managed data copies. Key protocols include:

  • CXL.io: Provides foundational PCIe-like I/O semantics.
  • CXL.cache: Enables devices to cache host memory.
  • CXL.mem: Allows the host CPU to access device-attached memory. This coherency is critical for AI workloads where data must move seamlessly between CPU control logic and accelerator compute units.
02

Memory Pooling & Expansion

CXL enables memory disaggregation, allowing pooled memory resources to be dynamically allocated to multiple hosts or accelerators. This is a game-changer for memory-intensive AI models. A CXL-attached memory buffer or pooling device appears as byte-addressable memory to the host system.

  • Use Case: Training extremely large language models (LLMs) that exceed the physical DRAM capacity of a single server.
  • Benefit: Provides a cost-effective, high-bandwidth alternative to purchasing servers with maximum installed DRAM, improving overall cluster utilization and enabling larger batch sizes or longer context windows.
03

Accelerator Attach for Heterogeneous Compute

CXL is the preferred attach point for next-generation AI accelerators (beyond GPUs), such as Data Processing Units (DPUs), intelligence Processing Units (IPUs), and specialized neural network accelerators. It provides a unified, coherent interface that simplifies programming.

  • Comparison to PCIe: While built on the physical PCIe layer, CXL adds the crucial cache coherency protocol, moving beyond a simple I/O bus to a true memory-semantic fabric.
  • Impact: Reduces software complexity, lowers latency for fine-grained workloads, and enables tighter coupling of CPUs with specialized AI chips for tasks like preprocessing, inference, or custom operators.
04

CXL in AI Infrastructure & Composable Disaggregation

CXL is a foundational technology for composable disaggregated infrastructure (CDI). In AI data centers, resources like GPU clusters, memory pools, and storage can be physically disaggregated and then logically composed into virtual servers on-demand via a CXL fabric.

  • Dynamic Resource Allocation: An AI training job can be provisioned with 8 GPUs and 2TB of pooled CXL memory from a shared resource pool.
  • Efficiency: Dramatically improves hardware utilization by breaking the rigid, fixed configuration of traditional servers, allowing infrastructure to elastically match the needs of varying AI workloads.
05

Technical Specifications & Evolution

CXL is managed by the CXL Consortium. Key versions include:

  • CXL 1.1/2.0: Established the core protocols (io, cache, mem).
  • CXL 3.0/3.1: Introduced fabric capabilities, memory pooling, multi-headed devices, and peer-to-peer communication between devices, enabling true disaggregation. It also doubled the per-lane data rate. The standard leverages the PCI Express physical and electrical interface, ensuring backward compatibility while adding the essential coherency and memory semantics on top.
06

Related Concepts & Ecosystem

CXL interacts with several key AI/hardware concepts:

  • NVLink (NVIDIA): A proprietary, ultra-high-bandwidth GPU-to-GPU interconnect. CXL is an open standard for CPU-to-device/device-to-device.
  • Unified Memory (e.g., CUDA UVA): A software abstraction for a unified address space. CXL provides the hardware-level coherence to make such abstractions more efficient and scalable.
  • Gen-Z, CCIX: Earlier cache-coherent interconnect proposals largely superseded by the industry convergence on CXL.
  • UCIe (Universal Chiplet Interconnect Express): A die-to-die interconnect standard. CXL or PCIe is often used as the protocol layer running over a UCIe physical layer for chiplet-based accelerators.
COMPUTE EXPRESS LINK (CXL)

Frequently Asked Questions

Compute Express Link (CXL) is a critical open standard for high-performance, coherent interconnects between CPUs and accelerators like NPUs and GPUs. These questions address its role in hardware-aware model optimization and neural processing unit acceleration.

Compute Express Link (CXL) is an open industry-standard interconnect that provides high-bandwidth, low-latency connectivity between a host processor (CPU) and devices like accelerators (GPUs, NPUs, FPGAs) or memory buffers, while maintaining memory coherency between them. It operates over the physical PCI Express (PCIe) interface but adds crucial protocol layers for coherent caching and simplified device semantics. CXL defines three primary protocols that can operate simultaneously: CXL.io (for initialization, device discovery, and legacy I/O), CXL.cache (which allows a device to cache host memory), and CXL.mem (which allows the host processor to access device-attached memory). This coherency is managed in hardware, eliminating the need for software-managed cache flushes and enabling accelerators to work on shared data structures with the CPU efficiently, which is fundamental for hardware-aware model optimization where data movement is a primary bottleneck.

Prasad Kumkar

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.