A follow-up to the Gemma 4 size sweep on one MI300X. I ran Gemma 4 12B in fp8 twice on the same Developer Cloud droplet, the same day and the same image (vllm/vllm-openai-rocm nightly, vLLM 0.31.1rc1.dev23): once stock and once with VLLM_ROCM_USE_AITER=1. Same grid as before, 1, 8 and 64 requests by 128, 1,024 and 8,192-token prompts, three repeats per cell.
| Requests |
Prompt tokens |
AITER tok/s |
Stock tok/s |
AITER / stock |
| 1 |
128 |
148.3 |
152.2 |
0.974 |
| 8 |
1,024 |
896.5 |
917.1 |
0.978 |
| 64 |
1,024 |
2,694.7 |
2,731.0 |
0.987 |
| 64 |
8,192 |
849.4 |
857.7 |
0.990 |
All nine cells are slower with AITER, 0.974x to 0.994x, with repeats varying by 0.78% or less. The boot logs show what the flag changed:
- Attention stays on Triton. vLLM forces it for Gemma 4:
Gemma4 model has heterogeneous head dimensions {'sliding_attention': 256, 'full_attention': 512}. FA4 not available, forcing TRITON_ATTN backend.
- The fp8 GEMMs move to AITER, untuned. The log carries 924 lines like
[aiter] shape is M:1, N:8192, K:3840, q_dtype_w:torch.float8_e4m3fnuz, not found tuned config in /tmp/aiter_configs/a8w8_bpreshuffle_tuned_gemm.csv, will use default config! That is all six of 12B’s weight shapes (N x K of 8192x3840, 9216x3840, 30720x3840, 3840x4096, 3840x8192 and 3840x15360), each at 77 token counts, in both the a8w8 and a8w8_bpreshuffle tables.
- RMSNorm moves to AITER (
rms_norm=['aiter', 'native']).
Two things would let AITER help Gemma 4 here: tuned a8w8 configs for those six shapes on gfx942, and an attention path that serves 512-wide heads alongside 256-wide ones. If anyone has tuned a8w8 entries for these shapes, or knows whether AITER’s attention is planned to cover head size 512, I’d like to rerun with them.
The stock run reproduced the earlier sweep’s 12B fp8 numbers within 2.1% on a different droplet a day later, so the platform is steady enough to read a 1% to 3% difference.
The full write-up: VLLM_ROCM_USE_AITER=1 Slows Gemma 4 on an AMD MI300X: What the Flag Changes and Why - DEV Community
Code, logs and evidence: gemma4-dev/gpu-vllm-mi300x-2b at main · xbill9/gemma4-dev · GitHub
1 Like
On the attention question, an upstream path worth checking is ROCM_AITER_UNIFIED_ATTN, AITER’s Triton unified-attention backend. The gfx942 config table contains entries for 256- and 512-wide heads, including 512-head decode.
This config table is an upstream snapshot from 11 October, not proof of what is packaged in your 0.31.1rc1.dev23 image. Its entries do not establish end-to-end correctness or a speedup for Gemma 4 12B FP8 on MI300X; I have not tested that setup.
1 Like
In vLLM’s Gemma4Config, the fallback to TRITON_ATTN applies only when no backend was explicitly selected. For matching installed revisions, adding --attention-backend ROCM_AITER_UNIFIED_ATTN would be a separate attention-path experiment; VLLM_ROCM_USE_AITER=1 alone does not establish that this backend was selected. Confirm the actual startup backend and check output correctness before comparing throughput.
The linked vLLM source is an upstream snapshot from 11 October, so check the exact vLLM/AITER revisions in your nightly image before trying this text-benchmark comparison. I have not tested your setup or verified a speedup, and I do not have tuned entries for the six GEMM shapes.
1 Like
I have seen similar things on Googles TPU- it can skip a backend even if it is available. Will take a look at another run- but currently out of AMD dev credits.
Did a code analysis without burning any GPU time:
Gemma4Config only forces TRITON_ATTN when no backend is set, and my runs set none. The boot log’s “selected via --attention-backend” wording comes from the fallback writing into the config, not from a flag I passed. ROCM_AITER_UNIFIED_ATTN is present at that commit and accepts head sizes ≥ 32, so the next run will add --attention-backend ROCM_AITER_UNIFIED_ATTN as a third cell, with the backend line and accuracy checked before throughput.
Thanks, William — that code-only check makes the startup-log wording much clearer. A useful three-way comparison with the same workload and image would be stock, the AITER flag alone, and the AITER flag plus explicit ROCM_AITER_UNIFIED_ATTN, keeping the flag setting fixed between the last two. That should help separate the attention-path change from the GEMM/RMSNorm changes.
Recording the exact image and vLLM/AITER revisions alongside the confirmed startup backend would make the results easier to reproduce. Your correctness-first approach sounds sensible; I’d be interested to see the comparison once credits are available.
1 Like