FlyWheel: Attention Kernels Built for the TPU

Zishuo Bao, Zeshen Zhang, Linkun Chen, Yucheng Lu
11/1/2026
cs.CLcs.LG

No confident code implementation found for this paper.

Abstract

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.

Show full abstract

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\times$ over the state-of-the-art RPA kernel and $1.80\times$ over Splash Attention, reaching 81% of peak BF16 throughput on v6e. It also speeds up Gated DeltaNet prefill by up to $3.61\times$. Integrated into vLLM serving Qwen3.8-27B, FlyWheel improves prefill throughput by up to $1.56\times$ while maintaining comparable accuracy.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{bao2026flywheel,
  title  = {FlyWheel: Attention Kernels Built for the TPU},
  author = {Zishuo Bao and Zeshen Zhang and Linkun Chen and Yucheng Lu},
  year   = {2026},
  eprint = {2611.01426},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2611.01426v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2611.01426.svg)](https://codeofpaper.com/paper/2611.01426)

Discussion