AI & ML
ZYFA: Speed and Accuracy of FP8 FlashAttention on AMD CDNA4
arXiv cs.DC0 views
arXiv:2611.07496v1 Announce Type: new Abstract: Attention is a core building block of frontier models and often dominates compute-bound prefill at long context. FP8 matrix instructions offer twice the peak throughput of BF16, but they accelerate only matrix multiplication, and the softmax between the two matrix multiplications of attention runs on vector units that FP8 does not accelerate. On the AMD Instinct MI355X, the vendor's AITER kernels reach 39% of peak FP8 matrix throughput at 32K tokens, compared with 49% in BF16. Attention is also more numerically sensitive to quantization than feed-forward layers, and unlike NVIDIA's Hopper and Blackwell GPUs, the MI355X does not track the completion of matrix instructions in hardware, so overlapping the softmax with the matrix multiplications depends on instruction order. We present ZYFA, prefill kernels for the MI355X built on three techniques: (1) computing each FP8 probability directly from its score with a multiply-add and an integer conversion instead of an exponential; (2) a ping-pong schedule in which one group of threads computes its softmax while another executes its matrix multiplications; and (3) scaling each block of probabilities up by a power of two before rounding, and normalizing by the sum of the rounded probabilities. On attention inputs captured from three models and timed at sustained clock speeds, ZYFA achieves 1.16-1.76x the throughput of AITER. On the Gaussian inputs of kernel benchmarks at 32K tokens, it achieves 1.26-1.37x at head dimension 128 and 1.99x for DeepSeek-style multi-head latent attention. The sustained clock of the MI355X depends on operand values, so throughput on random inputs does not reliably predict throughput on real model activations. At head dimension 128, ZYFA's numerical error is within a few percent of that of Composable Kernel and Triton and 62-78% lower than that of AITER's. The source code is available at https://github.com/Zyphra/zyfa.
Source:https://arxiv.org/abs/2611.07496PreviousKOSMOS: Self-scheduling Persistent Kernels for Communication-Compute OverlapNextCharacterizing CUDA Locality Domains on Blackwell GPUs
Related posts
How to Evaluate RAG Retrieval in 2026: Question Sets, Metrics That Mislead, and a Practical Recipe
0dev.to
Reading a Competitor's Pricing Page Like an Engineer
0dev.to
Day 4: Adding VLAN support
0dev.to

Browser-local image tools: how to check the upload boundary
0dev.to
A Space Heater Is the Hardest Question You Can Ask a Smart Plug
0dev.to
Geometric Functional Inequalities for Markov Processes: An Invitation via the Langevin Diffusion
0arXiv stat.CO