Short answer
To understand how tensor cores work, start with what they are: a tensor core is a hardware unit that computes a small matrix multiply-accumulate, D = A × B + C, in one operation, instead of thousands of individual multiplications. Groups of GPU threads cooperatively load tiles of matrices A and B, the tensor core multiplies them in low precision (FP16, BF16, FP8, FP4) and adds the result to a higher-precision accumulator. Each generation has made the tiles larger and the programming model more asynchronous: from warp-level MMA on Volta and Ampere, to warpgroup-level wgmma with the Tensor Memory Accelerator on Hopper, to tcgen05 instructions with dedicated Tensor Memory on data center Blackwell. That evolution is why tensor cores deliver most of a modern GPU's AI performance.
The one operation that runs AI
Nearly every layer in a neural network is a matrix multiplication: inputs times weights. A transformer's attention and feed-forward layers, a convolution in an image model, an embedding projection: all reduce to multiplying large matrices. If you can multiply matrices faster, you make AI faster. For the basics, start with What is a tensor core?.
A regular GPU core (a CUDA core) performs one fused multiply-add on two numbers per clock. A tensor core performs an entire small matrix multiply-accumulate per clock or a few clocks, sharing data between many multipliers so that each value loaded from memory is reused many times.
The math: matrix multiply-accumulate
D = A × B + C
A: M × K matrix (low precision, e.g. FP16, BF16, FP8, FP4)
B: K × N matrix (low precision)
C, D: M × N matrix (accumulator, usually FP32 or FP16)Every output element of D is a dot product of a row of A and a column of B, plus the matching element of C. For a 16 × 8 × 16 tile, that is 16 × 8 × 16 = 2,048 multiply-adds done as one instruction.
Two design choices make this efficient:
1. Data reuse: each element of A is used N times and each element of B is used M times. Larger tiles mean more arithmetic per byte loaded, which matters because memory is slower than math. See GPU memory bandwidth and the roofline model. 2. Mixed precision: inputs in small formats (fewer bits, more operations per watt), accumulation in FP32 (to avoid rounding errors piling up over long dot products). See FP16 vs BF16 vs FP8 vs FP4 and mixed precision training.
How a GPU feeds its tensor cores
A GPU is made of streaming multiprocessors (SMs). Each SM contains several tensor cores alongside CUDA cores, registers and shared memory. The data path for a large matrix multiply looks like this:
1. Global memory (HBM or GDDR): the full matrices live here. 2. Shared memory / L1: each thread block copies tiles of A and B into fast on-chip memory. 3. Registers or Tensor Memory: smaller fragments are staged for the tensor core. 4. Tensor core: performs the MMA on the fragments, accumulating results. 5. Write back: finished tiles of D are written to global memory.
High-performance kernels pipeline these steps so data for the next tile is loading while the current tile is being multiplied. Explore the hardware basics in how a GPU works.
The generational evolution
| Generation | Architecture (example GPU) | Key tensor core features | Programming model |
|---|---|---|---|
| 1st (2017) | Volta (V100) | FP16 inputs, FP32 accumulate, 4×4×4 MMA per tensor core per clock | Warp-level WMMA/MMA |
| 2nd (2018) | Turing (T4, RTX 20) | Adds INT8 and INT4 for inference | Warp-level MMA |
| 3rd (2020) | Ampere (A100, RTX 30) | TF32, BF16, FP64 tensor cores, 2:4 structured sparsity, async copy to shared memory | Warp-level mma.sync with cp.async |
| 4th (2022) | Hopper (H100, H200) | FP8, Transformer Engine, Tensor Memory Accelerator (TMA), thread block clusters | Warpgroup-level asynchronous wgmma |
| 4th (consumer, 2022) | Ada Lovelace (RTX 40) | FP8 support on consumer cards | Warp-level MMA |
| 5th (2024) | Blackwell (B200, GB200) | FP4 and FP6, micro-scaled formats like NVFP4, Tensor Memory (TMEM), 2-SM cooperative MMA | tcgen05 instructions issued by a single thread |
| 5th (consumer, 2025) | Blackwell (RTX 50) | FP4 support on consumer GPUs | Warp-level MMA |
For the full lineage, see tensor core generations and Hopper vs Blackwell.
Volta to Ampere: warp-level MMA
On Volta, Turing and Ampere, a warp of 32 threads executes a matrix instruction together. Each thread holds a few elements of the A, B and C fragments in its registers, and the hardware assembles them into the full tile. In CUDA C++ this is exposed through the wmma API or the lower-level PTX mma.sync instruction, for example with shapes like m16n8k16.
Ampere added asynchronous copies (cp.async), letting threads start copying the next tile from global to shared memory without waiting, and 2:4 structured sparsity, where tensor cores skip zeroed weights for up to twice the throughput. See structured sparsity explained.
Limitation: the warp had to wait for each mma.sync to finish, and registers had to hold both inputs and accumulators, limiting tile sizes.
Hopper: warpgroups, wgmma and TMA
Hopper's H100 introduced three big changes:
- wgmma (warpgroup MMA): four warps (128 threads) issue one large, asynchronous matrix instruction. Operands can come directly from shared memory, so threads don't have to load everything into registers first. Threads can keep doing other work while the tensor cores compute.
- Tensor Memory Accelerator (TMA): a dedicated engine that copies multi-dimensional tiles between global and shared memory with a single instruction, freeing threads from address calculations.
- Thread block clusters and distributed shared memory: groups of SMs can share data in each other's shared memory.
Combined with FP8 support and the Transformer Engine, which manages scaling factors for FP8, these features let H100 kernels keep tensor cores much busier than earlier GPUs. Kernels like FlashAttention version 3 were written specifically to exploit wgmma and TMA.
Blackwell: tcgen05 and Tensor Memory
Data center Blackwell (B200, GB200) moves further toward a dedicated tensor engine:
- tcgen05 instructions: a single thread can launch a large MMA on behalf of the whole block, rather than requiring a warpgroup to participate.
- Tensor Memory (TMEM): a dedicated on-chip memory per SM for accumulators, so large results no longer consume general-purpose registers. Data is moved between TMEM and registers explicitly.
- 2-CTA MMA: two SMs can cooperate on one larger matrix multiply, increasing data reuse.
- FP4 and FP6 with block scaling: formats like NVFP4 attach a shared scale factor to small blocks of values, keeping accuracy while doubling throughput over FP8.
The result is much larger effective tiles and higher utilisation. Consumer Blackwell (RTX 50 series) adds FP4 support but keeps a warp-level MMA programming model rather than the data center tcgen05 path.
Why tensor cores are so much faster
| CUDA cores (FP32 FMA) | Tensor cores | |
|---|---|---|
| Work per instruction | One multiply-add per thread | Hundreds to thousands of multiply-adds per instruction |
| Data reuse | Little; each operand used once | High; tiles reuse each value many times |
| Precision | FP32 typical | FP16, BF16, TF32, FP8, FP6, FP4, INT8 |
| Share of AI FLOPS on modern GPUs | Small | The large majority |
On an H100 SXM, dense BF16 tensor throughput is about 989 TFLOPS, while standard FP32 CUDA core throughput is roughly 67 TFLOPS. That gap of more than 10× is why AI frameworks route matrix work to tensor cores whenever possible. See tensor cores vs CUDA cores.
When tensor cores sit idle
Peak TFLOPS are rarely achieved. Common reasons:
- Memory-bound workloads: single-user LLM decoding reads every weight for each token, so the GPU waits on memory, not math. See prefill vs decode.
- Awkward shapes: matrix dimensions that are not multiples of 8, 16 or 64 waste parts of each tile.
- Non-matrix operations: softmax, normalisation and activations run on CUDA cores and can become bottlenecks.
- Poor pipelining: if data movement is not overlapped with compute, tensor cores wait.
Real training typically reaches 35–50% of peak; see MFU explained.
How developers use tensor cores
| Level | Tools | Who uses it |
|---|---|---|
| Frameworks | PyTorch, JAX, TensorFlow with automatic mixed precision | Most AI developers |
| Libraries | cuBLAS, cuDNN, TensorRT, Transformer Engine | Framework and inference engine authors |
| Kernel DSLs | OpenAI Triton, CUTLASS/CuTe, ThunderKittens | Performance engineers |
| Raw instructions | PTX mma, wgmma, tcgen05 | Library and kernel experts |
A quick check that tensor cores are used in PyTorch: enable BF16 autocast and keep matrix dimensions multiples of 8 or 16. For a hands-on start with GPU programming, see write your first CUDA kernel.
import torch
a = torch.randn(8192, 8192, device="cuda", dtype=torch.bfloat16)
b = torch.randn(8192, 8192, device="cuda", dtype=torch.bfloat16)
c = a @ b # dispatched to tensor cores via cuBLASFrequently asked questions
How many tensor cores does a GPU have?
It varies: an H100 SXM has 528 tensor cores (4 per SM across 132 SMs), and an RTX 5090 has 680. Raw counts are not comparable across generations because each newer tensor core does much more work per clock.
Do tensor cores only work for AI?
They accelerate any workload built on dense matrix multiplication, including some scientific computing (with FP64 tensor cores on data center GPUs), graphics features like DLSS, and signal processing.
Are AMD and Intel GPUs equipped with tensor cores?
They have equivalent units under different names: AMD Matrix Cores and WMMA units, Intel XMX engines. See tensor cores vs AMD Matrix Cores vs Intel XMX.
Why are new tensor cores focused on smaller number formats?
Fewer bits per number means more operations per clock, less memory traffic and less energy per operation. With careful scaling, FP8 and FP4 keep model quality close to higher precision for many workloads.
Sources and further reading
- NVIDIA, CUDA C++ Programming Guide: Warp Matrix Functions
- NVIDIA, Parallel Thread Execution (PTX) ISA
- NVIDIA, NVIDIA Hopper Architecture In-Depth
- NVIDIA, Blackwell architecture
- NVIDIA, CUTLASS on GitHub
- Shah et al., FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precision (2024)




Leave a Reply