CUDABench: Benchmarking LLMs for Text-to-CUDA Generation
Jiace Zhu, Wentao Chen, Qi Fan, Zhixing Ren, Junying Wu, Xing Zhe Chai, Chotiwit Rungrueangwutthinon, Yehan Ma, An Zou
NeurIPS 2026
TL;DR. CUDABench introduces a text-to-CUDA benchmark and a roofline-based score to evaluate both the correctness and hardware efficiency of LLM-generated CUDA kernels.
Abstract. Recent studies have demonstrated the potential of Large Language Models (LLMs) in generating GPU kernels. Current benchmarks focus on the translation of high-level languages into CUDA, overlooking the more general and challenging task of text-to-CUDA generation. Furthermore, given the hardware-specific and performance-critical features of GPU programming, accurately assessing the performance of LLM-generated GPU programs is nontrivial. In this work, we introduce CUDABench, a comprehensive benchmark designed to evaluate the text-to-CUDA capabilities of LLMs. First, we construct CUDABench-Set, which covers Breadth-Depth-Difficulty evaluation space in diverse application domains, including artificial intelligence, scientific computing, and data analytics, etc. Furthermore, we propose CUDABench-Score and Generative Verification Pipeline that assess (1) compilation correctness, (2) functional consistency through execution-based verification, and (3) a novel roofline-based metric, Performance-Score. Benchmarking state-of-the-art LLMs reveals insightful findings and challenges of text-to-CUDA, such as a notable mismatch between high compilation success rates and low functional correctness, domain-dependent challenges in algorithm retrieval and synthesis, and limited roofline-normalized performance. Our benchmark is available at https://github.com/CUDA-Bench/CUDABench.
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 paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:50 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
Summary. CUDABench is a text-to-CUDA (from scratch, not code-to-code) benchmark: 500 tasks x 3 difficulty levels across 6 domains and 5 input scales, each with a data generator, validator, and reference kernel, plus an automated compile, execute, profile pipeline. Its headline metric, CUDABench-Score, is a roofline utilization ratio gated by compile and functional correctness. Findings: high compile but low functional correctness, an L3 domain knowledge collapse, and a near model independent ~40% utilization ceiling.
Reviewers agree the text-to-CUDA framing fills a real gap, the Breadth-Depth-Difficulty structure with per task generators/validators/references is valuable, and the compile-vs-functional gap and utilization findings are informative (DXjL, ggcB, 42sK). This is a use inspired benchmark paper and the informed reviewers applied the right lens.
For the paper to be strongly considered, the authors must convincingly address:
The metric design flaw (DXjL, related to 42sK). CUDABench-Score normalizes achieved performance by the candidate kernel's own measured arithmetic intensity, so a memory wasteful kernel gets an inflated ratio and an algorithmically suboptimal kernel that saturates hardware can score ~100% because wasted work is invisible; two correct implementations get different attainable bounds, which undercuts "hardware independent." Please add a fixed reference metric (e.g., speedup vs the reference kernel, KernelBench style), which is a recomputation over existing profiling data, and report whether model rankings stay stable. This is the decisive item. Interpretability anchor (DXjL). Run the paper's own reference kernels through the identical pipeline and report their CUDABench-Score, so "~40% utilization" has a no-LLM anchor. If references also sit near 40%, the number reflects the metric/tasks rather than model weakness and must be reworded. Missing overlapping prior/concurrent work (DXjL). ComputeEval and SOL-ExecBench overlap the central contributions (text-to-CUDA with references; roofline/speed-of-light metrics) and must be cited and contrasted. Contamination check (DXjL). Tasks come from CUDA Samples and popular repos, and L3 name-only prompts are the most exposed. Add a cheap memorization check on existing outputs (n-gram overlap or pass rate vs task popularity), since Finding 3 depends on L3 being synthesis rather than recall.
De-prioritized (not required): cross generation GPU (Hopper/Blackwell/RTX 5090) is a nice-to-have; MoE / dynamic-intensity handling and FP16/FP8/FP4 precision coverage (42sK) can be scoped as limitations rather than new experiments; specifying the tolerance policy and exact Nsight FLOP/byte counters is a documentation fix.
If items 1 through 4 are answered convincingly, especially if rankings survive a fixed reference metric, I would be prepared to move to accept. Please rebut any point you believe is factually wrong.
Final justification
CUDABench addresses a clear and growing need for rigorous, execution-based evaluation of LLM-generated GPU code. While my initial meta-review was a "Reject" pending major revisions, the authors provided an exceptional, highly rigorous rebuttal that successfully resolved all decisive concerns and elevated reviewer scores to Accept/Borderline Accept.
Key Rebuttal Resolutions:
- Metric Validity: Added a fixed-reference metric (
fast_1@k), proving model ranking stability remains highly consistent (Spearman’s ρ ≥ 0.857), mitigating concerns about the roofline metric being gamed. - Interpretability Anchor: Evaluated hand-written reference kernels through the pipeline (~33.5% score), proving the benchmark meaningfully distinguishes generation capability from top-tier models (~40%) and iterative refinement (~55%).
- Related Work: Clarified the distinct scope of CUDABench (text-to-CUDA from scratch) versus ComputeEval and SOL-ExecBench, committing to add the missing citations.
- Contamination Check: Conducted a robust n-gram overlap analysis showing Level 3 prompts have lower verbatim copying signals than Levels 1/2, confirming the benchmark evaluates synthesis, not memorization.
Remaining Considerations & Camera-Ready Expectations Reviewers correctly noted the practical limitations of the benchmark being restricted to FP32 and single-kernel generation. The authors have appropriately acknowledged this and agreed to explicitly state it as a limitation.
I recommend Accept, with the expectation that the authors will incorporate the promised camera-ready revisions: explicitly scoping the FP32/single-kernel limitations and moving critical methodological details (the fixed-reference ranking table, correctness gating logic, and numerical tolerance policies) into the main text for transparency.
Read meta-review
Meta-review
Summary. CUDABench is a text-to-CUDA (from scratch, not code-to-code) benchmark: 500 tasks x 3 difficulty levels across 6 domains and 5 input scales, each with a data generator, validator, and reference kernel, plus an automated compile, execute, profile pipeline. Its headline metric, CUDABench-Score, is a roofline utilization ratio gated by compile and functional correctness. Findings: high compile but low functional correctness, an L3 domain knowledge collapse, and a near model independent ~40% utilization ceiling.
Reviewers agree the text-to-CUDA framing fills a real gap, the Breadth-Depth-Difficulty structure with per task generators/validators/references is valuable, and the compile-vs-functional gap and utilization findings are informative (DXjL, ggcB, 42sK). This is a use inspired benchmark paper and the informed reviewers applied the right lens.
For the paper to be strongly considered, the authors must convincingly address:
The metric design flaw (DXjL, related to 42sK). CUDABench-Score normalizes achieved performance by the candidate kernel's own measured arithmetic intensity, so a memory wasteful kernel gets an inflated ratio and an algorithmically suboptimal kernel that saturates hardware can score ~100% because wasted work is invisible; two correct implementations get different attainable bounds, which undercuts "hardware independent." Please add a fixed reference metric (e.g., speedup vs the reference kernel, KernelBench style), which is a recomputation over existing profiling data, and report whether model rankings stay stable. This is the decisive item. Interpretability anchor (DXjL). Run the paper's own reference kernels through the identical pipeline and report their CUDABench-Score, so "~40% utilization" has a no-LLM anchor. If references also sit near 40%, the number reflects the metric/tasks rather than model weakness and must be reworded. Missing overlapping prior/concurrent work (DXjL). ComputeEval and SOL-ExecBench overlap the central contributions (text-to-CUDA with references; roofline/speed-of-light metrics) and must be cited and contrasted. Contamination check (DXjL). Tasks come from CUDA Samples and popular repos, and L3 name-only prompts are the most exposed. Add a cheap memorization check on existing outputs (n-gram overlap or pass rate vs task popularity), since Finding 3 depends on L3 being synthesis rather than recall.
De-prioritized (not required): cross generation GPU (Hopper/Blackwell/RTX 5090) is a nice-to-have; MoE / dynamic-intensity handling and FP16/FP8/FP4 precision coverage (42sK) can be scoped as limitations rather than new experiments; specifying the tolerance policy and exact Nsight FLOP/byte counters is a documentation fix.
If items 1 through 4 are answered convincingly, especially if rankings survive a fixed reference metric, I would be prepared to move to accept. Please rebut any point you believe is factually wrong.
Final justification
CUDABench addresses a clear and growing need for rigorous, execution-based evaluation of LLM-generated GPU code. While my initial meta-review was a "Reject" pending major revisions, the authors provided an exceptional, highly rigorous rebuttal that successfully resolved all decisive concerns and elevated reviewer scores to Accept/Borderline Accept.
Key Rebuttal Resolutions:
- Metric Validity: Added a fixed-reference metric (
fast_1@k), proving model ranking stability remains highly consistent (Spearman’s ρ ≥ 0.857), mitigating concerns about the roofline metric being gamed. - Interpretability Anchor: Evaluated hand-written reference kernels through the pipeline (~33.5% score), proving the benchmark meaningfully distinguishes generation capability from top-tier models (~40%) and iterative refinement (~55%).
- Related Work: Clarified the distinct scope of CUDABench (text-to-CUDA from scratch) versus ComputeEval and SOL-ExecBench, committing to add the missing citations.
- Contamination Check: Conducted a robust n-gram overlap analysis showing Level 3 prompts have lower verbatim copying signals than Levels 1/2, confirming the benchmark evaluates synthesis, not memorization.
Remaining Considerations & Camera-Ready Expectations Reviewers correctly noted the practical limitations of the benchmark being restricted to FP32 and single-kernel generation. The authors have appropriately acknowledged this and agreed to explicitly state it as a limitation.
I recommend Accept, with the expectation that the authors will incorporate the promised camera-ready revisions: explicitly scoping the FP32/single-kernel limitations and moving critical methodological details (the fixed-reference ranking table, correctness gating logic, and numerical tolerance policies) into the main text for transparency.
- Rating
- 4/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 2/4
- Originality
- 3/4
- Contribution type
- use_inspired
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper introduces CUDABench, a benchmark designed to evaluate LLMs on text-to-CUDA code generation across diverse GPU computing domains, varying tensor dimensions, and different prompt difficulties. Benchmarking across multiple commercial LLMs reveals that while compilation success rates are relatively high, actual functional correctness and hardware resource utilization remain low.
Strengths and weaknesses
I thank the authors for submitting their interesting work to NeurIPS. While the topic is interesting, I have a few concerns and constructive suggestions to improve the manuscript.
- Weak Contribution
The technical novelty is limited, as the core analysis relies on a trivial, well-established compute-memory roofline model. Additionally, the evaluation lacks achieved scores with industry-standard, human-optimized kernels (e.g., cuBLAS) or advanced compiler frameworks like Triton.
- Missing Important Factors
The analysis overlooks critical CUDA-specific optimization factors, such as the impact of varying data types and fused kernel implementations.
- Limitations under Non-Deterministic Workloads
The proposed roofline analysis appears to only be applicable to relatively static, deterministic execution profiles. How does the framework handle non-deterministic algorithms where data-dependent execution paths alter operational intensity? Specifically, can this roofline model support MoE routing logic, where the computational intensity is fundamentally determined at runtime by the input?
Questions
- How is the correctness of the prompts verified? Does the framework rely purely on manual human inspection?
- How is functional consistency validated when floating-point precision errors and numerical divergence are bound to occur?
- How does the framework support different data precisions (e.g., FP16, MX-FP8, NV-FP4)?
- How does the benchmark calculate roofline scores for workloads with dynamic memory access or runtime-determined sparsity (e.g., MoE, sparse attention), where operational intensity cannot be statically determined?
Limitations
yes
Final justification
The rebuttal addressed most of my clarification-related concerns. My main remaining concern is the limited practical scope of the benchmark, particularly its FP32-only and single-kernel evaluation.
Overall, I think the paper has a solid foundation, and the rebuttal clarified several of my concerns. I am therefore raising my overall rating from (3: Borderline Reject) to (4: Borderline Accept). However, given the remaining limitations in practical scope, I would not strongly champion the paper.
My revised scores:
Quality: 3
Clarity: 2 -> 3, due to the clarifications in the rebuttal
Significance: 2
Originality: 2 -> 3, due to use-inspired contribution
Confidence: 4
Overall Rating: 3 -> 4, due to the clarifications in the rebuttal
Formatting concerns
N/A
1 comment
- Rating
- 5/6
- Confidence
- 1/5
- Quality
- 3/4
- Clarity
- 4/4
- Significance
- 4/4
- Originality
- 3/4
- Contribution type
- use_inspired
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The CUDABench benchmark introduced in this paper contains 500 CUDA tasks, each instantiated at three prompt difficulty levels, yielding 1,500 evaluation instances. Tasks span six GPU-computing domains, including deep learning operators, linear algebra, computer vision, data analytics, signal processing, and scientific simulation/finance. Each task includes a task prompt, data generator, validator, and reference CUDA implementation. The authors propose an automated evaluation pipeline that checks compilation, functional correctness, and performance.
Strengths and weaknesses
The benchmark design has several strong elements. Providing task-specific data generators, validators, and reference kernels is valuable and makes the benchmark much more useful than prompt-only code evaluation. The Breadth-Depth-Difficulty axes are also well motivated: breadth probes application domain coverage, depth probes scale sensitivity, and prompt difficulty probes the gap between guided implementation and algorithm recall. The main empirical findings are plausible and useful: modern LLMs often compile CUDA successfully, but functional correctness drops substantially as prompts become less guided, and even valid kernels underutilize hardware. The roofline-inspired metric is a good attempt to connect LLM code generation evaluation with HPC performance analysis rather than only reporting raw wall-clock time.
Questions
None. I am not well-informed enough about CUDA to have specific questions about this work.
Limitations
yes
Final justification
Given on my limited understanding of CUDA, I could evaluate the merit of this work in a limited manner. I continue to maintain my Accept (5) rating based on the benchmark including a large number of tasks, diverse coverage of domains, and automated evaluations. This seems like an useful benchmark.
Formatting concerns
none
1 comment
Rebuttal
Thanks for the positive assessment. Although no specific technical question was raised, our rebuttal adds substantial evidence addressing the main potential uncertainties: a fixed-reference metric with stable model rankings, reference-kernel anchors, a contamination analysis, and clearer documentation of correctness gating, numerical tolerances, profiler counters, benchmark scope, etc. We hope these additions enable a more confident assessment of the benchmark’s validity and conclusions.
- Rating
- 4/6
- Confidence
- 4/5
- Quality
- 4/4
- Clarity
- 2/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- use_inspired
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
- Contribution: a text-to-CUDA generation benchmark (vs PyTorch-to-CUDA / code-to-code).
- CUDABench-Set: 500 tasks x 3 difficulty levels; 6 domains; 5 input scales; per-task data generator + validator + reference kernel.
- Pipeline: NVCC compile -> execution-based functional check -> Nsight Compute profiling.
- Metric: CUDABench-Score = roofline utilization (achieved/attainable GFLOPs), gated by compile-AND-functional; claimed hardware-independent (A40 + RTX 4090). A wide range of models.
- Findings: high compile / low functional correctness; L3 collapse (weak domain knowledge); ~40% utilization ceiling, near model-independent.
Strengths and weaknesses
Strengths:
- The text-to-CUDA, from-scratch, multi-domain framing fills a real gap relative to code-to-code translation benchmarks; pairing every task with a data generator + validator + reference kernel enables execution-based verification and randomized inputs rather than static test cases.
- The Breadth-Depth-Difficulty design is a sensible structuring of the evaluation space; the input-scale axis (kB to 1 GB) is a useful and uncommon dimension that exercises hardware stress.
- Evaluates a strong, current slate of frontier models with an automated compile -> execute -> profile pipeline; the headline findings (compile >> functional gap; L3 domain-knowledge collapse; systemic ~40% utilization) are clearly presented and practically informative.
Weaknesses:
- The roofline Performance-Score has a fundamental design flaw as a benchmark metric. It normalizes achieved performance by the kernel's own measured arithmetic intensity. A memory-wasteful kernel (redundant traffic) has lower AI -> lower attainable bound -> inflated utilization ratio; symmetrically, an algorithmically suboptimal kernel (e.g., O(n^2) vs O(n log n)) that saturates the hardware scores ~100% because the metric cannot see wasted work. Two correct implementations of the same task can have different attainable bounds, so scores are not cross-implementation comparable, undermining "hardware-independent." A speedup-vs-reference and/or a fixed-reference speed-of-light metric should be reported alongside. The flaw is not roofline per se, but normalizing by the candidate kernel's own measured AI instead of a fixed task/reference AI.
- ~Missing, highly overlapping prior/concurrent benchmarks. ComputeEval (Nvidia) is text-to-CUDA, multi-domain, with references (correctness-only). SOL-ExecBench already added roofline/utilization-style and speed-of-light metrics to text-to-CUDA. These overlap the central contributions and must be cited and contrasted; this submission does not appear to.~
- Data-contamination / provenance. Tasks are built from NVIDIA CUDA Samples and popular open-source repos, near-certain pretraining data. The L3 "concept-retrieval" (task-name-only) setting is the most exposed: a name like "Black-Scholes" or "Haar wavelet" can elicit a memorized reference, conflating retrieval with generation. No contamination analysis (n-gram overlap, performance-vs-popularity, held-out novel tasks) is reported.
- Verification robustness. Execution-based functional checks can be gamed (cf. robust-kbench documenting reward hacking in KernelBench). The tolerance policy, input diversity/edge cases, and whether correctness strictly gates performance need stress-testing; FLOP/byte counting conventions (FMA, predication, cache effects) should be specified, as they directly drive the score.
- Interpretability of the numbers. Without the reference kernels' own Performance-Scores and an expert/human ceiling, "~40% utilization" is hard to interpret (is 40% bad, or near-reference for these tasks?). Hardware scope is limited to two Ampere/Ada GPUs (no Hopper/Blackwell).
- While a cross-GPU check (A40 + RTX 4090) is included to argue the metric's portability, a cross-generation GPU check would be stronger (e.g., RTX4090 & RTX5090).
Questions
-
Alongside CUDABench-Score, please also report a fixed-reference metric (e.g., speedup vs the reference kernel's time, like KernelBench fast_p), which is a recomputation over your existing profiling data. If model rankings stay stable under it my confidence rises; if they shift, the headline ~40% and the "hardware-independent" claim must be requalified.
-
Please run your own reference kernels through the identical pipeline and report their CUDABench-Score, so "~40% utilization / ~60% unexploited" has an anchor (no LLM calls). If references score far above 40% the claim holds; if they also sit near ~40% the number reflects the metric/tasks, not model weakness, and should be reworded.
-
Since L3 tasks come from public CUDA repos/samples, please add a cheap memorization check on existing outputs (n-gram overlap with references, or pass-rate vs task popularity), as Finding 3 depends on L3 being synthesis rather than recall. Low overlap strengthens Finding 3; high overlap means it must be softened.
-
Please specify the tolerance policy and input design, confirm correctness strictly gates the score, and state the exact Nsight counters defining FLOPs/bytes (which set AI and thus the score). A clear, hard-to-game protocol raises my confidence; ambiguity or degenerate "valid" kernels (cf. robust-kbench) would require revising the numbers.
-
A single architecturally distinct GPU (Hopper/Blackwell or RTX 5090), even on a subset, would test whether the "hardware-independent" rankings hold across generations. Stable rankings substantiate the portability claim; large shifts bound it to within-generation comparisons.
Limitations
yes
Final justification
I re-assessed the submission against the Use-Inspired criteria; that change and the rebuttal led to the updated scores below.
Rebuttal-based changes. The authors ran every experiment I asked for, including a fixed-reference metric whose rankings track CUDABench-Score. ComputeEval, which I wrongly listed as missing, is cited and contrasted.
Originality 3 -> 4. Use-Inspired originality may consist of a novel framing, and holding each task fixed while stripping the prompt down to the task name alone is a controlled axis no prior kernel benchmark has, so the roofline model being textbook material is not an objection.
Significance 3 -> 2. The benchmark is FP32 end to end (prompt, attainable peak, FLOP counters), missing the mixed-precision tensor-core work that dominates GEMM, convolution and attention in practice, and it has no vendor-library baseline, which Use-Inspired requires explicitly.
Quality 3, unchanged. The new metric improves the fit, but the rebuttal also shows the authors' own reference kernels scoring below the models, so the Sec. 5.2 "60% unexploited" claim needs the rewording they agreed to; the two cancel.
Clarity 3, unchanged. Readable for a non-GPU ML audience, though the metric conventions belong in the main text.
Overall rating 4. Under General I would now be at 5; Use-Inspired credits the framing and penalises an FP32-only scope with no non-ML baseline.
Formatting concerns
none
4 comments
Rebuttal
W1 & Q1: Fixed-reference metric
We agree that CUDABench-Score can be affected by memory-wasteful kernels. In our current from-scratch, single-pass setting, models do not observe the scoring rule or receive optimization feedback, so intentional exploitation is unlikely.
Following the suggestion, we add a fixed-reference metric. For task , reference time , and generated time , we add
Thus fast_1@k is the fraction of all tasks solved correctly and faster than the fixed reference. Cells show fast_1 (CUDABench-Score rank → fast_1 rank); ties use average ranks:
| Model | L1 Pass(P)@1 (%) | L1 P@3 (%) | L2 P@1 (%) | L2 P@3 (%) | L3 P@1 (%) | L3 P@3 (%) |
|---|---|---|---|---|---|---|
| GPT-5.2 | 59.8 (1→1) | 70.8 (1→1) | 53.2 (2→2) | 65.4 (1→2) | 40.0 (1→1) | 52.4 (1→1) |
| Gemini 3 Flash | 50.4 (3→3) | 67.6 (2→2) | 47.0 (3→3) | 62.6 (3→3) | 38.2 (2.5→2) | 50.0 (2→2) |
| Claude 4.5 | 52.8 (2→2) | 66.0 (3→3) | 54.4 (1→1) | 67.4 (2→1) | 35.8 (2.5→3) | 49.6 (3→3) |
| DeepSeek V3.2 | 37.2 (6→6) | 58.6 (5→5) | 40.0 (4→5) | 57.6 (5→4) | 26.0 (5.5→5.5) | 42.2 (6→6) |
| Qwen3 Max | 39.4 (5→5) | 51.8 (7→7) | 41.8 (5→4) | 52.4 (7→7) | 26.0 (5.5→5.5) | 40.8 (7→7) |
| Kimi K2 | 48.0 (4→4) | 65.6 (4→4) | 34.2 (6→6) | 54.4 (6→5) | 31.0 (4→4) | 48.4 (4→4) |
| MiniMax-M2.1 | 30.4 (7→7) | 52.4 (6→6) | 31.4 (7→7) | 54.2 (4→6) | 24.8 (7→7) | 43.8 (5→5) |
| Spearman | 1.000 | 1.000 | 0.964 | 0.857 | 0.991 | 1.000 |
The model rankings under fixed-reference metric remain highly consistent with those under CUDABench-Score: Spearman’s ρ ranges from 0.857 to 1.000. Three settings preserve the exact ranking, while the remaining differences are mainly local rank swaps with relatively small performance differences.
W5&Q2: CUDABench-Score of reference kernel
To assess whether CUDABench-Score meaningfully distinguishes kernel-generation quality, we evaluate both the supplied reference kernels (as shown in the table above) and an iterative refinement baseline [1].
CUDABench-Score is 33.5261% on all reference kernels. The supplied reference kernels are manually implemented primarily to provide executable ground truth for data generator and functional validator, rather than to serve as optimized performance baselines. Therefore, they are not expected to score far above generated kernels. For fair comparison, we additionally apply each model’s correctness mask: a reference score is retained only when the corresponding model solves that task within the first k attempts, and is otherwise set to zero. The results range from 16.99% to 32.12%. Meanwhile, iterative refinement raises the score to 55.04%, demonstrating additional optimization headroom.
Therefore, CUDABench can distinguish generation capability: the reference kernels, kernels generated by top-tier models, kernels generated by iterative refinement, achieve performance scores 33.5261%, ~40%, and 55.04%, respectively.
[1] Zhang Z, Wang R, Li S, et al. Cudaforge: An agent framework with hardware feedback for cuda kernel optimization[J]. arXiv preprint arXiv:2511.01884, 2025.
W2: Missing ComputeEval & SOL-ExecBench
ComputeEval is already cited in Table 1 and §2 as an important text-to-CUDA benchmark. ComputeEval emphasizes functional evaluation of CUDA generation while CUDABench constructs a Breadth-Depth-Difficulty evaluation space focus on both an correctness and performance.
CUDABench evaluates text-based, from-scratch CUDA generation across general GPU-computing domains, whereas SOL-ExecBench evaluates code-based optimization of production deep-learning kernels or subgraphs. Due to the double-blind review policy, we did not include this citation in the submitted manuscript. We will add the citation and clarify the relationship between the two works in the revision.
W3&Q3: Contamination
Following the reviewer’s suggestion, we analyzed all 31,500 slots via rare lexical n-gram [2] containment in __global__/__device__ code after removing host/I/O and boilerplate. Each cell in the table reports median / Q3 / Q90 matched-reference overlap.
| n | L1 (%) | L2 (%) | L3 (%) |
|---|---|---|---|
| 8 | 0.996 / 4.715 / 10.067 | 1.163 / 4.673 / 10.790 | 0.373 / 3.366 / 8.594 |
| 10 | 0.000 / 3.614 / 8.280 | 0.000 / 3.614 / 9.091 | 0.000 / 2.548 / 6.945 |
| 12 | 0.000 / 2.353 / 6.334 | 0.000 / 2.652 / 6.977 | 0.000 / 1.714 / 5.597 |
The overlap analysis shows no increased lexical-copying signal at Level 3. Rare n-gram containment is low for most generations, and Level 3 has lowest overlap ratios across different n and different levels. This pattern is consistent with the prompt design: the more detailed Level 1 and Level 2 prompts constrain the implementation space and may lead to code structures closer to the references, whereas Level 3 leaves greater freedom in algorithm and implementation choices. These results suggest that L3 performance is not primarily explained by verbatim copying of public reference implementations, strengthening our interpretation that L3 evaluates concept retrieval and synthesis.
The submitted appendix already acknowledges this risk and describes our mitigation:
Existing manuscript, Appendix B.1: “Third, as with most code generation benchmarks, contamination is difficult to completely rule out, although we mitigate this risk through task rewriting, new natural-language prompts, and manual implementation of benchmark instances.”
Existing manuscript, Appendix B.4: “Existing repositories and documentation, including PyTorch APIs and NVIDIA CUDA Samples, are used only as references for task construction rather than directly copied as benchmark kernels.”
[2] Shuo Yang et al. “Rethinking Benchmark and Contamination for Language Models with Rephrased Samples.” 2023.
W4&Q4: Verification robustness
Thank you for the pointer! Agents studied by Robust-KBench iteratively revise kernels using execution or performance feedback and suffer from reward hacking. CUDABench instead evaluates independent, one-shot generations: the model do not rely on validator results, scores, etc. Thus, the reward-hacking studied in Robust-KBench is not applicable in our setting.
Tolerance Policy: The full tolerance policy is given in Appendix A.5.
Input Design: As stated in Sec. 4.4, for every task and input scale, the task-specific data generator gen.py independently generates randomized inputs and the corresponding reference outputs. Inputs follow the prescribed shapes, data types, and one of five scales from Tiny to Huge. Each scale has its own matched generator, reference kernel, and validator, and input values are chosen to avoid numerical underflow during validation.
Correctness strictly gates performance. Compilation and functional correctness are evaluated as two separate stages. First, the generated CUDA program must compile successfully with NVCC. Second, only compiled programs enter functional verification. In the Generative Verification Pipeline, the task-specific gen.py generates randomized inputs and corresponding reference outputs. The generated kernel is then executed on the same inputs, and compare.py checks its outputs against the references using the predefined Tolerance Policy.
Only kernels that pass both stages are profiled. Eq. (5) explicitly multiplies the Performance-Score by , so any compilation or functional failure receives a final CUDABench-Score of zero.
Exact Nsight Compute conventions. The implementation details of Exact Nsight counter are provided in the Supplementary Material. Specifically in the line 155-168 of eval_eff_only() function in CUDABench/Evaluate/evaluator_core.py:
Line155 smsp__sass_thread_inst_executed_op_fadd_pred_on.sum.per_cycle_elapsed
...
Line168 dram__cycles_elapsed.avg.per_second
For each kernel, we average all Nsight Compute records associated with that kernel name. Let , , and denote the measured FP32 add, multiply, and fused-multiply-add instruction rates, and let , , and denote the measured SMSP, SM, and DRAM frequencies. We compute
where is the measured off-chip DRAM byte rate and is the corresponding peak-sustained rate. FADD and FMUL count as one FLOP, while FFMA counts as two; predicated-off instructions are excluded. Following the Nsight Compute definition, arithmetic intensity is measured work divided by measured off-chip memory traffic:
W6&Q5: Cross-generation GPU evidence
Appendix A.3, Table 6 reports one representative cross-generation GPU case spanning Ampere, Ada Lovelace, and Blackwell. While this two-kernel example does not establish full model-ranking stability across generations, it provides preliminary evidence that the score can preserve relative performance ordering across architectures.
| Kernel | GPU | Arch. | Arith. | Perf. | Peak | Score |
|---|---|---|---|---|---|---|
| MSE | RTX 5080 | Blackwell | 0.18 | 0.53 | 172.0 | 0.3% |
| MSE | RTX 3090 | Ampere | 0.19 | 0.47 | 172.1 | 0.3% |
| MSE | RTX 4090 | Ada Lovelace | 0.18 | 0.60 | 184.5 | 0.3% |
| MSE | A40 | Ampere | 0.17 | 0.40 | 115.4 | 0.4% |
| MSE Opt. | RTX 5080 | Blackwell | 0.55 | 383.0 | 518.9 | 73.8% |
| MSE Opt. | RTX 3090 | Ampere | 0.48 | 322.3 | 435.4 | 74.0% |
| MSE Opt. | RTX 4090 | Ada Lovelace | 0.55 | 414.9 | 554.9 | 74.8% |
| MSE Opt. | A40 | Ampere | 0.42 | 232.1 | 295.2 | 78.6% |
Because the rebuttal period is limited, we will add a broader cross-generation experiment and report model rankings in the revision.
Thank you for a substantive rebuttal. You ran the experiments I asked for, and the results are informative. Note that the PCs required me to change the Contribution Type on my review to Use-Inspired, and I had to re-assess accordingly.
ComputeEval is already cited in Table 1 and Sec. 2 as an important text-to-CUDA benchmark. (...)
You are right. I apologize for my oversight. Frankly, I am not sure how I had possibly missed that.
Appendix A.3, Table 6 reports one representative cross-generation GPU case spanning Ampere, Ada Lovelace, and Blackwell.
I had not read the appendix. It answers my concerns.
The model rankings under fixed-reference metric remain highly consistent with those under CUDABench-Score: Spearman's rho ranges from 0.857 to 1.000. Three settings preserve the exact ranking, while the remaining differences are mainly local rank swaps with relatively small performance differences.
This answers my Q1, and it is the result I most wanted to see. Could the table go into the main text? It directly addresses the metric-validity.
Only kernels that pass both stages are profiled. [...] so any compilation or functional failure receives a final CUDABench-Score of zero.
That resolves the gating question, and the definitions resolve the counting question. Please move both into the main text: they define the headline metric and should not require reading the supplement or a rebuttal.
The full tolerance policy is given in Appendix A.5
At minimum the tolerance table belongs in the main experimental setup, because the values are loose enough to matter for the headline correctness rates:
Kernels with large or order-dependent accumulation use 10^−2 , including matrix products, convolutions, attention, optimizers, graph convolution, prefix sums, dot products, and scientific simulations. Repeated matrix powers use 10−1 because repeated float32 matrix products can amplify absolute roundoff error more than single-pass dense linear algebra.
Readers should see that when interpreting the functional-correctness numbers.
CUDABench evaluates text-based, from-scratch CUDA generation across general GPU-computing domains, whereas SOL-ExecBench evaluates code-based optimization of production deep-learning kernels or subgraphs.
All clear. One comment on the stated reason:
Due to the double-blind review policy, we did not include this citation in the submitted manuscript.
Concurrent work, and one's own prior work, should be cited in the third person. Please add the citation and the contrast in the revision.
We agree that CUDABench-Score can be affected by memory-wasteful kernels. ... Following the Nsight Compute definition, arithmetic intensity is measured work divided by measured off-chip memory traffic
So, a kernel that saturates DRAM with redundant traffic approaches 100%, while a kernel that eliminates that traffic through shared-memory reuse and becomes compute-bound at low FP32 intensity can score lower for doing strictly less work. Symmetrically, in the compute-bound branch the score is F/P_peak, so redundant FP32 arithmetic raises it.
I am not asking you to change the metric; adding fast_p is the right solution and you have done it. I am asking to state this plainly in the paper as a limitation, alongside the recommendation to read CUDABench-Score together with fast_p.
The overlap analysis shows [...] strengthening our interpretation that L3 evaluates concept retrieval and synthesis.
Agreed. Thank you.
Existing repositories and documentation, including PyTorch APIs and NVIDIA CUDA Samples, are used only as references for task construction rather than directly copied as benchmark kernels.
OK.
Line155 smsp__sass_thread_inst_executed_op_fadd_pred_on.sum.per_cycle_elapsed
and
Let [...] measured FP32 [...] instruction rates [...] FADD and FMUL count as one FLOP, while FFMA counts as two; predicated-off instructions are excluded.
How do you capture TF32 tensor core work? Neither of these instructions does that, right? If they are not captured, please either add them with the matching tensor peak, or state explicitly that tensor-core kernels are out of scope and report how many generations actually emit tensor-core instructions. This does not change my rating (I assume you got it right, but please double-check).
Therefore, comparisons with industry-standard, human-optimized implementations [...], represent an orthogonal direction.
You have chosen the "Use-Inspired" criteria rather than the "General" type. Thus, explicitly, prior work outside the ML literature must be considered and methods should be compared "against any commonly used non-ML approaches as well as baseline ML methods". For text-to-CUDA the commonly used non-ML approach is precisely the vendor library or compiler framework, so I consider this is the main remaining weakness.
Based on feedback from the PC, I have to change the evaluation criteria to "Use-Inspired", while I applied the "General" criteria in my initial review as I considered them more favorable for this work.
I revise my scores:
- Originality 3 -> 4 (based on rebuttal & applying use-inspired criteria)
- Significance 3 -> 4 (based on rebuttal) -> 2 (based on use-inspired criteria where fp32 is largely a deal-breaker)
- Quality 3, unchanged
- Clarity 3, unchanged
- Confidence 4, unchanged
- Overall rating 4 -> 5 (based on rebuttal) -> 4 (after criteria fix)
Thank you very much for the response and careful re-evaluation! We are pleased that the additional experiments and clarifications addressed your concerns. In the revision, we will incorporate your suggestions into the main text, including metric, correctness gating, tolerance policy, and additional citations.
Regarding tensor cores, our current benchmark explicitly targets FP32 CUDA generation, and the evaluated kernels do not emit TF32 tensor-core instructions. Following your suggestion, we promise to construct a tensor-core-compatible subset of the benchmark and extend the evaluation pipeline and metrics to support TF32 generation on tensor-core-enabled GPUs.
Finally, thank you for pointing out the implications of the Contribution Type. We originally selected Use-Inspired because CUDABench is motivated by a practical problem, benchmarking LLMs, rather than by a purely theoretical question. We may not have fully understood the distinction between the General and Use-Inspired categories when making the submission. If the contribution type can still be reconsidered, we believe that General may better reflect the scope and objectives of this work.
Comments on the paper
1 comment
Response to Meta Review
We have responded point-by-point to all raised weaknesses and questions and added the requested experiments where necessary. In addition, we therefore clarify several other concerns and will improve their visibility and wording in the revision.
Q1: Fixed-reference metric and ranking stability
Please see the response to W1/Q1 of Reviewer DXjL. We add a fixed-reference metric. For task , reference time , and generated time , we add
Thus fast_1@k is the fraction of all tasks solved correctly and faster than the fixed reference. The model rankings remain highly consistent with those under CUDABench-Score.
Q2: CUDABench-Score of reference kernel
To assess whether CUDABench-Score meaningfully distinguishes kernel-generation quality, we evaluate both the supplied reference kernels and an iterative refinement baseline. CUDABench can distinguish generation capability: the reference kernels, kernels generated by top-tier models, kernels generated by iterative refinement, achieve performance scores 33.5261%, ~40%, and 55.04%, respectively.
Q3: ComputeEval and SOL-ExecBench
Please see the response to W2 of Reviewer DXjL. ComputeEval is already cited in Table 1 and Sec. 2 as an important text-to-CUDA benchmark. ComputeEval emphasizes functional evaluation of CUDA generation while CUDABench constructs a Breadth-Depth-Difficulty evaluation space focus on both an correctness and performance. We will also discuss SOL-ExecBench. CUDABench evaluates text-based, from-scratch CUDA generation across general GPU-computing domains, whereas SOL-ExecBench evaluates code-based optimization of production deep-learning kernels or subgraphs. Due to the double-blind review policy, we did not include this citation in the submitted manuscript. We will add the citation and clarify the relationship between the two works in the revision.
Q4: Contamination and memorization check
Please see the response to W3/Q3 of Reviewer DXjL. Following the reviewer’s suggestion, we conducted a rare lexical -gram containment analysis over all 31,500 generations, restricted to __global__/__device__ code after removing host-side code, I/O, and boilerplate. We evaluated and report the median, 75th percentile, and 90th percentile overlap with matched reference kernels. Across all three -gram lengths, Level 3 consistently exhibits lower overlap than Levels 1 and 2; for example, with 10-grams, its median/Q3/Q90 overlap is 0.000%/2.548%/6.945%, compared with 0.000%/3.614%/8.280% for Level 1 and 0.000%/3.614%/9.091% for Level 2.
These results show no increased near-verbatim copying signal at Level 3 and are robust to the choice of . The pattern is also consistent with the prompt design: detailed Level 1/2 prompts constrain the implementation space and may induce structures closer to the references, whereas Level 3 permits greater algorithmic and implementation variation. Thus, the observed L3 performance is unlikely to be primarily explained by verbatim lexical memorization, although lexical overlap cannot rule out all forms of contamination.
The submitted appendix already acknowledges this limitation and describes mitigation through task rewriting, new natural-language prompts, and manually implemented benchmark instances. We will add the multi- overlap analysis, cite prior -gram-based contamination work, and further soften Finding 3 in the revision.
D1-D3: De-prioritized clarifications
- D1: Appendix A.3 evaluates CUDABench on RTX 3090/A40/RTX 4090/RTX 5080, including Blackwell. We clarify that it is a representative hardware case study rather than full ranking validation (Reviewer DXjL-W6/Q5).
- D2: We clarify that the current benchmark scope focuses on FP32 and single-kernel CUDA generation. Low precision formats, MoE, and runtime sparsity are potential extensions for future work (Reviewer 42sK-W2/W3/Q3/Q4).
- D3: The tolerance policy is already provided in Appendix A.5. In the response to R1-W4/Q4 of Reviewer DXjL, we further specify the exact Nsight Compute conventions.
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
Rebuttal
Thanks for highlighting the need to distinguish the benchmark contribution from the classical roofline model itself and to state the present precision and workload scope more clearly.
W1: Novelty and optimized baselines
We agree that the roofline model itself is an established performance-analysis methodology, and did not claim the roofline model as a technical novelty in the manuscript. Instead, the novelty lies in the benchmark and end-to-end evaluation methodology for text-to-CUDA generation. Specifically, CUDABench introduces 500 from-scratch text-to-CUDA tasks, three levels of prompt information, five input scales, six application domains, task-specific executable assets, a unified correctness/performance pipeline, and a normalized performance metric based on the roofline model. To the best of our knowledge, CUDABench is the first benchmark that integrates a roofline-based hardware-limit metric into the evaluation of LLM-generated CUDA kernels.
We further clarify that CUDABench targets from-scratch CUDA kernel synthesis, i.e., evaluating the capability of LLMs in synthesizing CUDA kernels from natural-language specifications. This differs from optimization-oriented settings, where an existing implementation is provided and the goal is to improve its performance using libraries or compiler frameworks. Therefore, comparisons with industry-standard, human-optimized implementations, such as cuBLAS, and advanced compiler frameworks, such as Triton, represent an orthogonal direction. We agree that such comparisons are valuable for future studies on CUDA optimization agents and will add this discussion as a limitation and future direction.
W2: Data types and fused kernels
We apologize that our description was not sufficiently clear and may have caused confusion. The current scope of CUDABench is limited to FP32 and single-kernel generation. We have defined these settings in the Appendix, but we agree that they should be stated more clearly in the main experimental setup.
CUDABench currently does not evaluate FP16/MX-FP8/NV-FP4, or isolate kernel fusion as an experimental factor. It focuses on evaluating the capability of LLMs in generating standalone executable CUDA kernels from natural-language specifications, without conflating generation with downstream optimization techniques. We will clarify these limitations in the main text and consider low-precision support, fused-kernel generation, and multi-kernel optimization workflows as important directions for future extensions.
W3&Q4: Non-deterministic and data-dependent workloads
The CUDABench-Score is calculated from Nsight Compute counters collected during execution, so data-dependent control flow is reflected in the realized FP32 operations and DRAM traffic for the profiled input. The arithmetic intensity in CUDABench is not statically assigned from the algorithm. The exact formulation is provided in our response to R1-W4 & R1-Q4. Therefore, CUDABench can calculate roofline scores for workloads with dynamic memory access or runtime-determined sparsity.
As stated in Appendix B.1, CUDABench focuses on single-kernel generation. Methods such as MoE are typically implemented as multi-kernel pipelines rather than a single kernel. Nevertheless, their individual components, including gating, top-k selection, and MLP operations, are represented in CUDABench-Set.
Q1: How is prompt correctness verified?
The prompts are verified through both manual inspection and executable validation. As stated in §3, each task prompt follows a fixed schema specifying the task name, description, I/O shapes and data types, and target GPU. We manually review these fields for semantic correctness and consistency. In addition, every task includes a manually implemented reference CUDA kernel, a data generator, and a validator. The generated inputs and expected outputs are executed against the reference implementation to confirm that the task is well-defined, implementable, and consistent with its stated I/O specification. We will clarify this combined human-and-automated quality-control procedure in the revision.
Q2: How are floating-point errors handled?
As stated in Appendix A.5, we use a predefined tolerance policy to handle floating-point errors. The policy is based on numerical semantics rather than per-output tuning:
For FP32, the appendix uses:
The appendix explicitly states that these groups are determined by expected numerical error sources and are not tuned after observing generated outputs. Functional consistency does not require bitwise equality for floating-point outputs. For each task,
gen.pygenerates the input and corresponding reference output, and the validatorcompare.pycompares the generated kernel’s output against the reference using a predefined tolerance policy. Discrete outputs are checked exactly, while FP32 tolerances are selected according to the expected numerical error, including arithmetic depth and accumulation length. This accommodates legitimate differences caused by reduction order, rounding, and FMA, while outputs exceeding the prescribed tolerance are treated as incorrect. Correctness strictly gates performance evaluation: only kernels that compile, execute successfully, and pass validation receive a performance score.Q3: How are FP16, MX-FP8, and NV-FP4 supported?
Current version can not support different data precisions; it intentionally evaluates FP32, as quoted from Appendix C.1. CUDABench currently does not evaluate FP16/MX-FP8/NV-FP4, or isolate kernel fusion as an experimental factor. It focuses on evaluating the capability of LLMs in generating standalone executable CUDA kernels from natural-language specifications, without conflating generation with downstream optimization techniques. We will state this directly in the main text. Extending the benchmark to lower-precision tensor-core workloads requires precision-specific reference implementations, generators, validation rules, overflow/underflow handling, and hardware peak definitions. We identify this as future work.