# FlyWheel: Attention Kernels Built for the TPU

arXiv: https://arxiv.org/abs/2611.01426 · HTML: https://mlsanity.com/paper/2611.01426/

## Key facts

- Cited by 1 papers in the map (data through 26 Nov 2026).
- Builds on 7 of its 39 references that are in the map.
- Submitted 1 Nov 2026.

## Builds on (most cited first, 7 of 7)

- [RULER: What's the Real Context Size of Your Long-Context Language Models?](https://mlsanity.com/paper/2404.06654/) (2024)
- [Kimi Linear: An Expressive, Efficient Attention Architecture](https://mlsanity.com/paper/2510.26692/) (2025)
- [Online normalizer calculation for softmax](https://mlsanity.com/paper/1805.02867/) (2018)
- [ReplaySSM: Cache SSM Inputs, Not State](https://mlsanity.com/paper/2610.13778/) (2026)
- [Ragged Paged Attention: A High-Performance and Flexible LLM Inference Kernel for TPU](https://mlsanity.com/paper/2604.15464/) (2026)
- [VFA: Relieving Vector Operations in Flash Attention with Global Maximum Pre-computation](https://mlsanity.com/paper/2604.12798/) (2026)
- [Fast and Stable Triangular Inversion for Delta-Rule Linear Transformers](https://mlsanity.com/paper/2605.21325/) (2026)

## Built on by (most cited first, 1 of 1)

- [Muir: Linear Attention with Sensitivity-Allocated Gating and Matched-Filter Readout](https://mlsanity.com/paper/2611.08376/) (2026)

## Abstract (arXiv)

Attention kernels on Tensor Processing Units (TPUs) often underutilize their matrix units (MXUs) because of repeated matrix operand loads, vector-intensive computation, and dependencies that leave MXUs idle. We present FlyWheel, a set of fast TPU kernels for both softmax and linear attention. FlyWheel reformulates softmax and triangular inversion to reduce vector work, while coordinating data layouts to improve matrix operand reuse. It then overlaps independent computation to hide execution latency. We apply these techniques to both softmax attention and Gated DeltaNet on TPU v6e and v7x. FlyWheel speeds up softmax attention by up to 4.14× over the state-of-the-art RPA kernel and 1.80× over Splash Attention, reaching 81% of peak BF16 throughput on v6e. It also speeds up Gated DeltaNet prefill by up to 3.61×. Integrated into vLLM serving Qwen3.8-27B, FlyWheel improves prefill throughput by up to 1.56× while maintaining comparable accuracy.
