Archived
A step that mixes decoding sequences with a prefill chunk issued the dense attention once, at band max_q_len, so the decode rows ran through the prefill kernel: one workgroup per KV head walking the decoder's whole context. With a decoder at 188k beside a 2048-row chunk that tail set the step time. In a MIXED step the attention is now issued twice: - the decode half at the decode band (served by the split-KV decode row); at most max_seqs - 1 sequences of at most the decode band's rows, which its declared scratch covers; - the prefill half always at the op's top band, which selects the query-tiled prefill row built for launches over part of a step (absolute cu from entry D, as the GDN block issues its prefill half and as ArPieces issues its pieces); the kernels read exact lengths from cu. At its own query length a chunk of 10 rows or fewer would select the decode row, which sizes its partials from the whole step's rows and has no cu span. A chunk no longer than the verify blocks beside it keeps the single launch (the step is decode- shaped). Pure decode and pure prefill steps issue exactly as before (graph pins unchanged; only the pinned steps that contain a mixed step move). RADIANCE_ATTN_BAND_SPLIT=0 restores the single issue. Measured on 2x Radeon AI PRO R9700, Qwen3.8-27B MXFP4, TP 2: one sequence decoding after a 188k prompt while a fresh 25k prompt arrives (2 rounds each): - mixed step 510 / 508 ms -> 211 / 211 ms - the new prompt's prefill 11.3 / 11.3 s -> 5.0 / 5.0 s (the same as beside a 0.7k decoder) - the decoder's rate over the window 85 / 82 -> 109 / 103 tok/s 30 minutes of mixed serving load (12 decoding streams with speculation, fresh 25k / 41k prompts, cached re-sends that prefill a few-row suffix, TranslateGemma beside): 0 errors, 0 restarts. Tests: arch_test qwen35_fp8_issues_a_mixed_steps_attention_once_per_band (both halves' operands, the prefill half at the top band for a short chunk, the single launch when the chunk is not longer than the verify blocks, one issue per layer for pure steps); r4d_selftest attn_mixed_step (production per-rank geometry, scratch bound exactly as the engine binds it per band, 15 decode sequences of 8-10 rows beside chunks of 1 to 640 rows). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>