acceptodds
Published as a conference paper at NeurIPS 2026

CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programs

Han Guo, Jack Zhang, Arjun Menon, Driss Guessous, Vijay Thakkar, Yoon Kim, Tri Dao

Abstract

Transformer training systems are built around dense linear algebra, yet a nontrivial fraction of end-to-end time is spent in the memory-bound operators that surround it. 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 so that their work executes 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.

Keywords:
Atlanta

Reviews

Among:
Shape:
123456this paper, Bottom 17%
Figure 1. Mean review rating of the reviewed papers at NeurIPS 2026. This paper averages 4.00 over 3 reviews, above 17% of the others.
Reviewer_6FiLOpenReview ↗
Rating
4
Clarity
2
Confidence
3
Originality
2
Quality
3
Significance
3
Read review
Summary

This paper presents CODA, a GPU kernel abstraction that reformulates a substantial portion of Transformer computation as GEMM-plus-epilogue programs. The central idea is that many memory-bound operators surrounding GEMMs can be algebraically transformed so that their computations are executed within the epilogue of a GEMM kernel while output tiles remain on-chip. By doing so, CODA aims to reduce intermediate tensor materialization and global memory traffic without modifying the highly optimized GEMM mainloop itself.

The experiments compare both human-written and LLM-generated CODA kernels against cuBLAS + torch.compile, Liger Kernel, and FlashInfer. The results demonstrate moderate speedups at both the kernel and block levels across several workloads.

Strengths and weaknesses

Strengths

The paper is well motivated. Modern Transformer workloads are increasingly bottlenecked not only by Tensor Core GEMMs, but also by the repeated materialization of intermediate tensors and the overhead of memory-bound operations.

One particularly strong aspect of the paper is the algebraic reformulation of RMSNorm-related computation. The derivation showing that the RMS scaling factor can be delayed and fused into the epilogue of the subsequent GEMM is technically elegant and practically meaningful.

Another positive aspect is the emphasis on programmability and LLM-assisted kernel authoring. The comparison between CODA (LLM) and CODA (Human) is especially interesting, as several LLM-generated kernels achieve performance comparable to—or in some cases even better than—the hand-written implementations.

Weaknesses

However, I still have several concerns that make the paper borderline for me. In particular, the relationship from EVT and unique contribution is not clear and the evaluation remains somewhat limited. The main concerns are listed below in the Questions section.

Questions
  • The paper is closely related to EVT and CUTLASS epilogue fusion. Could the authors clarify more precisely what functionality or abstraction capability is fundamentally new in CODA relative to EVT?
  • The current evaluation mainly focuses on kernel-level and block-level benchmarks. Could the authors provide end-to-end training throughput measurements (e.g., tokens/sec or training step latency) on a representative LLM training setup?
  • Could the authors analyze where the observed performance gains come from? For example, are the improvements mainly due to reduced HBM traffic, fewer kernel boundaries, better overlap, or improved scheduling efficiency?
  • The difference between CODA (LLM) and CODA (Human) is not deeply analyzed. Could the authors provide a case study explaining why some kernels generated by the LLM outperform human-written versions while others do not?
Limitations

yes

Paper formatting concerns

No paper formatting concerns.

Final justification

The rebuttal addressed most of my concerns:

  • The new end-to-end forward-and-backward results show a consistent full-model speedup and substantial memory reduction against strong PyTorch and Liger baselines.
  • The profiling analysis clearly attributes the gains to fewer memory-bound kernels, reduced intermediate materialization, and fewer kernel launches.
  • The added case studies better explain the complementary strengths of LLM- and human-written kernels.
  • The distinction from EVT is now clearer, although the originality of the abstraction relative to existing epilogue frameworks remains somewhat limited.

Overall, the strengthened evaluation outweighs my remaining originality concern, so I raise my score from 3 to 4.

Reviewer_ZdzBOpenReview ↗
Rating
4
Clarity
3
Confidence
4
Originality
2
Quality
3
Significance
3
Read review
Summary

Memory-bound Transformer operators are difficult to fuse in current framework-level execution pipelines, where operator boundaries often force large intermediate tensors to traffic with GPU memory. This paper observes that such non-attention computations contribute significant overhead in LLM training. To address this, the authors present CODA, a framework that rewrites these operators as computations inside GEMM epilogues, reducing memory traffic and latency.

