FlyDSL MonoKernels Cut vLLM Decode Latency on AMD GPUs
Interactive agents live or die on decode latency: a coding agent must finish each action before it can call the next tool, so per-token time sits on the critical path. At low concurrency, a decode step still runs a long chain of small GPU kernels, and each launch, startup and drain costs time while the GPU sits mostly idle. HIP graphs cut CPU launch overhead but not these GPU-side costs, which is the gap the vLLM and AMD teams set out to close.
Interactive agents live or die on decode latency: a coding agent must finish each action before it can call the next tool, so per-token time sits on the critical path. At low concurrency, a decode step still runs a long chain of small GPU kernels, and each launch, startup and drain costs time while the GPU sits mostly idle. HIP graphs cut CPU launch overhead but not these GPU-side costs, which is the gap the vLLM and AMD teams set out to close.
The authors' idea is a MonoKernel: several dependent operator stages run inside one persistent kernel launch, with a fixed grid of thread blocks that move on to the next stage as soon as its inputs are ready. "Mono" means one kernel boundary, not the whole model in one kernel — a model's decode path can use several, and boundaries are chosen per model to fit its data dependencies and GPU limits. DeepSeek-V4.1-Flash splits a decoder layer into K1 (attention front plus KV-cache update) and K2 (attention back, feed-forward, and both tensor-parallel all-reduces inside the kernel); MiniMax-M3 fuses only the FFN half. Three mechanisms do the work: thread blocks are reused across stages, later weights are prefetched while earlier math runs, and intermediate results pass through tagged mailboxes so consumers start when their data is ready. FlyDSL, AMD's Python DSL and compiler for ROCm kernels, gives the author control over layouts, data movement and synchronization down to individual instructions; it compiles the schedule as written rather than fusing automatically. In vLLM the path is opt-in via --monokernel, lives in the model's own directory, and falls back to stock layers for prefill, mixed batches and steps too wide for the kernels. Reported gains are 1.20×–2.26× in concurrency-1 interactivity across five merged models; one MI325X port cut a decoder layer from 32 kernels in 320 µs to 2 kernels in 115 µs. Accuracy checks with mono on and off stayed within noise, though TP8 accuracy for DeepSeek-V4.1-Flash is still being evaluated. Limits: gains shrink at higher concurrency, step width is capped (48 rows for DeepSeek on MI355X, 16 for MiniMax-M3 and Kimi-K3), and MI300X/MI325X keep a second weight copy, 170 GiB versus 99 GiB per rank at TP4.
For low-concurrency, latency-sensitive agent serving on AMD Instinct GPUs, the authors argue that fusing decode stages into a few persistent, hand-scheduled kernels is now a practical, opt-in win in vLLM — but expect the benefit to fade as concurrency rises and to require per-model kernel work.