tensor core

```svg Tensor Core — Matrix Multiply in One Clock D = A × B + C — a 4×4 matrix multiply-accumulate every cycle, in reduced precision One Tensor Core Operation (FP16 example) A (4×4, FP16) 0.3 1.2 × B (4×4, FP16) + C (4×4, FP32) = D (4×4, FP32) = 64 FMA ops in 1 cycle (vs 1 FMA on CUDA core) input: reduced precision (FP16/BF16/FP8/INT8) — output: full precision (FP32) Why This Matters for AI Linear layer = matmul: Y = X · W + bias Attention = matmul: softmax(Q·Kᵀ/√d)·V ~99% of LLM FLOPs are matmuls → tensor cores do nearly all the work Tensor Core Generations 1st gen (V100): 4×4×4 FP16 → FP32 2nd gen (A100): + TF32, BF16, INT8, sparsity (2:4) 3rd gen (H100): + FP8 (E4M3/E5M2), 989 TF peak 4th gen (B200): + FP4, 2x throughput, 4.5 PF FP8 Precision Formats (lower bits = more TOPS) FP32 (32b): baseline | FP16/BF16 (16b): 2x | TF32 (19b): matmul only | FP8 (8b): 4x | INT8: 4x | FP4: 8x Training: BF16 (loss scale) or FP8 (with master weights in FP32). Inference: FP8 or INT8 (sometimes INT4/FP4). Tensor Core vs CUDA Core CUDA core: 1 FMA/cycle (scalar) general purpose good for: branchy code, reductions Tensor Core: 64 FMA/cycle (4×4 matrix) matmul only (fixed function) good for: GEMM, convolution, attention 64x throughput advantage for matmul H100: 528 Tensor Cores × 4 per SM × 132 SMs — running FP8 = ~2000 TFLOPS peak Real utilization (MFU): 30-50% on LLM training due to memory/communication bottlenecks Tensor Cores are why GPUs dominate AI — they turned a graphics chip into a matrix-math machine. One tensor core = one 4×4 matmul per clock. Stack hundreds of them = petaflops of dense linear algebra. ```nsor core is a small matrix-multiply-accumulate engine built into each GPU streaming multiprocessor: in one instruction it multiplies two low-precision matrix tiles and adds them into a higher-precision accumulator — the operation deep learning spends most of its time on.\n\n**One instruction does a whole matmul.** A normal GPU (CUDA) core does one scalar multiply-add per cycle. A tensor core instead consumes two small matrix tiles — on the order of 16 x 16 — and produces D = A x B + C in a few cycles, so a single warp-level MMA instruction retires hundreds of multiply-accumulates. That is why a GPU's tensor-core FLOPS dwarf its general-purpose FLOPS.\n\n**Mixed precision is the trick.** The multiplies run in a low-precision format (FP16, BF16, and on newer parts FP8 or FP4) while the running sum accumulates in FP32. Low precision makes the multipliers small and fast and cuts memory traffic; the wide accumulator keeps the sum from losing accuracy. You get the speed of low precision with much of the stability of high precision.\n\n| GPU generation | Added formats | Notable |\n|---|---|---|\n| Volta (2017) | FP16 mul / FP32 acc | first tensor cores |\n| Turing (2018) | INT8, INT4 | inference |\n| Ampere (A100) | TF32, BF16 | structured sparsity |\n| Hopper (H100) | FP8 | Transformer Engine |\n| Blackwell (B200) | FP4 | 2nd-gen Transformer Engine |\n\n```svg\n\n \n Tensor core — one instruction computes a whole tile: D = A x B + C\n\n \n A (FP16/BF16/FP8)\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n B (low precision)\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n D = A x B + C (FP32 accumulate)\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n rows of A\n cols of B\n\n \n \n One MMA, hundreds of MACs.\n A CUDA core does one multiply-add\n per cycle; a tensor core eats two\n tiles and returns D = A x B + C.\n\n Mixed precision.\n Multiply in FP16 / BF16 / FP8 (small,\n fast); accumulate in FP32 (accurate).\n Speed of low precision, stability of high.\n\n Replicated per SM.\n Every streaming multiprocessor has\n several, invoked as a warp instruction —\n which is why tensor FLOPS dwarf\n the GPU's general-purpose FLOPS.\n \n\n```\n\n**Tensor core vs systolic array.** Both win the same way — massive operand reuse inside a matrix engine — but the shapes differ. A TPU is one large systolic grid fed by the compiler; a tensor core is a compact MMA unit replicated across every SM and invoked as a GPU instruction over register-file tiles. Nvidia's are the best known, but AMD's CDNA matrix cores and Intel's XMX engines do the same job.\n\nRead the tensor core through a quant lens rather than a marketing lens: a headline PFLOPS number only means something paired with its format (FP16 vs FP8 vs FP4) and whether it counts the 2:1 structured-sparsity mode. What decides real training and inference speed is achievable MACs per byte of HBM traffic at a tolerable precision — the tensor core raises the compute ceiling, but arithmetic intensity and accumulator width decide how much of it you actually reach.

Go deeper with CFSGPT

Get AI-powered deep-dives, save terms, and run advanced simulations — free account.

Create Free Account