Archived
The long-context decode profile was 70% attention: one work-group a (row, head) left most of the card idle at one row and read each kv head eight times. xe2_attn_paged now splits a row's keys into partitions of 32 or more across work-groups, each work-group a (row, kv head, partition) whose sub-groups are the kv head's query heads, the partial softmax states merged from 64 MiB of scratch (the scratch hook); prefill-sized row counts take one partition and write directly. rad-kbench 138/138 and 132/132, KL against libref mean 5.8e-4, p99 3.2e-3, top-1 98.5%. Decode after a 1797-token prompt 16.2 -> 29.8 tok/s; short-context decode 32 tok/s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1