potentialpaper

CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programs

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

NeurIPS 2026

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

TL;DR. CODA reparameterizes much of Transformer computation as GEMM epilogues, reducing memory-bound overhead while preserving GEMM efficiency. Its constrained abstraction supports high-performance kernels authored by both humans and LLMs.

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.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

DateVersionSubmitted toPDFEvidence
4 May 2026NeurIPS 2026submittedNeurIPS 2026Accept (poster)reviews ↓[1]PDF[1]
Missing a version?

NeurIPS 2026

Accept (poster) · 3 reviews · OpenReview

Updated 25 Nov 2026, 03:44 UTC.

Program Chairs · DecisionOpenReview ↗
Decision
Accept (poster)
Read decision
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.

Final justification

I have read the authors' response and subsequent discussion. The rebuttal substantially strengthens the paper. As also noted by Reviewers ZdzB and 6FiL, the new e2e model forward-plus-backward experiments show that CODA's gains hold over strong torch.compile and Liger baselines, and the profiling results better support the claimed reduction in memory bound overhead. Reviewer QoCw also found the broader Transformer training scope and revised positioning helpful to raise the score. While the technical originality remains moderate, I find the strengthened end-to-end evidence sufficient for acceptance.

Area Chair scka · Meta-reviewOpenReview ↗
Read meta-review
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.

Final justification

I have read the authors' response and subsequent discussion. The rebuttal substantially strengthens the paper. As also noted by Reviewers ZdzB and 6FiL, the new e2e model forward-plus-backward experiments show that CODA's gains hold over strong torch.compile and Liger baselines, and the profiling results better support the claimed reduction in memory bound overhead. Reviewer QoCw also found the broader Transformer training scope and revised positioning helpful to raise the score. While the technical originality remains moderate, I find the strengthened end-to-end evidence sufficient for acceptance.

2 comments
Authors · CommentOpenReview ↗

Response

Thank you for the detailed review, and apologies for the delayed response. We only recently realized that authors were expected to respond directly to AC reviews. Given the extensive reviewer discussion, this is also a useful opportunity to summarize our main clarifications and preliminary results.


Preliminary full-model evaluation

Following the reviews, we integrated CODA into TorchTitan and evaluated the complete forward and backward passes of a LLaMA-3-style 1B model on one H100 with 32K tokens. The experiment excludes optimizer execution, data loading, and communication, so we describe it as a full-model forward-and-backward benchmark rather than full training-step throughput.

Method Latency (ms) TFLOP/s MFU Peak memory (GiB) Latency overhead vs. CODA CODA memory saving
PyTorch + torch.compile 531.6 556.3 56.2% 48.7 5.5% 24.7%
Liger + cross-entropy 531.5 556.5 56.2% 48.9 5.5% 24.9%
CODA 503.9 586.9 59.3% 36.7 - -

CODA’s gains are measured against strong, highly optimized baselines. Liger performs similarly to torch.compile in this setting, suggesting that CODA provides additional gains beyond conventional fused-kernel libraries and compiler fusion.

Preliminary ablation 1: Memory-matched comparison

CODA explicitly selects which tensors to save or recompute, while torch.compile makes this decision automatically. We therefore tweaked the PyTorch compiler toward CODA’s memory usage to obtain a memory-matched comparison. We also evaluated Liger with fused linear cross-entropy (FLCE), which exposes a latency-memory trade-off through its chunk count.

Method Latency (ms) TFLOP/s MFU Peak memory (GiB) Latency overhead vs. CODA CODA memory saving
PyTorch, memory-matched 535.7 552.1 55.8% 36.9 6.3% 0.5%
Liger + FLCE, 2 chunks 531.7 556.2 56.2% 45.3 5.5% 19.0%
Liger + FLCE, 4 chunks 532.8 555.1 56.1% 43.8 5.7% 16.2%
CODA 503.9 586.9 59.3% 36.7 - -

