Evidence inspector
verified

v3.5.0 · 6a5f4e3d2c1b · verified 2026-07-21

verifiedinferredconceptual
Global memory tile loading & Tensor Core MMA execution

CUTLASS tiles matrices into Shared Memory using cp.async, loading Warp sub-tiles into Tensor Cores via mma.sync PTX assembly.

cp.async Global toIssue mma.sync InsGlobal VRAMMatrix TilesAsync CopyLoader (cp.async)Tensor CoreMMA Engine

Diagram evidence

verified

Global memory tile loading & Tensor Core MMA execution

CUTLASS tiles matrices into Shared Memory using cp.async, loading Warp sub-tiles into Tensor Cores via mma.sync PTX assembly.

Version boundary

Release
v3.5.0
Commit
6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e1d0c9b8a7f
Review after
2026-10-19
System breakdown

Inside NVIDIA CUTLASS & Tensor Core GEMM Engine

An evidence-audited, 20-diagram interactive system breakdown tracing NVIDIA CUTLASS C++ template architecture, 4-level tile hierarchy (Global to Shared to Warp to Thread registers), asynchronous global memory copy (cp.async) pipelines, Tensor Core MMA (Matrix Multiply-Accumulate) PTX assembly execution, mainloop epilogue activation fusion, and dynamic grid swizzling for multi-GPU GEMM workloads.

28 min read Verified 2026-07-21 1 primary sources

Executive Summary

NVIDIA CUTLASS (CUDA Templates for Linear Algebra Subroutines) powers high-performance deep learning operators across PyTorch, TensorRT, and vLLM. This 20-diagram interactive system breakdown deconstructs CUTLASS's C++ template architecture across 5 specialized chapters:

1. CUTLASS 4-Level Tile Hierarchy

CUTLASS achieves near-theoretical peak GPU TFLOPS by partitioning large matrix multiplication tasks across a 4-level tile hierarchy:

  1. Global Memory Tile: Partitioned across GPU threadblocks in the grid.
  2. Shared Memory Tile: Loaded into SM shared memory for reuse across warps.
  3. Warp Tile: Assigned to a 32-thread warp executing parallel matrix instructions.
  4. Thread Register Tile: Distributed across warp registers for Tensor Core computation.

2. Asynchronous Memory Pipelines & cp.async Instructions

Starting with NVIDIA Ampere (SM80) hardware, global-to-shared memory transfers no longer need to pass through intermediate CUDA thread registers. CUTLASS leverages hardware cp.async PTX instructions, transferring global memory tiles directly into shared memory asynchronously while warp registers remain free to compute previous matrix tiles.

3. Tensor Core MMA (Matrix Multiply-Accumulate) PTX Assembly

To execute high-throughput FP16/INT8 matrix multiplication, CUTLASS warp tile iterators issue hardware mma.sync PTX assembly instructions directly to NVIDIA Tensor Cores. Tensor Cores execute $8 \times 8 \times 4$ or $16 \times 8 \times 16$ matrix multiply-accumulate operations in a single clock cycle.

4. Epilogue Fusion & Elementwise Activation Acceleration

In standard deep learning runtimes, linear GEMM operations ($Y = W X + b$) are followed by separate CUDA kernel launches for bias addition and non-linear activation functions (ReLU, GELU, SwiGLU). CUTLASS eliminates global memory round-trips by fusing epilogue bias addition and activation functions directly inside thread registers before writing output tiles back to VRAM.

5. Dynamic Grid Swizzling & L2 Cache Locality

GPU L2 cache bandwidth is a critical bottleneck during large GEMM execution. CUTLASS threadblock swizzlers dynamically re-order threadblock execution IDs in the CUDA grid, ensuring adjacent threadblocks access overlapping matrix tile columns, maximizing L2 cache hit ratios.