CODA composes five basic epilogue primitives to rewrite inefficient parts of current LLM training workloads, including residual updates, RMSNorm, SwiGLU, RoPE, cross-entropy, and several backward-pass reductions. The kernels are implemented on top of CuTeDSL and against cuBLAS + torch.compile, Liger, and FlashInfer.

Strengths and weaknesses

Strengths

  1. Clear problem framing. The paper makes a clean and well-motivated observation: non-GEMM, memory-bound operators consume a nontrivial fraction of training time, and this fraction grows as the compute-bound GEMMs get faster while the cost of materializing intermediate tensors does not improve at the same rate.

  2. Systematic backward-pass derivation. The backward-pass treatment is one of the most valuable parts of the paper. Appendix A.2 works through, in full, how RMSNorm backward decomposes into a tile-local epilogue + a lightweight auxiliary reduction. Prior work rarely spells out the backward case for epilogue-fused Transformer kernels this completely, and the derivation is useful as a standalone reference.

Weaknesses

  • (Minor) W1. Limited mathematical novelty.

The RMSNorm reparameterization idea is not something new, like FlashNorm also presents the same in their work. And the backward derivation is the standard RMSNorm backward plus a standard adjoint identity. The novelty is therefore in the abstraction and implementation, not the formulas. This is a relatively engineering-oriented contribution.

  • W2. No end-to-end validation.

The motivation is explicitly framed around end-to-end training time, yet every experiment is a microbenchmark. This matters because a kernel-level speedup does not necessarily translate into a faster training step: CODA also introduces auxiliary reductions and crosses normal module boundaries. A full layer or full model training step would make the practical benefit much clearer.

  • W3. The FP8/FP4 motivation is dropped.

The introduction mentioned FP8 and FP4 to describe why memory-bound overhead is becoming relatively more expensive. but FP8/FP4 are then never mentioned or evaluated again anywhere in the method or experiments.

  • W4. The benchmark figures are hard to read.

The experimental plots need substantial improvement. They are dense, hard to read, and look insufficiently checked before submission. The paper also does not provide tables with the actual benchmark numbers, so the figures can only be used as rough visual references. Readers should not need to take out a ruler to estimate the reported speedups from small bar charts

Questions
  1. Can you provide an end-to-end training step comparison (e.g. at least a full Transformer layer or full model)?

  2. Do the benefits hold under FP8/FP4 GEMMs, which the introduction uses as the central motivation? Results in that regime would directly support the main argument.

  3. Could the benchmark results be presented more clearly? Also provide tables. In their current form the figures are difficult to read and to compare across.

Limitations

Yes

Paper formatting concerns

No

Final justification

I am raising my score from 3 to 4.

The rebuttal added substantial evidence. The TorchTitan LLaMA-3 1B forward+backward result shows about ~5% speedup, with a GEMM / Attention / Others breakdown that supports the claim: gains come mainly from reducing the "Others" (memory-bound) bucket rather than speeding up GEMM/Attention. The authors further showed that packed QKV/gate-up projections do not explain the gains, and that an additional Liger end-to-end comparison still leaves about 5% for CODA (Liger is similar to torch.compile in this setup). These results mostly address my main concern that the method might not help in a realistic training stack, or might only win due to an unfair baseline. And I no longer require full FP8 training in this round if the introduction softens FP8/FP4 to motivation / future work. Overall, W2 moves from a reason to reject to an acceptable evaluation, which fits a 4.

Why not a 5: The contribution remains largely an engineering advance. The absolute speedup is modest (~5% on strong baselines), so the significance is still incremental. The score increase is driven mainly by the new end-to-end evidence, the Liger/packing checks, and the memory experiments that resolved my remaining concerns about the evaluation!

Reviewer_QoCwOpenReview ↗
Rating
4
Clarity
3
Confidence
5
Originality
2
Quality
3
Significance
2
Read review
Summary

This paper proposes a GPU kernel abstraction that rewrites Transformer block computations as fused GEMM-epilogue kernels. The main idea is to keep the GEMM mainloop fixed and expose a small set of composable epilogue primitives for operations.

A key part of the paper is that this abstraction is also intended to make kernel authoring easier for coding agents: instead of generating arbitrary CUDA kernels, the agent only needs to compose a fixed set of epilogue primitives around a high-performance GEMM mainloop.

Strengths and weaknesses

Strengths

  • The agent-oriented abstraction is the most interesting part of the paper. Instead of asking an LLM to generate arbitrary low-level kernels, CODA constrains the generation space by fixing the GEMM mainloop and exposing a small epilogue primitive set. This seems like a more realistic way to use agents for high-performance kernel authoring.

  • The paper gives several useful examples of algebraic reformulation, such as moving RMSNorm-related computation and pairwise activations into GEMM epilogues.