Encouraging PyTorch to recompute more closes the memory gap, but further increases latency. Tuned FLCE also narrows Liger’s memory gap. CODA therefore remains on the Pareto frontier of the latency-memory trade-off.

Preliminary ablation 2: Packed projections

The PyTorch baseline follows the original implementation, while CODA uses packed projections to simplify the surrounding fusion. To determine whether this difference confounds the comparison, we also evaluated a packed PyTorch implementation.

Method Latency (ms) TFLOP/s MFU Peak memory (GiB) Latency change vs. PyTorch
PyTorch + torch.compile 531.6 556.4 56.2% 48.7 -
PyTorch + torch.compile, packed 533.7 554.2 56.0% 51.2 0.4%

At 32K tokens, these projections are largely compute-bound, so packing provides little performance benefit. Projection packing therefore does not explain CODA’s gains.

Preliminary ablation 3: Final block and cross-entropy

To estimate the contribution of cross-entropy, we replaced the entire final CODA block with its PyTorch implementation. Isolating cross-entropy alone is difficult because CODA algebraically couples the loss, LM-head projection, final RMSNorm, and their backward reductions.

Method Latency (ms) TFLOP/s MFU Peak memory (GiB) Speedup vs. PyTorch
CODA 503.9 586.9 59.3% 36.7 5.49%
CODA, final block in PyTorch 510.4 579.5 58.6% 37.4 4.15%

The optimized final block contributes meaningfully to latency, but accounts for only a small fraction of CODA’s total memory reduction. The remaining Transformer blocks therefore explain many of the improvement.

Authors · CommentOpenReview ↗

Response (continued)

Preliminary kernel breakdown

The gains primarily come from eliminating standalone memory-bound kernels and intermediate tensor materialization. The following separate profiling run reports execution time and kernel-launch counts by category.

Bucket PyTorch + torch.compile (ms) CODA (ms) Delta (ms) PyTorch launches CODA launches
GEMM 337.7 349.2 11.6 371.0 195.0
Attention 137.7 141.2 3.5 96.0 96.0
Other memory-bound operations 57.7 15.4 -42.4 710.0 438.0
Total 533.1 505.8 -27.3 1177.0 729.0

CODA reduces standalone memory-bound time from 57.7 ms to 15.4 ms. These savings more than offset the additional time attributed to GEMM and attention. Auxiliary reductions requiring cross-tile coordination remain separate kernel boundaries, and their costs are included in the measurements.


Preliminary FP8 evaluation

Faster low-precision GEMMs can make surrounding memory-bound operations account for a larger fraction of runtime. We therefore evaluated GEMM + SwiGLU in BF16 and FP8 with (M=32K) and hidden dimensions of 2K, 4K, and 8K.

The FP8 PyTorch implementation uses fast accumulation and tensor-wise scaling by passing two separate scalar input scales (for each of the arguments) to scaled_mm. CODA combines these scales in advance and applies one scalar in the fused SwiGLU epilogue.

Hidden dimension BF16 speedup FP8 speedup
2048 1.16x 1.31x
4096 1.07x 1.16x
8192 1.05x 1.08x

These results provide preliminary evidence that CODA’s benefits persist in FP8 microbenchmarks, particularly at smaller hidden dimensions. They do not, however, establish end-to-end FP8 training gains.


Novelty relative to existing systems

We acknowledge precedent in epilogue fusion, individual algebraic rewrites, and AI-assisted kernel authoring.

CODA’s contribution is a systematic methodology for Transformer training: it transforms coupled forward and backward computations, including their reductions, into high-performance GEMM-plus-epilogue programs while retaining tuned GEMM mainloops. CUTLASS and EVT provide mechanisms for computations already expressed as GEMM epilogues, while TorchInductor and Welder primarily optimize a given computation graph. CODA instead changes the algebraic form of the training computation to create new epilogue opportunities.

