Back to blog
ai-engineering

6 findings from GPU kernels on LUMI, with live figures

Six findings from running our GPU kernels on AMD MI250X at LUMI, each with a figure you can move: first token 11% sooner and 8-10% less energy per request.

HA

November 11, 2026

8 min read

6 findings from GPU kernels on LUMI, with live figures

In November 2026 we wrote and tested GPU kernels for large language models on LUMI-G, the AMD Instinct MI250X part of the LUMI supercomputer. Inside a served 27-billion-parameter model they bring the first token of a long prompt about 11% sooner and use 8 to 10% less energy on the card.

This post gives six findings from that work: four about measuring GPU kernels on this hardware, and two results. Every figure can be moved. Five of them show our measurements and one is a simulation, and each says which underneath.

1. A 16-bit reference drifts on long prompts

To check a kernel's accuracy you compare its output with a reference. The common shortcut is a reference computed in the same 16-bit precision as the kernel. On long prompts that reference is not accurate enough: against a 64-bit computation it is 0.33% off at 1k tokens and 4.3% off at 4k.

An interactive figure. Measured against a 16-bit reference the attention kernel reads 0.07%, 0.3% and 4.4% error at 256, 1k and 4k tokens. Measured against a 64-bit reference it reads 0.028% at 1k and 4k. The 16-bit reference itself drifts 0.33% and 4.3%.

Kernel error against a 16-bit and a 64-bit reference

Against a 64-bit reference our attention kernel and PyTorch's own attention both read 0.028% at 1k and 4k tokens. We compute every reference in 64-bit and report the vendor library's error against it next to ours.

2. vLLM has two decode kernels, and we match the fast one

vLLM ships more than one attention kernel for decode. Which one runs depends on the arguments the server passes, and for this model a server uses the one called the 3D kernel.

An interactive figure. Our decode kernel reads 5.37 to 7.44 times the speed of vLLM's 2D Triton kernel and 0.952 to 1.080 times the speed of the 3D kernel a vLLM server dispatches for this model.

Our decode kernel against vLLM's two decode kernels

Our TileLang decode kernel is at parity with the kernel a server really runs, 0.952 to 1.080 times its speed, and 5.37 to 7.44 times the speed of the other one. To know which kernel to compare with, we start the real server with real weights and record the kernel it calls and its arguments.

3. Identical code differs by up to 2.4%

How large must a gain be before it is real? We measured that directly by racing the same code against itself. Within one job, identical code differed by up to 1.75% in decode races, 2.32% in prefill and 2.4% in matrix multiply. Across two jobs, one copy read faster than its twin both times in 40 of 200 cells.

An interactive simulation. Two copies of the same code are raced in two jobs over 200 cells. With no real difference, noise alone makes one copy read faster in both jobs in about a quarter of the cells. In our measured races the figure was 40 of 200.

Simulation: racing a kernel against itself

So a kernel variant that reads 1 to 2% faster in two separate jobs may be no faster at all. Every race we run now carries an identical-code control, and a gain counts only if it is larger than the control's spread in that job.

4. The MI250X 16-bit matrix instruction returns zero for very small numbers

This one is about the hardware. The 16-bit matrix instruction on this GPU treats very small numbers, the ones called subnormal, as zero. We measured it with a one-line test: a matrix holding one small value, multiplied by a matrix of ones.

An interactive figure. A 16-bit value multiplied by one comes back correct at 6.2e-5 and above, and comes back as exactly zero at 3e-5, 1e-5 and 1e-6, in the vendor library and in our kernel.

One small number through the GPU's 16-bit matrix instruction

AMD's own 16-bit matrix multiply behaves the same way, so it is a property of the chip and not of one library. It matters for attention on long prompts, where 0.2 to 0.6% of a row's weight falls below that line. Random test data puts none there, so we found it with inputs captured from a running server. Our kernel scales the weights up before the 16-bit step, and its accuracy on those captured inputs is level with vLLM's.

5. A fused MoE kernel leads at decode sizes

