Manuscript Offprint

arXiv:2611.09225

Fused-Softmax for efficient quantized attention

Tianxing Wu, Juuso Korhonen, Jesus Carabano Bravo

Abstract

Low-precision matrix throughput on modern GPUs is growing far faster than vector-arithmetic throughput. Attention therefore cannot realize the available GEMM performance because softmax has become the pipeline bottleneck. We introduce Fused-Softmax Attention, a training-free algorithm that reformulates and approximates softmax to fold its dominant operations into the attention GEMMs, moving work from vector units to matrix cores. Implemented for the AMD CDNA™ 4 architecture, our MXFP8, MXFP6 and MXFP4 kernels reach approximately 3.0, 4.0 and 4.6 PFLOP/s on an AMD Instinct™ MI355X GPU, yielding speedups of 2.1×, 2.8× and 3.2× over the BF16 attention. Importantly, the additional error introduced by Fused-Softmax remains below the error floor set by quantizing the GEMM operands. On Wan2.2-T2V-A14B, a hybrid MXFP6/4 schedule delivers up to 2.05× end-to-end speedup while preserving the visual quality of the outputs. The kernels ship in AMD's open-source AITER library, and they powered AMD's MLPerf® Inference v6.1 Wan2.2 submission, which ran 1.7× faster than AMD's previous-round result on the same hardware. Our results show that redesigning softmax to utilize the matrix pipeline enables attention to capitalize on continued growth in low-precision matrix throughput.

1 Introduction

Transformer attention (Vaswani et al., 2017) is a cornerstone algorithm of modern AI models, but its quadratic complexity in terms of sequence length makes it a computational bottleneck in long-sequence settings. This is particularly relevant in video generation models (Team Wan et al., 2025; Kong et al., 2024; MiniMaxAI, 2026), where higher resolution and longer videos increase the effective sequence length.

The FlashAttention family (Dao et al., 2022; Dao, 2024; Shah et al., 2024) has become the standard approach to map the attention algorithm efficiently to modern GPU hardware. In its latest version, FlashAttention-4 (Zadouri et al., 2026), software pipelining has evolved to overlap the two kinds of work in attention, the matrix multiplies and the vector work of the softmax, exploiting independent execution units in modern datacenter GPUs. However, the throughput of these execution units has scaled asymmetrically across recent datacenter GPU generations, leaving vector throughput far behind and making the softmax the bottleneck.

Related work addresses this bottleneck by reducing the cost and number of the softmax-related vector operations. FlashAttention-4 uses polynomial approximation for part of the exponentials and skips most output rescales. Its follow-ups (Zhang et al., 2026b; Deng et al., 2026) quantize the matrix operands to FP8 and below but leave the softmax unchanged. Two concurrent works, VC-Attention (Li et al., 2026) and Direct-P from FP4 FlashAttention-4 (Hu, 2026), replace the costly exponential with an affine transformation into the quantized probabilities.

*Equal contribution.

In contrast to these works, our proposed method moves most of the softmax work onto the matrix cores and uses a high-quality, in-kernel conversion path to produce quantized probabilities. Our Fused-Softmax pipeline combines the following key features:

  • Freezing the maximum speculatively, which moves the max subtraction into the score GEMM's accumulator and removes the rescaling-related vector work. A gate on the running tile max detects overflow and triggers a rollback, which raises the frozen max and re-shifts the scores.

  • Exponential approximation using the Schraudolph method (Schraudolph, 1999), with the affine transformation folded into the score GEMM's operands alongside the frozen maximum, off the vector unit.

  • A hardware-efficient two-stage conversion to quantized PP: Stage-A performs the Schraudolph conversion, and Stage-B scales the result to the target format. The running tile max is used to derive the E8M0 PP scales in the microscaling (MX) format (Open Compute Project, 2023).

  • The row sum is moved out of the vector path and done as an efficient matrix multiply using the quantized PP.

This leaves only a maximum reduction and two conversions on the vector unit, effectively unlocking the benefits of quantizing the matrix operands to FP8 and lower formats. We implement our pipeline on CDNA 4 and evaluate it on the AMD Instinct™ MI355X GPU. Section 5.1 ablates the accuracy cost of each feature and the operand quantization it enables. We evaluate a progressive series of kernel variants from MXFP8 through MXFP6 to MXFP4. The MXFP8 configuration reaches 2978 TFLOP/s (2.07×2.07 \times BF16), at a cosine similarity of 0.9984. The MXFP6 attention reaches 3973 TFLOP/s (2.76×2.76 \times BF16), at 0.9979. The frontier MXFP4 attention reaches 4586 TFLOP/s (3.2×3.2 \times BF16), at 0.9787.

The kernels are in production: they ship in AITER behind the mha_v4 entrypoint (AMD, 2025), and powered AMD's MLPerf® Inference v6.1 Wan2.2-T2V-A14B submission (Zhang et al., 2026a; Arunachalam et al., 2026), whose single-stream latency fell 1.7×1.7\times from the previous round on the same MI355X system, with quantized attention the largest single contributor.

References (45)