These transformations are exposed through a restricted Python/CuTeDSL interface that is directly programmable by both humans and LLMs. Our full-model results show that this approach improves forward-and-backward performance. More broadly, CODA points toward training infrastructure built around systematic reparameterizations and a small set of reusable, high-performance primitives rather than bespoke kernels.


Clarification on LLM-assisted kernel authoring

CODA is more of a programming substrate than a kernel-generation system. We used Claude Code interactively: humans provided algebraic reparameterizations and schedule-sensitive decisions, while the LLM implemented and refined epilogue programs. Because this repository-level workflow was iterative, counts of prompts, failures, and manual edits depend heavily on how sessions are segmented and do not cleanly isolate CODA’s contribution. We therefore avoid claiming a controlled reliability or performance advantage over unrestricted kernel generation. Our narrower claim is that CODA enables both humans and LLMs to produce competitive kernels.

Our post-submission effort to consolidate the strongest implementations further suggests that CODA’s restricted action space makes LLM-authored kernels easier to inspect and review than large, unconstrained low-level kernels. CODA could also serve as a restricted action space or backend target for broader agentic kernel-generation systems.

Reviewer 6FiLOpenReview ↗
Rating
4/6
Confidence
3/5
Quality
3/4
Clarity
2/4
Significance
3/4
Originality
2/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
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

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.

Formatting concerns

No paper formatting concerns.

5 comments
Authors · CommentOpenReview ↗

Response

Thank you for the thoughtful review.


W1/Q1: CODA vs. EVT

We agree that this distinction should be clearer. CODA does not claim that individual epilogues are more expressive than EVT. EVT provides general machinery for implementing computation already expressible around a GEMM. CODA instead focuses on algebraically reparameterizing larger forward and backward graphs into GEMM-plus-epilogue programs, creating fusion opportunities absent from the original graph.

For example, CODA moves RMSNorm scaling and backward reductions across neighboring GEMMs. It then exposes the resulting programs through a restricted Python/CuTeDSL interface with a fixed GEMM mainloop. Although less general than arbitrary EVT or CUDA programs, this interface covers most non-attention Transformer computation and provides a smaller programming space for humans and LLMs. We will clarify this distinction and cite EVT more prominently.


Q2: Preliminary end-to-end experiments

Since submission, we have integrated CODA into TorchTitan and evaluated the complete forward and backward pass of a LLaMA-3-style 1B model on one H100.

We use 32K tokens per iteration, organized as four 8K-token microbatches, with BF16 computation. The experiment excludes data loading, optimizer execution, and distributed communication, directly measuring model forward and backward computation.

Both implementations use the same model and torch.compile settings: dynamic shapes disabled, fullgraph=True, and mode="max-autotune-no-cudagraphs". Both use FlashAttention-3. To strengthen the baseline, we additionally use a faster RoPE implementation and remove TorchTitan’s extra FP32 cast of the materialized logits before cross-entropy. CODA does not require this cast because its fused loss kernel performs numerically sensitive computation, including log-sum-exp, in FP32; we therefore remove the cast from the baseline as well to avoid giving CODA an artificial advantage.

Our TFLOP/s and MFU use a modified TorchTitan FLOP formula that accounts for causal attention. Range is (max − min) / mean across the 5 runs.

Name Mean (ms) Range TFLOP/s MFU Peak (GiB)
PyTorch Compile 534.7 0.3% 553.2 55.9% 51.5
CODA 506.7 0.2% 583.7 59.0% 39.5
Delta −5.2% +5.5% +3.1 pts

Q3: Source of the gains

The gains primarily come from eliminating standalone memory-bound kernels and intermediate tensor materialization. Although CODA performs additional work inside GEMM epilogues, the full computation transfers fewer activation-sized tensors through HBM and launches fewer kernels.

The following separate profiling run reports time and kernel-launch counts by category:

