GPU Hierarchy Meets Structured Matrices: Fast Algorithms for State-Space Models
Berlin ChenCaitlin WangAakash LahotiKevin LiJay ShahJack CarlisleTimmy LiuMengyu GuoJ Zico KolterAlbert GuTri Dao
Berlin Chen
Caitlin Wang
Aakash Lahoti
Kevin Li
Jay Shah
Jack Carlisle
Timmy Liu
Mengyu Guo
J Zico Kolter
Albert Gu
Tri Dao
+11
This paper narrows the performance gap between linear-time SSMs and optimized FlashAttention kernels at practical sequence lengths through two algorithmic improvements. A split-sequence algorithm decouples the compute tile from the sequence-parallel split length, reducing boundary-state traffic while preserving efficient matrix-multiplication tiles, and a hierarchy-aware segsum decomposes the 1-semiseparable decay mask into 1-SS diagonal and rank-one off-diagonal blocks, computed via warp-level scans and cross-warp aggregation, giving the stability of direct segsum at the speed of diff segsum. Implemented on H100 with CuTe-DSL, the kernels improve prefill time by $4.1\times$ over the official Triton Mamba-2 kernel and, to the authors' knowledge, make a linear-time layer faster than state-of-the-art attention for the first time at 2–4k sequence lengths, where prior kernels only reached parity at $\geq 8$k.

OpenReview · May 4, 2026