{"slug": "coda-rewriting-transformer-blocks-as-gemm-epilogue-programs", "title": "CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programs", "summary": "CODA, a GPU kernel abstraction that reparameterizes memory-bound Transformer operations like normalization and activations to execute as GEMM-plus-epilogue programs, keeping data on-chip to reduce global memory movement. This approach fixes the GEMM mainloop and uses composable epilogue primitives, covering nearly all non-attention computation in a standard Transformer block. The authors demonstrate that both human- and LLM-authored CODA kernels achieve high performance, offering a practical path to combine framework-level productivity with hardware-level efficiency.", "body_md": "Computer Science > Machine Learning\n[Submitted on 19 May 2026 (v1), last revised 20 May 2026 (this version, v2)]\nTitle:CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programs\nView PDF HTML (experimental)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.\nSubmission history\nFrom: Han Guo [view email][v1] Tue, 19 May 2026 02:30:43 UTC (1,121 KB)\n[v2] Wed, 20 May 2026 17:38:24 UTC (493 KB)\nReferences & Citations\nLoading...\nBibliographic and Citation Tools\nBibliographic Explorer (What is the Explorer?)\nConnected Papers (What is Connected Papers?)\nLitmaps (What is Litmaps?)\nscite Smart Citations (What are Smart Citations?)\nCode, Data and Media Associated with this Article\nalphaXiv (What is alphaXiv?)\nCatalyzeX Code Finder for Papers (What is CatalyzeX?)\nDagsHub (What is DagsHub?)\nGotit.pub (What is GotitPub?)\nHugging Face (What is Huggingface?)\nScienceCast (What is ScienceCast?)\nDemos\nRecommenders and Search Tools\nInfluence Flower (What are Influence Flowers?)\nCORE Recommender (What is CORE?)\nIArxiv Recommender\n(What is IArxiv?)\narXivLabs: experimental projects with community collaborators\narXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.\nBoth individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.\nHave an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.", "url": "https://wpnews.pro/news/coda-rewriting-transformer-blocks-as-gemm-epilogue-programs", "canonical_source": "https://arxiv.org/abs/2605.19269", "published_at": "2026-05-22 04:54:33+00:00", "updated_at": "2026-05-22 06:04:21.742862+00:00", "lang": "en", "topics": ["machine-learning", "large-language-models", "research", "developer-tools", "hardware"], "entities": ["CODA", "GPU", "GEMM", "Transformer"], "alternates": {"html": "https://wpnews.pro/news/coda-rewriting-transformer-blocks-as-gemm-epilogue-programs", "markdown": "https://wpnews.pro/news/coda-rewriting-transformer-blocks-as-gemm-epilogue-programs.md", "text": "https://wpnews.pro/news/coda-rewriting-transformer-blocks-as-gemm-epilogue-programs.txt", "jsonld": "https://wpnews.pro/news/coda-rewriting-transformer-blocks-as-gemm-epilogue-programs.jsonld"}}