Bucket PyTorch Compile (ms) CODA (ms) Delta PyTorch launches CODA launches
GEMM 337.7 349.2 +11.6 371 195
Attention 137.7 141.2 +3.5 96 96
Others 57.7 15.4 −42.4 710 438
Total 533.1 505.8 −27.3 1177 729

CODA reduces standalone memory-bound time by 73.4% (57.7 -> 15.4 ms) and the corresponding launch count by 38.3% (710 -> 438). The 42.4 ms saved outweighs the 15.0 ms added in fused GEMM epilogues and attention by 2.8x, for a net 27.3 ms (5.4%) reduction in step time.

The GEMM launch-count difference partly arises because the baseline uses separate Q, K, and V projections and separate gate and up projections. cuBLAS may also use Split-K cleanup kernels, which we count as GEMM-related launches.

Attention is algorithmically identical in both implementations. Its small slowdown under CODA appears to be an execution-environment effect, potentially because the additional fused work changes GPU power or clock behavior. In separate measurements with locked GPU clocks, the difference largely disappears. We nevertheless report the unlocked measurements to reflect typical execution settings.

Authors · CommentOpenReview ↗

Response (Continued)

Preliminary FP8 experiments

As motivated in the introduction, memory-bound overhead becomes relatively more important as lower-precision GEMMs become faster. We therefore evaluated GEMM + SwiGLU in BF16 and FP8 with M=32K and hidden dimensions of 2K, 4K, and 8K.

The FP8 baseline uses fast accumulation and tensor-wise scaling by passing two scalar input scales to PyTorch scaled_mm. CODA combines these scales in advance and applies one scalar in the fused SwiGLU epilogue.

size BF16 speedup FP8 speedup
2048 1.16x 1.31x
4096 1.07x 1.16x
8192 1.05x 1.08x

At 2K and 4K, CODA’s advantage increases under FP8 because the faster GEMM makes the surrounding memory-bound work relatively more expensive. At 8K, the workload remains GEMM-dominated, so the BF16 and FP8 speedups are similar.

Full FP8 training additionally requires dynamic scaling and quantization throughout the training stack. We could not complete this integration during the response period, but these operations are themselves natural candidates for CODA epilogues.


Q4: LLM vs. human kernels

Our experience suggests that LLMs are strong at algebraic reasoning and composing epilogue semantics, while humans remain stronger at schedule-sensitive decisions.

For example, the LLM used RoPE’s orthogonality to recognize that the RMSNorm-backward inner product can be accumulated directly in the rotated space. This removes an intermediate tensor and a separate memory-bound kernel. Conversely, an earlier LLM-generated SwiGLU kernel used a slower sigmoid evaluation, while the improved human version used a faster approximation and better staging.

Since submission, we have combined the best human- and LLM-authored implementations rather than maintaining separate tracks. We will add these examples to clarify their complementary strengths.

Authors · CommentOpenReview ↗

Follow up

Thank you again for your feedback! As the discussion period draws to a close, we would appreciate hearing whether our updated experiments have addressed some of your questions.

Speaking of which, we have also conducted several additional experiments to better isolate the sources of the improvements reported in our previous response. These include examining the effect of packed projections, evaluating the contribution of the final block and cross-entropy, and adding full-model forward-and-backward results for Liger. We report highlights from these preliminary results below. Overall, they indicate that CODA’s improvements persist against strong, highly optimized baselines.

name mean ms TFLOP/s MFU peak GiB
PyTorch + torch.compile 531.55 556.4 56.2% 48.74
PyTorch + torch.compile + packed 533.66 554.2 56.0% 51.24
Liger 531.58 556.4 56.2% 48.87
CODA, final block in PyTorch 510.36 579.5 58.6% 37.37
CODA 503.88 586.9 59.3% 36.71
Reviewer ZdzBOpenReview ↗
Rating
4/6
Confidence
4/5
Quality
3/4
Clarity
3/4
Significance
3/4
Originality
2/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
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

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!

Formatting concerns

