Skip to content

CONCEPT Cited by 6 sources

Kernel fusion

Definition

Kernel fusion (also operator fusion) combines a sequence of GPU (or CPU SIMD) operations that would run as separate kernels into one kernel. Each separate kernel writes its output to device memory (HBM/DRAM) and the next kernel reads it back. A fused kernel keeps the intermediate values in registers and on-chip shared memory, so they are never materialized to HBM. It also removes per-kernel launch overhead.

Fusion matters most when a workload is concepts/memory-bandwidth-bound: the arithmetic is cheap but each intermediate tensor costs a round trip through memory. Fusion raises arithmetic intensity, which moves the kernel to the right on the roofline.

Why it matters at scale

Small per-item intermediates multiply by throughput. Meta Andromeda: at billions of ads/sec, "even a small intermediate tensor per ad multiplies into terabytes per second of high bandwidth memory (HBM) traffic". The memory traffic, not the math, was the dominant bottleneck in the multi-kernel pipeline (Source: sources/2026-10-28-meta-andromeda-powering-the-next-generation-of-ads-retrieval).

Scope of fusion

  • Model-op fusion — fuse ops inside the model graph (e.g. operators that share inputs). Often done by compilers such as torch.compile.
  • Model + system fusion — also fuse non-model work (embedding gather, filtering, scoring, top-K) into the same kernel. Andromeda 2024 fused only model ops; Andromeda 2026 fuses the whole per user-ad computation. A ~300x FLOP cut in the model made this feasible (Source: sources/2026-10-28-meta-andromeda-powering-the-next-generation-of-ads-retrieval).
  • Fusion with quantized data — dequantize-in-register inside the fused kernel (SilverTorch Int8 ANN; Dropbox low-bit inference).

Trade-offs

  • Fused kernels are custom code: harder to write, test and port across hardware. This cost is one motivation for agentic kernel generation (systems/kernelevolve).
  • Register / shared-memory pressure limits how much can be fused before occupancy drops.
  • Fusing system logic into the model kernel couples model and serving code.

Seen in

Last updated · 854 distilled / 2,448 read