Skip to content
inference.academy

glossary/compute/kernel-fusion

Kernel fusion

Combining several operations into one kernel so intermediate results stay in registers or on-chip memory instead of making a round trip to HBM. A layer norm followed by a projection, or an attention score followed by its softmax, each written separately costs a full write and read of the activations. Fused, the bytes never leave the chip. Most of the speedups attributed to custom kernels are fusions.


one write, one read

Saved per fused pair, on a machine where moving a byte costs more than operating on it.


Related