AccelEval: A Whole-Program Benchmark for LLM-Generated CPU-to-GPU Code Acceleration

Chendong Song, Tianci Bu, Meixuan Wang, Zijie ZhouNeurIPS 2026 Evaluations and Datasets Track Poster 2026

TL;DR

LLMs are getting surprisingly good at writing individual GPU kernels, but real-world performance engineering rarely starts from a clean math equation—it starts from a slow, tangled CPU program. AccelEval is a new benchmark of 42 whole-program CPU-to-CUDA acceleration tasks that tests whether frontier LLMs can actually read an existing codebase, parallelize it end-to-end, and make it fast. The authors also introduce a 43-pattern diagnostic framework that reveals why certain AI-generated kernels fly while others crawl, showing that feeding winning optimization strategies back to models boosts their speedup by 1.78×.

What Problem Does This Paper Address?

Existing GPU coding benchmarks (like KernelBench or TritonBench) mostly test operator-level or single-function generation: you give an LLM a self-contained PyTorch operator or math specification, and it spits out a single CUDA kernel. In practice, however, engineers start with a trusted, sequential CPU program—a sparse solver, a graph traversal, a financial pricing model—and need to accelerate the entire pipeline. That means identifying parallelism across multiple functions, managing host–device memory transfers, preserving numerical accuracy, and coordinating multiple kernels. Furthermore, many existing benchmarks rely on deep-learning operators that already have widely available CUDA implementations on GitHub, raising training-data contamination concerns.

Methods

AccelEval wraps 42 real-world C++ programs into a standardized solution_compute interface. An LLM is given the CPU reference code and asked to produce a drop-in CUDA replacement. A deterministic test harness then runs both versions on identical inputs at three scales (small, medium, large), checks correctness against the CPU oracle, and measures end-to-end wall-clock speedup (including memory transfers, with warmup trials and strict anti-cheating checks).

Figure 1: The ACCELEVAL pipeline, illustrated on the Bellman–Ford SSSP task. From a single GitHub-extracted reference we derive (i) a deterministic CPU oracle and (ii) the LLM-generated GPU solution; both implement the same single-source solution_compute contract. The harness feeds them identical inputs at three scales, validates outputs against the oracle, and reports wall-clock speedup over the pinned CPU baseline.

