# Kernel optimization

<!-- https://learn-kernels.com/chapters/kernel-optimization -->

Getting a kernel correct is the easy part. This chapter follows one matrix multiply from 1.3% of a GPU’s advertised throughput to 93.7% of it through nothing but memory-hierarchy discipline, then turns to the two techniques that multiply that hard-won bandwidth further: tensor cores that trade numeric precision for raw throughput, and the fused attention kernels that turned a quadratic memory-traffic problem into a solved one.

## 4 sections

1.  [2.1Foundational kernel exercises](https://learn-kernels.com/chapters/kernel-optimization/foundational-kernel-exercises)
2.  [2.2Matrix multiplication](https://learn-kernels.com/chapters/kernel-optimization/matrix-multiplication)
3.  [2.3Tensor cores and low precision](https://learn-kernels.com/chapters/kernel-optimization/tensor-cores-and-low-precision)
4.  [2.4Attention](https://learn-kernels.com/chapters/kernel-optimization/attention)
