
7/10/2026
What this post added
This post introduces kernel fusion in NVIDIA CUDA as a technique to optimize memory traffic and launch overhead. It demonstrates manual kernel fusion by rewriting two separate kernels (abs and sum) into a single `sum_abs_kernel`, eliminating intermediate buffers and achieving a 3x speedup. It also shows how `torch.compile` with Torch Inductor implicitly fuses operations like `abs().sum()` by generating kernels where the absolute value is computed in registers before accumulation, avoiding separate kernels and intermediate buffers.