No

8 comments
Authors · CommentOpenReview ↗

Response

Thank you for the constructive feedback.


W1: Mathematical novelty and FlashNorm

Thank you for pointing us to FlashNorm. We will cite and discuss it.

We agree that the individual RMSNorm identities are standard. FlashNorm introduces additional transformations, including norm-weight folding and RMS cancellation, that could further expand the models and normalization patterns expressible as GEMM-plus-epilogue programs.

CODA’s contribution is not any single identity, but the systematic reparameterization and implementation of a broad set of forward and backward Transformer computations through a common epilogue-centric abstraction. We will investigate incorporating FlashNorm-style transformations to broaden CODA’s coverage.


W2 / Q1: Preliminary end-to-end experiments

Figure 11 already evaluates a complete reparameterized Transformer block. Since submission, we have also integrated CODA into TorchTitan and evaluated the complete forward and backward pass of a LLaMA-3-style 1B model on one H100.

We use 32K tokens per iteration, organized as four 8K-token microbatches, with BF16 computation. The experiment excludes data loading, optimizer execution, and distributed communication, directly measuring model forward and backward computation.

Both implementations use the same model and torch.compile settings: dynamic=False, fullgraph=True, and mode="max-autotune-no-cudagraphs". Both use FlashAttention-3. To strengthen the baseline, we additionally use a faster RoPE implementation and remove TorchTitan’s extra FP32 cast of materialized logits before cross-entropy. CODA does not need this cast because its fused loss kernel computes numerically sensitive intermediates, including log-sum-exp, in FP32; we remove it from the baseline as well to avoid giving CODA an artificial advantage.

Our TFLOP/s and MFU use a modified TorchTitan FLOP formula that accounts for causal attention. Range is (max − min) / mean across the 5 runs.

Name Mean (ms) Range TFLOP/s MFU Peak (GiB)
PyTorch Compile 534.7 0.3% 553.2 55.9% 51.5
CODA 506.7 0.2% 583.7 59.0% 39.5
Delta −5.2% +5.5% +3.1 pts

The following separate profiling run reports time and kernel-launch counts by category:

Bucket PyTorch Compile (ms) CODA (ms) Delta PyTorch launches CODA launches
GEMM 337.7 349.2 +11.6 371 195
Attention 137.7 141.2 +3.5 96 96
Others 57.7 15.4 −42.4 710 438
Total 533.1 505.8 −27.3 1177 729

CODA reduces standalone memory-bound time by 73.4% (57.7 -> 15.4 ms) and the corresponding launch count by 38.3% (710 -> 438). The 42.4 ms saved outweighs the 15.0 ms added in fused GEMM epilogues and attention by 2.8x, for a net 27.3 ms (5.4%) reduction in step time.

The GEMM launch-count difference partly arises because the baseline uses separate Q, K, and V projections and separate gate and up projections. cuBLAS may also use Split-K cleanup kernels, which we count as GEMM-related launches.

Attention is algorithmically identical in both implementations. Its small slowdown under CODA appears to be an execution-environment effect, potentially because additional fused work affects GPU power or clock behavior. In separate measurements with locked GPU clocks, the difference largely disappears. We nevertheless report unlocked measurements to reflect typical execution settings.

We will add these end-to-end results and the full methodology to the revision.


W3 / Q2: Preliminary FP8 experiments

As motivated in the introduction, FP8 accelerates GEMMs, causing surrounding memory-bound operations to account for a larger fraction of runtime. We evaluated GEMM + SwiGLU in BF16 and FP8 using M=32K and hidden dimensions of 2K, 4K, and 8K. The FP8 baseline uses fast accumulation and tensor-wise scaling by passing two scalar input scales to PyTorch scaled_mm. CODA combines these scales in advance and applies one scalar in the fused SwiGLU epilogue.

size BF16 speedup FP8 speedup
2048 1.16x 1.31x
4096 1.07x 1.16x
8192 1.05x 1.08x

