CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programs
2026/05/19 by Han Guo, Jack Zhang, Arjun Menon +4 · 13 voices · 1 citation
#cs.LG
paper · pdf
Abstract
Transformer training systems are built around dense linear algebra, yet a nontrivial fraction of end-to-end time is spent on surrounding memory-bound operators. Normalization, activations, residual updates, reductions, and related computations repeatedly move large intermediate tensors through global memory while performing little arithmetic, making data movement an increasingly important bottleneck in otherwise highly optimized training stacks. We introduce CODA, a GPU kernel abstraction that expresses these computations as GEMM-plus-epilogue programs. CODA is based on the observation that many Transformer operators exposed as separate framework kernels can be algebraically reparameterized to execute while a GEMM output tile remains on chip, before it is written to memory. The abstraction fixes the GEMM mainloop and exposes a small set of composable epilogue primitives for scaling, reductions, pairwise transformations, and accumulation. This constrained interface preserves the performance structure of expert-written GEMMs while remaining expressive enough to cover nearly all non-attention computation in the forward and backward pass of a standard Transformer block. Across representative Transformer workloads, both human- and LLM-authored CODA kernels achieve high performance, suggesting that GEMM-plus-epilogue programming offers a practical path toward combining framework-level productivity with hardware-level efficiency.
Citations
Cited by
Discussions
- CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programs [hn, 105 points, 12 comments]
- CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programs https://arxiv.org/abs/2605.19269 (https://news.ycombinator.com/item?id=48232118) [bsky, 0 points, 0 comments]
- CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programs https://arxiv.org/abs/2605.19269 (https://news.ycombinator.com/item?id=48232118) [bsky, 0 points, 0 comments]
- https://bsky.app/profile/hackernews.com.web.brid.gy/post/3mmgt525kjxd2 [bsky, 0 points, 0 comments]
- CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programs [bsky, 0 points, 1 comments]
- CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programs #HackerNews https://arxiv.org/abs/2605.19269 [bsky, 0 points, 0 comments]
- CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programs https://arxiv.org/abs/2605.19269 [bsky, 0 points, 0 comments]
- Transformerの計算効率を劇的に改善する新手法「CODA」が登場。ブロック処理をGEMM-Epilogueプログラムへと再構築することで、推論の高速化とメモリ効率の向上を実現。AIモデルの実行環境に革新をもたらす注目技術です。 #AI #TechNews https://arxiv.org/abs/2605.19269 [bsky, 0 points, 0 comments]
- 📰 A research paper titled "CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programs" proposes an innovative approach to optimize transformer-based models by rewriting their blocks into a form tha [bsky, 0 points, 2 comments]
- Exciting advancements in AI! The new research on CODA explores rewriting transformer blocks as GEMM-epilogue programs, promising enhanced efficiency and performance. This could reshape the landscape o [bsky, 0 points, 1 comments]
- CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programs view on hacker news [bsky, 0 points, 0 comments]
- CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programs https:// arxiv.org/abs/2605.19269 # arxiv [mastodon, 0 points, 0 comments]
- CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programs https://arxiv.org/abs/2605.19269 [comments] [96 points] [bsky, 0 points, 0 comments]
Related