CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programs
Han GuoJack ZhangArjun MenonDriss GuessousVijay ThakkarYoon KimTri Dao
Han Guo
Jack Zhang
Arjun Menon
Driss Guessous
Vijay Thakkar
Yoon Kim
Tri Dao
+7
CODA is a GPU kernel abstraction that rewrites the memory-bound Transformer operators surrounding linear algebra—normalization, activations, residual updates, reductions, and related computations—as GEMM-plus-epilogue programs. Its premise is that many of these operators, exposed as separate framework kernels, can be algebraically reparameterized so their work runs while a GEMM output tile stays on chip, before being written to memory. CODA fixes the GEMM mainloop and exposes composable epilogue primitives for scaling, reductions, pairwise transformations, and accumulation, preserving the performance structure of expert-written GEMMs while covering nearly all non-attention computation in a standard Transformer block's forward and backward pass. Human- and LLM-authored CODA kernels achieve high performance across representative workloads.

OpenReview ·
· May 4, 2026