# FlyWheel: Attention Kernels Built for the TPU

DevFeed: [FlyWheel: Attention Kernels Built for the TPU](<https://devfeed.tech/articles/flywheel-attention-kernels-built-for-the-tpu-114544.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.01426>)

Author: Zishuo Bao, Zeshen Zhang, Linkun Chen, Yucheng Lu

Published: 2026-11-03T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [kernels](<https://devfeed.tech/topics/kernels.md>), [LLM optimization](<https://devfeed.tech/topics/llm-optimization.md>), [vllm](<https://devfeed.tech/topics/vllm.md>), [performance-optimization](<https://devfeed.tech/topics/performance-optimization.md>)

Tags: [attention](<https://devfeed.tech/tags/attention.md>), [cs-cl](<https://devfeed.tech/tags/cs-cl.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [kernels](<https://devfeed.tech/tags/kernels.md>), [latency](<https://devfeed.tech/tags/latency.md>), [linear](<https://devfeed.tech/tags/linear.md>), [prefill](<https://devfeed.tech/tags/prefill.md>), [qwen3-8-27b](<https://devfeed.tech/tags/qwen3-8-27b.md>), [reuse](<https://devfeed.tech/tags/reuse.md>), [serving](<https://devfeed.tech/tags/serving.md>), [tensor-processing-units](<https://devfeed.tech/tags/tensor-processing-units.md>), [throughput](<https://devfeed.tech/tags/throughput.md>), [tpu](<https://devfeed.tech/tags/tpu.md>), [vllm](<https://devfeed.tech/tags/vllm.md>)

## AI overview

FlyWheel targets TPU attention kernels' underuse of matrix units, caused by repeated operand loads, vector-heavy work and idle time from dependencies. It reduces vector work by reformulating softmax and triangular inversion, coordinates layouts to reuse matrix operands, and overlaps independent computation to hide latency. On TPU v6e and v7x, it reports up to 4.14x faster softmax attention than RPA and 1.80x faster than Splash Attention, reaching 81% of peak BF16 throughput on v6e; Gated DeltaNet prefill improves by up to 3.61x. In vLLM serving Qwen3.8-27B, prefill throughput rises by up to 1.56x with comparable accuracy. These are reported maxima; the excerpt does not specify benchmark conditions.

## Source excerpt

arXiv:2611.01426v1 Announce Type: cross 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. 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.