Weaknesses

  • The core idea of GEMM epilogue fusion is not new. For automatic fusion, related systems include Welder [1] and TorchInductor / torch.compile [2]. For manual GEMM epilogue programming, CUTLASS already provides rich custom epilogue mechanisms. The paper would be stronger if it more clearly explained what is new in CODA compared with these automatic fusion systems and manual epilogue programming libraries. In my view, the main novelty is less about epilogue fusion itself and more about making such fusion pattern easier for LLM agents to generate.

  • The agent component is not isolated enough. It is unclear how much of the success comes from the CODA abstraction, human intervention, or the specific LLM used. Since the agent-oriented design is a major motivation of the paper, the paper should better position CODA with respect to recent agentic kernel generation systems such as K-Search [3] and KernelEvolve [4]. In particular, it would be useful to discuss whether CODA can be integrated into such systems.

[1] Welder: Scheduling Deep Learning Memory Access via Tile-graph. OSDI 2023. https://www.usenix.org/system/files/osdi23-shi.pdf

[2] PyTorch 2: Faster Machine Learning Through Dynamic Python Bytecode Transformation and Graph Compilation. ASPLOS 2024. https://dl.acm.org/doi/10.1145/3620665.3640366

[3] K-Search: LLM Kernel Generation via Co-Evolving Intrinsic World Model. arXiv 2602.19128. https://arxiv.org/pdf/2602.19128

[4] KernelEvolve: Scaling Agentic Kernel Coding for Heterogeneous AI Accelerators at Meta. arXiv 2512.23236. https://arxiv.org/pdf/2512.23236

Questions
  1. How much human intervention is involved in the CODA (LLM) kernels? Please clarify the number of agent iterations, manual edits, failed attempts, and whether the same prompts/examples were sufficient for all kernels.

  2. Which part is most important for LLM generation: the fixed GEMM mainloop, the epilogue primitive set, the curated examples, or the implementation tips? An ablation would make the agent-related claim more convincing.

  3. How does CODA differ from existing automatic fusion systems such as Welder and TorchInductor / torch.compile, as well as manual GEMM epilogue programming libraries such as CUTLASS examples? Is the main contribution expressiveness, performance, programmability, or LLM-agent usability?

  4. Could the authors discuss how CODA can be integrated with recent agentic kernel-generation systems such as K-Search and KernelEvolve? For example, can CODA serve as a restricted action space, DSL, or backend target for these systems, rather than requiring the agent to generate arbitrary CUDA/Triton/CuTeDSL kernels?

  5. Are CODA's patterns and primitives designed to be friendly to megakernel systems, where larger computation regions are fused into a single kernel? If so, how would CODA be integrated into such systems, and what are the main constraints?

Limitations

yes

Paper formatting concerns

none

Final justification

The additional experiments strengthen the evaluation by comparing against packed projections and Liger and by isolating the contribution of the final block. After reconsidering CODA’s broader coverage of full Transformer training, including both forward and backward computation, together with the full-model results, I raised my score from 3 to 4.

Comments on the paper

1 comment
Meta-review

The paper presents an abstraction for kernel fusion of Transformer's memory-bound operations into GEMM epilogues. The algebraic reformulations and constrained programming interface are potentially useful, especially for backward pass operators and LLM assisted kernel authoring. However, the current evaluation does not yet convincingly establish that the microbenchmark gains translate into meaningful end-to-end training improvements, and the novelty relative to existing epilogue and fusion systems remains unclear. For the rebuttal, the authors probably should aim to address, but not limtied to, the following issues. First, clarify CODA's specific contribution relative to CUTLASS/EVT-style epilogues and compiler-based fusion systems such as TorchInductor and Welder. Is the novelty the supported reparameterizations, the constrained abstraction, its programmability, or its suitability for LLM generation? Second, provide evidence or a convincing analysis of end-to-end impact at the Transformer-layer or training-step level, including any costs from auxiliary reductions and remaining kernel boundaries. Third, clarify the LLM-authoring methodology, including human intervention, failed attempts, prompts, and whether CODA improves generation reliability or performance compared with less constrained kernel generation approaches. The rebuttal should also consider explaining whether the benefits persist in the FP8/FP4 regimes used to motivate the work, or narrow that motivation if these regimes were not evaluated.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.