At 2K and 4K, CODA’s advantage increases under FP8 because surrounding memory-bound work becomes relatively more expensive. At 8K, the workload remains GEMM-dominated, so the BF16 and FP8 speedups are similar.

Full FP8 training additionally requires dynamic scaling and quantization throughout the stack. We could not complete this integration during the response period, but these operations present further opportunities for CODA epilogues.

We do not yet report NVFP4 because it requires Blackwell hardware, while CODA currently targets Hopper. We plan to add Blackwell support in the near future.

Authors · CommentOpenReview ↗

Response (Continued)

W4 / Q3: Benchmark presentation

Thank you for pointing out these issues and for the helpful suggestions. We agree that the current figures are too dense, and we will improve their readability and add tables.

Reviewer ZdzB · CommentOpenReview ↗

Thank you for the new results. A few clarifications, remaining questions, and additional concerns.

  1. Figure 11 vs. end-to-end.

I disagree that Figure 11 already answered the e2e concern. As described in the paper, Figure 11 benchmarks reparameterized non-attention GEMM sequences. It does not include attention or a full-model training step. The new TorchTitan experiment is the first result that directly addresses this. But still thanks for your recap.

  1. What the new experiment shows.

The LLaMA-3 1B F+B comparison is useful. The ~5.2% latency reduction, ~23% peak-memory reduction, and the profiling breakdown support the paper: gains come from memory-bound standalone kernels, not from making GEMM/Attention faster. This also explains why speedups are diluted once attention and the surrounding stack are included, exactly the things I was concerned about.


  1. Remaining gaps.
  • First, I agree that additionally requiring optimizer, data loading, etc. may be asking too much beyond the new result. The reported model F+B measurement is already a substantial improvement over the submission. Please state this scope clearly in the revision so readers do not interpret the ~5% number as full training-step throughput. The speedup itself is modest, but the peak memory reduction is good.

  • Second, based on your response:

The GEMM launch-count difference partly arises because the baseline uses separate Q, K, and V projections and separate gate and up projections. cuBLAS may also use Split-K cleanup kernels, which we count as GEMM-related launches.

Please clarify whether fused vs. separate QKV projections are equalized between baseline and CODA. Otherwise, some of the differences may not be attributable to epilogue reparameterization alone.
  • Third, for FP8, the GEMM+SwiGLU help, but they are still not e2e FP8 training. The trend at smaller hidden sizes is consistent with the claimed motivation; I also appreciate the clarification on NVFP4 and Hopper vs Blackwell. That said, this remains a single-kernel result rather than e2e FP8 training evidence. Given your explanation that full FP8 integration could not be completed during the rebuttal period, I do not view this as a blocking requirement for the revision. Instead, I would suggest softening the introduction's FP8/FP4 framing and treating fuller FP8 (and later FP4) e2e evaluation as future work. Optionally, with the current microbenchmarks retained as supporting preliminary evidence.

Additional concerns on the rebuttal evidence:

  • The new e2e comparison against torch.compile + FA3 is useful and should be kept. Since the submission already positions against Liger (and related fused kernels), an additional e2e comparison (e.g., Liger under the same TorchTitan / FA3 setup) would better establish CODA's incremental value beyond existing fused-kernel libraries.
  • The peak-memory reduction is notable, but would it come from the fused cross-entropy loss (which never stores the full logits), rather than from fusing RMSNorm/residual into the GEMM epilogue? Could you break this down? Please break down how much memory and time saving comes from fused loss vs. the broader RMSNorm/residual epilogue reparameterizations.
Reviewer QoCwOpenReview ↗
Rating
4/6
Confidence
5/5
Quality
3/4
Clarity
3/4
Significance
2/4
Originality
2/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
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

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.

Formatting concerns

none

6 comments
Authors · CommentOpenReview ↗

Response