To go beyond a simple leaderboard, the authors introduce:

  1. PAR-GM (Peak Attainment Ratio): Because raw geometric-mean (GM) speedup is skewed by which tasks a model happens to pass, PAR-GM normalizes each model's speedup on a task against the fastest correct solution achieved by any model on that task.
  2. 43-Pattern Decomposition: Using a static detector (for syntactic cues like #pragma unroll or __shared__) and an LLM analyzer (for semantic patterns like memory coalescing or kernel fusion), they label 231 passing solutions against a 43-pattern GPU optimization catalog.
  3. Two-Stage Strategy Transfer: For tasks where a winning model achieved $\ge 2\times$ speedup, the authors distill its detected patterns into a ~300-word natural-language guidance.md (with no source code) and re-prompt all models to see if their bottleneck was discovering the right strategy or implementing it.
Figure 2: (A) Pattern Decomposition. Each passing solution is labeled against the 43-pattern catalog (Memory / Compute / Parallelism / Balancing / Host) by a static detector and an LLM analyzer, producing (model, task, pattern) attributions for §5.2. (B) Two-Stage Strategy Transfer. Stage 1 collects zero-hint solutions; the per-task winner’s pattern set is rendered into a guidance recipe (no source code); Stage 2 re-prompts every model with the same prompt plus the recipe. Comparing Stage-1 vs. Stage-2 GM-speedup isolates discovery-bound from implementation-bound behavior (§5.3).

Datasets

AccelEval curates 42 whole-program tasks (median ~4,900 characters of C++ code) across six domains:

  • HPC reference kernels (7 tasks, e.g., HPCG, NAS Parallel Benchmarks, miniWeather)
  • Scientific simulation (4 tasks, e.g., smoothed-particle hydrodynamics, thermal stencil)
  • Graph algorithms (7 tasks, e.g., Bellman-Ford, GAPBS, Rodinia)
  • Spatial–temporal algorithms (7 tasks, e.g., sequence matching, pairwise proximity)
  • Financial computing (5 tasks, e.g., option and bond pricing)
  • Operations research (12 tasks, e.g., dynamic programming, RL, math programming)

Crucially, 31 of the 42 tasks come from CPU-only repositories with no public GPU implementation, sharply reducing memorization risk. The remaining 11 tasks include human-written CUDA references as a sanity-check anchor.

Key Insights and Ideas

  • Correctness and speed are different skills: Claude Opus 4.6 ranks second in pass rate (35/42 at pass@1) but fifth in speedup (33.7×), whereas GPT-5.4 more than doubles its speedup at pass@3 (19.3× to 45.1×) by finding faster implementations for tasks it already solved.
  • Scale makes the GPU shine: Across all models, speedup rises monotonically from small to large inputs—often by over an order of magnitude—as fixed kernel-launch and memory-transfer overheads are amortized.
  • Structural patterns drive the biggest gains: Local tweaks like __restrict__ or atomicAdd are already used by almost every passing solution. What separates the fastest kernels are structural optimizations: kernel fusion (5.4× within-task lift), shared-memory tiling, thread coarsening, and layout transformations (1.4–2.2×).
  • Discovery-bound vs. implementation-bound: When given winner-derived pattern recipes, Claude Opus 4.6's speedup roughly doubles (71.4× to 142.6×), proving it knew how to write fast CUDA but struggled to discover the right strategy. Conversely, GLM 5.1 barely budges (1.26× lift), pointing to an implementation bottleneck.

Key Results

Evaluating eight frontier LLMs on NVIDIA H200 (and cross-checking on RTX 4090, which yields near-identical rankings with Spearman $\rho \approx 0.98$):

Table 2: Overall results on ACCELEVAL-42 (NVIDIA H200). Pass: small-scale correctness count out of 42. Medium-scale pass@1 for Gemini is 36/42 (see text). GM: geometric-mean speedup over passed tasks. PAR-GM: closeness to the per-task best.
  • Overall Leader: Gemini 3.1 Pro dominates, passing 36/42 tasks at medium scale (38/42 at small scale) at pass@1 with a 71.2× geometric-mean speedup over the single-threaded CPU baseline and a 0.77 PAR-GM. At pass@3, it solves 41/42 tasks at 70.7× GM.
  • Human Baseline Comparison: On the 11 tasks with human-written CUDA, the best-of-8 LLM oracle reaches 0.75× of human performance (per-model average: 0.50×). LLMs beat humans on embarrassingly parallel tasks (e.g., monte_carlo at 3.15×) but lag badly on dependence-heavy dynamic programming (dtw_distance at 0.30×) and aggressively tiled kernels (black_scholes at 0.10×).
  • Strategy Transfer: Feeding winner-derived pattern guidance boosts paired geometric-mean speedup by 1.78× across the seven recipient models, compared to just 1.18× for a length-matched generic CUDA-tips control.

Limitations and Future Work

  • Single-threaded CPU baseline: Reported speedups (like 71.2×) are measured against a single-threaded CPU reference (gcc -O2, no OpenMP). On a 26-task subset with validated OpenMP references, Gemini's GPU solutions still achieve a respectable ~20.5× geometric-mean speedup.
  • Observational pattern lift: The within-task LIFT metric is correlational—stronger models tend to use multiple advanced patterns together, so it cannot isolate the exact causal effect of a single pattern.
  • Post-hoc analysis: Currently, pattern decomposition happens after evaluation. A natural next step is embedding this pattern profiler directly into an agentic optimization loop to guide iterative code revisions.

Summary updated

BibTeX
@inproceedings{song2026acceleval,
  author = {Chendong Song and Tianci Bu and Meixuan Wang and Zijie Zhou},
  title = {{AccelEval: A Whole-Program Benchmark for LLM-Generated CPU-to-GPU Code Acceleration}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=AtjnWVu79Q},
}
Figure