Mixture-of-Experts models send each token to a few small expert networks. We wrote one fused kernel for that step and raced it against vLLM's, both with vLLM's default settings and with vLLM tuned for the MI250X by its own tuning tool. Tuning alone cuts vLLM's time by up to 31% at large batches, which is a finding in itself: the defaults are not tuned for this GPU.

An interactive figure. Against vLLM's default configuration our fused mixture-of-experts kernel leads in 32 of 33 cells and ties in one. Against vLLM tuned for the same GPU it leads in 18, ties in 7 and loses in 8: it keeps its lead at 1 to 8 tokens and takes 5 to 18% longer at 1,024 and 2,048 tokens and at 2,700 tokens on uniform routing.

Our fused MoE kernel against vLLM, default and tuned

At 1 to 8 tokens, the size of a decode step, our kernel leads tuned vLLM on every routing: 0.84 to 0.90 of its time at one token and 0.47 to 0.97 at eight. At 1,024 and 2,048 tokens, which is prefill, tuned vLLM is ahead and our kernel takes 5 to 15% longer. Over all 33 cells we lead in 18, tie in 7 and trail in 8 against tuned vLLM, and lead in 32 of 33 against its defaults. Two details help when reading the figure. At 2 to 4 tokens on very skewed routing, vLLM's default is faster than its tuned configuration, so the default view is the fair one there. And a second vLLM configuration tuned on skewed routing is 4 to 6% ahead of us at 2,700 tokens.

Our kernel has not yet been tuned again with the tile sizes vLLM's tuner found.

6. In a served model, the first token arrives 11% sooner

Kernel ratios are not what a user feels. We put the kernels into vLLM serving a 27-billion-parameter model on one MI250X card and measured the time until the first token arrives.

An interactive figure. At vLLM's defaults our GEMM alone brings time to first token to 0.964 to 0.971 of stock from 2.9k prompt tokens, and GEMM plus attention to 0.888 to 0.893 at 14.2k tokens. With one-step prefill the two together read 0.872 to 0.873. The stock Triton flag is 11 to 16% slower at 14.2k tokens.

Time to first token in a served 27B model

On a 14,201-token prompt, stock vLLM took 4.72 seconds to the first token. With our matrix multiply it took 4.57 seconds, and with our attention kernel as well, 4.20 seconds. The card draws the same power in every setup and finishes earlier, so it used 8 to 10% less energy. When vLLM prefills a prompt in one step the two kernels together reach 13% sooner. With four prompts at once the gain is 1 to 2%.

What else we measured in the server:

  • Decode is at parity. Our decode kernel is within 0.3 to 2.4% of a flag vLLM already ships.
  • That flag slows prefill by 11 to 16% at 14.2k tokens, so no single stock setting is best for both phases.
  • Output text. On 12 test prompts our setups reproduced stock output exactly on 6 to 12, and two stock setups agreed with each other on 8 to 10. We have not run a quality benchmark.
  • Coverage matters. The attention kernel adds its 7.7 to 8.2% at 14.2k tokens only when it handles every chunk the server's scheduler produces.

How we measure

  1. Compute the reference in 64-bit and report the vendor's error beside ours.
  2. Start the real server with real weights, record the kernel it calls and its arguments, and race exactly that.
  3. Race identical code as a control in every job, and count a gain only if it clears the control's spread.
  4. Test accuracy on inputs captured from a real server as well as on random data.
  5. Tune the vendor's kernel for the device with the vendor's own tool, or label the baseline as untuned.
  6. Measure inside the served model before quoting a number.

The full list has 32 items. It is in the repository together with the kernels, the benchmark harness and the results log, under Apache-2.0.

Setup and limits

All measurements are from LUMI-G: AMD Instinct MI250X, vLLM 0.30.0, Triton 3.7.1, in November 2026. Kernel races ran both arms in one process. Served-model numbers come from two whole-node jobs per setting with the arm order mirrored. Energy is the card's own counter over prefill-heavy requests, not energy per generated token. The results are for one GPU type and one model.

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).

Sources

Tags

gpu-kernelsllm-opsperformance
HA

About the author

Hamza Abdagić

View profile