⚡Inductor Recovers 98% of Megakernel Speed Without Writing a Single Kernel
Your hand-tuned CUDA kernels might be unnecessary now
TL;DR
A new approach recovers 98% of megakernel performance for Llama 1B on H100 using CUDA Graphs and PDL on default Torch Inductor kernels. No custom kernel writing required. If you maintain inference kernels by hand, this changes the cost calculation.
Megakernels set a speed record last year, but they took months to ship for a single model, one batch size, and one customer. This year's follow-up gets most of that performance back without writing a single kernel. The trick is layering CUDA Graphs and PDL on top of the default kernels Torch Inductor already generates. If you're running inference across varied models and batch sizes, this matters. Traffic shifts constantly, new architectures land weekly, and hand-tuned kernels can't keep up. A framework-level fix that adapts to workloads beats maintaining a pile of bespoke kernels for each hardware generation. The numbers: the new approach hits up to 1.7x the throughput of old megakernels, reaching over 1100 TPS for Llama 1B on H100. Plain Inductor alone sits at 669 TPS on the same workload. The catch is that Inductor's heuristics are local and greedy, so tuning flags still matter a lot. Worth watching how well this generalizes beyond one model.

Key Points
The new approach reaches over 1100 TPS for Llama 1B on H100, up to 1.7x faster than last year's megakernels, which took months to productionize for a single configuration.
Keep reading — it's free
Enter your email to keep reading — plus the best of AI & tech, daily. Free, forever.
Already a member? Sign in
Comments
Be the first to comment