Thank you for the thoughtful review. We agree that the paper should better distinguish CODA from prior fusion systems and clarify the role of LLMs.


W1 / Q3: Novelty and positioning

We agree that GEMM epilogue fusion itself is established in CUTLASS, Welder, and TorchInductor. CODA instead contributes at two levels.

First, Welder and TorchInductor optimize a given computation graph, whereas CODA algebraically reparameterizes forward and backward computations to create fusion opportunities absent from the original graph. For example, CODA moves RMSNorm scaling and backward reductions across neighboring GEMMs.

Second, CUTLASS provides general custom-epilogue mechanisms, while CODA exposes a restricted Python interface around a fixed high-performance GEMM mainloop. CODA is not more expressive at the level of an individual epilogue; its contributions are graph-level reparameterization and a smaller programming space for humans and coding agents.

We will clarify that CODA’s novelty is reparameterization and epilogue-centric programmability, not epilogue fusion alone, and cite these works.


Q1 / Q2: Human-LLM workflow

We agree that the current presentation may suggest an autonomous-agent evaluation. This is not our intent: CODA is a programming substrate, not a new kernel-agent system. The human- and LLM-authored results test whether the same abstraction enables both to produce competitive kernels without reimplementing the GEMM mainloop.

We use Claude Code in an interactive repository-level workflow. Prompt counts, manual edits, and failed attempts therefore depend heavily on how an evolving development session is segmented and do not cleanly isolate CODA’s contribution. More fundamentally, the fixed mainloop removes fragile scheduling work, the primitive set constrains the implementation space, and examples communicate performance conventions. Humans typically contribute reparameterizations and scheduling judgment, while LLMs help implement, explore, and optimize epilogues.

We will clarify this workflow and the role of each component. Since submission, we have consolidated the best human- and LLM-authored kernels into a single CODA implementation, which better reflects its intended use.


Preliminary end-to-end evaluations

We integrated CODA into TorchTitan and evaluated the forward and backward pass of a LLaMA-3-style 1B model on one H100.

We use 32K tokens per iteration, organized as four 8K-token microbatches, with BF16 computation. The experiment excludes data loading, optimizer execution, and distributed communication, directly measuring model forward and backward computation.

Both implementations use the same model and torch.compile settings: dynamic=False, fullgraph=True, and mode="max-autotune-no-cudagraphs". Both use FlashAttention-3. To strengthen the baseline, we additionally use a faster RoPE implementation and remove TorchTitan’s extra FP32 cast of materialized logits before cross-entropy. CODA does not need this cast because its fused loss kernel performs numerically sensitive computation, including log-sum-exp, in FP32; we therefore remove it from the baseline as well to avoid giving CODA an artificial advantage.

Our TFLOP/s and MFU use a modified TorchTitan FLOP formula that accounts for causal attention. Range is (max − min) / mean across the 5 runs.

Name Mean (ms) Range TFLOP/s MFU Peak (GiB)
PyTorch Compile 534.7 0.3% 553.2 55.9% 51.5
CODA 506.7 0.2% 583.7 59.0% 39.5
Delta −5.2% +5.5% +3.1 pts

The following separate profiling run reports time and kernel-launch counts by category:

Bucket PyTorch Compile (ms) CODA (ms) Delta PyTorch launches CODA launches
GEMM 337.7 349.2 +11.6 371 195
Attention 137.7 141.2 +3.5 96 96
Others 57.7 15.4 −42.4 710 438
Total 533.1 505.8 −27.3 1177 729

CODA reduces standalone memory-bound time by 73.4% (57.7 -> 15.4 ms) and the corresponding launch count by 38.3% (710 -> 438). The 42.4 ms saved outweighs the 15.0 ms added in fused GEMM epilogues and attention by 2.8x, for a net 27.3 ms (5.4%) reduction in step time.

The GEMM launch-count difference partly arises because the baseline uses separate Q, K, and V projections and separate gate and up projections. cuBLAS may also use Split-K cleanup kernels, which we count as GEMM-related launches.

