vLLM on MI250X: one flag makes head-256 decode 2-3x faster
On AMD MI250X with vLLM 0.30, one attention flag made head-256 decode attention 2-3x faster, and our own TileLang kernel reads 2.8-13x the default backend.
Publisher
November 8, 2026
4 min read
In short: when an AI model writes an answer, every new word has to read back through everything written so far. vLLM, popular software for running AI models, does that step slowly by default on these AMD GPUs. One setting fixes most of it: on the shapes we tested it made that step 2–3 times faster. Our own code for the same step runs level with vLLM's best option. If you run vLLM on AMD MI250X GPUs, check this setting first.
If you serve a model with head size 256 on AMD's Instinct MI250X with vLLM 0.30, one flag matters more than anything else: --attention-backend TRITON_ATTN. On our shapes it made decode attention 2.09–3.33× faster than the default backend. Our own TileLang decode kernel reads 2.79–13.47× the default and runs level with vLLM's best Triton kernel.
Setup: MI250X on the LUMI supercomputer, vLLM 0.30 in its ROCm 7.2.3 container with real weights, the attention shape of a Qwen 27B model (6 query heads per key/value head, head size 256), November 2026. Kernel races ran on one GCD (half an MI250X, about 1.6 TB/s of memory bandwidth); the server test ran at tensor parallel 2.
What vLLM really allocates on MI250X
We started vLLM with the real weights and read the KV cache it allocated:
- 784 tokens per page, BF16;
- the default backend, ROCM_ATTN, runs a generic paged kernel, because vLLM's custom ROCm kernel refuses head size 256;
- the Triton backend uses a different cache layout and a faster kernel. That is where the 2.09–3.33× comes from.
Benchmark on this real frame, not on a layout read from the source code; the numbers only mean something there.
| Speed over default | |
|---|---|
| vLLM Triton flag | 2.09–3.33× |
| Our TileLang kernel | 2.79–13.47× |
vLLM 0.30, ROCm 7.2.3, one GCD of AMD MI250X, real cache layout (784-token pages, BF16). Ranges span shapes and runs.
Our decode kernel
Decode reads the whole KV cache once per step with about two floating-point operations per byte, so the honest metric is the share of memory bandwidth used. Our kernel's cell medians reach 50.7–52.1% of HBM bandwidth with 4 key/value heads per GCD (computed from timings; single draws down to 47.5%). What got it there:
- Read each K/V tile once per group of query heads through the matrix cores. A plain kernel without them was 10–50× slower.
- Split the cache (flash-decoding) so many workgroups take a slice, then combine. Otherwise one sequence keeps a handful of the 110 compute units busy.
- Small tiles for occupancy, padded rows for wavefronts. Padding 6 query heads to 32 rows lets two wavefronts share each tile.
- Branchless BF16.
hip_bfloat16's cast adds an exec-mask branch per element; a bit-level conversion gave back a median 2.4%.
Against the kernel a server actually runs
A server passes arguments that make vLLM's Triton backend run a 3D kernel with 16 segments for batches up to 32–64 sequences, not the 2D form a plain call reaches. Benchmark the 3D form. Against it our kernel reads about 0.87–1.37× with 4 key/value heads per GCD and 0.86–1.30× with 2 (one seed, three length patterns), and 1.06–1.27× at 64 sequences, where vLLM stays on the 2D path. In a running server at tensor parallel 2, our plugin read 0.966–1.009× of stock Triton: level. Attention is only part of a 30–51 ms decode step, so even a much faster kernel would gain little there.
Limits
- Our best ratios use a kernel fitted to one length set, which a server cannot use; unfitted, 5 of the 8 served cells read below 1, lowest 0.856.
- With 2 key/value heads per GCD and short, uneven lengths, bandwidth falls to 39–41%, under our 50% target.
- About 1 ms per step of plugin overhead against stock Triton is not yet explained.
- We did not race AMD's Composable Kernel paged decode: it needs page sizes divisible by 128, and 784 is not.
We acknowledge the EuroHPC Joint Undertaking for awarding this project access to the EuroHPC supercomputer LUMI, hosted by CSC (Finland) and the LUMI consortium, through a EuroHPC Development Access call (EHPC-DEV-2026D11-419).