Speak at Bengaluru Systems meet-up
Call for talks & demos for monthly meet-ups
Mar 2026
23 Mon
24 Tue
25 Wed
26 Thu
27 Fri
28 Sat 11:00 AM – 01:00 PM IST
29 Sun
Ayush Satyam
@ayushsatyam146
Submitted Oct 28, 2026
LLM decoding on a GPU looks like one step, but it’s really hundreds of tiny kernel launches. The GPU spends much of its time between kernels rather than doing math.
MegaBake is an open-source (MIT) compiler that hooks into torch.compile. It takes a stock Hugging Face model and fuses its entire forward pass into one persistent CUDA kernel: embedding, every layer, the KV-cache updates, and the LM head.
This talk is about how that works, where it wins, and where the opportunities are.
Decoding is bound by memory bandwidth and launch overhead. Each operator launches as its own kernel, reads its inputs from global memory and writes its outputs back. Between kernels, the GPU drains and refills. CUDA graphs hide the launch cost but not the bubbles between kernels. Hand-written megakernels close that gap, but they’re written by hand for one model at a time.
Compile SmolLM-135M live, run generation through the megakernel, compare its tokens/s with graphed Inductor, and walk through the generated kernel source.
Hosted by
Supported by
Venue host
{{ gettext('Login to leave a comment') }}
{{ gettext('Post a comment…') }}{{ errorMsg }}
{{ gettext('No comments posted yet') }}