Attention is algorithmically identical in both implementations. Its small slowdown under CODA appears to be an execution-environment effect, potentially because the additional fused work affects GPU power or clock behavior. In separate measurements with locked GPU clocks, the difference largely disappears. We nevertheless report unlocked measurements to reflect typical execution settings.

Authors · CommentOpenReview ↗

Response (Continued)

Preliminary FP8 evaluations

As motivated in the introduction, FP8 accelerates GEMMs, causing surrounding memory-bound operations to account for a larger fraction of runtime. We therefore evaluated GEMM + SwiGLU in BF16 and FP8 using M=32K and hidden dimensions of 2K, 4K, and 8K. The FP8 baseline uses fast accumulation and tensor-wise scaling by passing two scalar input scales to PyTorch scaled_mm. CODA combines these scales in advance and applies one scalar in the fused SwiGLU epilogue.

size BF16 speedup FP8 speedup
2048 1.16x 1.31x
4096 1.07x 1.16x
8192 1.05x 1.08x

At 2K and 4K, CODA’s advantage increases under FP8 because surrounding memory-bound work becomes relatively more expensive. At 8K, the workload remains GEMM-dominated, so the BF16 and FP8 speedups are similar.

Full FP8 training additionally requires dynamic scaling and quantization throughout the stack. We could not complete this integration during the response period, but these operations present further opportunities for CODA epilogues.


W2 / Q4: Relationship to K-Search and KernelEvolve

CODA is complementary to K-Search and KernelEvolve. K-Search focuses on planning and searching over kernel optimizations, while KernelEvolve combines execution-guided search and retrieval across programming abstractions and hardware targets.

CODA could provide either system with a restricted, high-performance target for GEMM-centric workloads: the agent would search over reparameterizations and epilogue programs rather than generate an entire CUDA, Triton, or CuTeDSL kernel. We will cite and discuss both works.


Q5: Megakernels

CODA is compatible with megakernel systems, although the current implementation does not schedule multiple GEMMs within one kernel.

A megakernel compiler could treat each CODA GEMM-plus-epilogue program as a region-level primitive. Tile-local maps and reductions transfer naturally; the main challenges are cross-GEMM synchronization, global reductions, layout compatibility, and shared-memory and register pressure.

We will clarify this scope and cite relevant megakernel work.

Authors · CommentOpenReview ↗

Follow up

Hi, and thank you again for your comments! This is a gentle reminder that the discussion period closes in about a day. We would appreciate hearing whether our updated response has addressed your questions.

We have also conducted several additional experiments to better isolate the sources of the improvements reported in our previous response. These include examining the effect of packed projections, evaluating the contribution of the final block and cross-entropy, and adding full-model forward-and-backward results for Liger. We report highlights from these preliminary results below. Overall, they indicate that CODA’s improvements persist against strong, highly optimized baselines.

name mean ms TFLOP/s MFU peak GiB
PyTorch + torch.compile 531.55 556.4 56.2% 48.74
PyTorch + torch.compile + packed 533.66 554.2 56.0% 51.24
Liger 531.58 556.4 56.2% 48.87
CODA, final block in PyTorch 510.36 579.5 58.6% 37.37
CODA 503.88 586.9 59.3% 36.71

We have also thought further about your earlier question regarding kernel-generation systems. Our post-submission experience suggests that CODA’s restricted action space makes LLM-authored kernels easier for humans to inspect and review. Without such a restricted space, LLMs may generate large, low-level kernels that are difficult to review, particularly given the risks of reward hacking [1, 2]. This structure has helped us consolidate the strongest ideas from human- and LLM-authored implementations into a common CODA codebase.

[1] https://www.gpumode.com/news/reward-hacking-nvfp4
[2] https://deep-reinforce.com/defense_kernel_hack.html

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

Missing a submission?

Loading the discussion…