WorksComputer Science
Estimating GPU Roofline Arithmetic Intensity with Off-the-Shelf LLMs and Compiler Artifacts
Abstract
GPU developers use profiling to understand computation and data movement, but access to target hardware can delay optimization. We investigate whether off-the-shelf large language models (LLMs) can estimate Roofline arithmetic intensity (the ratio of floating-point operations (FLOPs) to device-memory bytes) without executing the target GPU workload. We evaluate three models (deepseek-v4-flash, gemini-3.7-flash, and gpt-5.6-sol) across 179 combinations of five kernel families, four NVIDIA and AMD GPUs, four parallel runtimes (CUDA, HIP, OpenMP, and OpenCL), and modified code variants, comparing source-only queries, queries with compiler artifacts, and sandboxed agentic analysis. Compiler artifacts raise the share of arithmetic-intensity estimates within a factor of 1.20 of profiled values from 8-14% to 26-32%, while the resulting bandwidth-bound or compute-bound classifications are correct in 78-92% of runs. With compiler artifacts, FLOP estimates meet the 1.20x tolerance in 59-88% of runs, compared with 36-40% for device-memory traffic. Agentic analysis increases the share of arithmetic-intensity estimates within the 1.20x tolerance by 6.5 percentage points for gpt-5.6-sol, at 3.6x the median cost and 2.5x the median latency of compiler-assisted queries; the other models incur higher costs without a statistically clear improvement. These findings suggest LLM estimates could help prioritize optimization when GPU access is constrained, while identifying cache-dependent device-memory traffic as the main obstacle to precise arithmetic-intensity prediction.
Introduction
Which should a developer optimize first: a GPU kernel’s computation or its data movement? Profiling the kernel on its target graphics processing unit (GPU) informs this decision, but access may be delayed by shared-cluster allocations or queues of optimization candidates. Large language model (LLM) optimization systems also generate candidates that require hardware evaluation [31] (Zhang et al. 2025). When candidates are profiled in isolation to avoid interference in device-memory traffic measurements, they must take turns on the target GPU [33]. LLM assistants are increasingly part of software-development workflows [29], making static estimation a potential additional use for tools developers already query.
Preprint.
developers already query. Figure 1 illustrates how estimates could help prioritize optimization candidates while GPU access is constrained.

Figure 1. Potential uses of static estimates when GPU access is constrained: screening jobs awaiting cluster allocation (left) and prioritizing generated optimization candidates for profiling (right). We evaluate the underlying arithmetic-intensity predictions.
Roofline arithmetic intensity (RAI) is floating-point operations (FLOPs) divided by device-memory bytes transferred (Williams et al., 2009). Comparison with the target GPU’s balance point identifies the Roofline model’s bandwidth-bound or compute-bound regime. The numerical value also helps bound attainable throughput and shows proximity to the balance point, information a regime label alone cannot provide. Predicting RAI requires accounting for compiler transformations in executed arithmetic and for access patterns, cache reuse, and the boundary across which memory traffic is measured. These estimates can guide optimization priorities; execution measurements validate performance improvements.
Analytical and static GPU methods estimate performance from program and architectural information [15, 13]. Prior work also explores LLM-based Roofline classification [7], FLOP-count prediction [8], and trained numerical GPU performance prediction [28] (Wang et al. 2025). Beyond regime classification, we assess how accurately off-the-shelf LLMs recover numerical RAI and its FLOP and device-memory traffic components across targets, and what compiler evidence and sandboxed analysis add without task-specific training.
We compare three strategies without executing the target GPU workload: zero-shot queries using source alone, zero-shot queries supplemented with post-compilation instruction set architecture (ISA) artifacts, and sandboxed agentic analysis. The study evaluates three models (deepseek-v4-flash, gemini-3.7-flash, and gpt-5.6-sol) across 179 combinations of kernel, variant, GPU, and runtime: five HeCBench kernel families ([17]), four NVIDIA/AMD GPUs, and CUDA, HIP, OpenMP, and OpenCL where supported. Four variants probe sensitivity to names, compiler settings, inputs, and datatypes as a best-effort check of reliance on recognizable code or recalled measurements from the original source. Models receive execution inputs and target specifications; profiled counters are withheld for scoring, and failed or incomplete predictions count as misses. The study distinguishes numerical accuracy from regime accuracy, diagnoses errors in FLOP and device-memory traffic estimates, and measures the cost and latency of additional analysis. We organize the findings around four research questions:
RQ1. Can LLMs predict the RAI of GPU kernels from static evidence? LLMs estimate RAI within 1.20× of the reference in 26–32% of runs with ISA, up from 8–14% with source alone; at 2×, ISA accuracy reaches 48–60%. With ISA, FLOP accuracy within 1.20× is 59–88%, versus 36–40% for device-memory traffic, the recurring numerical weak point.
RQ2. Can predicted RAI correctly identify a GPU kernel’s Roofline regime? Although numerical estimates often miss the 1.20× target, source plus ISA classifies 78–92% of runs correctly, exceeding a predictor that chooses the more common reference class for each GPU–precision pair (73.2%, fitted and scored on the same cases). For the 40 cases within 2× of the balance point by profiled RAI, ISA raises gpt-5.6-sol’s classification accuracy from 42.5% to 79.5%.
RQ3. Does numerical RAI accuracy vary across workloads, target GPUs, and code variants? Accuracy varies across workload–GPU combinations, consistent with differences in access patterns and effective reuse; ISA gains extend across all four variants. For example, gpt-5.6-sol with ISA reaches 90–100% accuracy within 1.20× for lavaMD on A100/H100, but 0% for particlefilter on every GPU.
RQ4. Can sandboxed analysis improve numerical RAI accuracy beyond zero-shot ISA prompting? Sandboxed analysis improves gpt-5.6-sol’s accuracy within 1.20× by 6.5 percentage points at 3.6× the median cost of source-plus-ISA queries; for the other models, gains remain uncertain, median costs are 6.7–17.7× as high, and completion falls as low as 64%.
Background and Related Work
Roofline background.
The Roofline model bounds attainable throughput by the minimum of peak compute throughput and peak memory bandwidth multiplied by arithmetic intensity (Williams et al., 2009). Comparing intensity with the balance point identifies the model’s bandwidth-bound or compute-bound regime and guides optimization priorities. Cache-aware Roofline modeling extends this analysis across the GPU memory hierarchy [25].
Static, analytical, and simulation approaches. Analytical GPU models relate execution behavior to program structure and architectural resources [15, 5]. Static PTX analysis supports CUDA execution-time prediction [3], while static and predictive analysis guides autotuning without program runs [23]. Learned predictors estimate execution time or power from static PTX features [14] (Tran et al. 2025) or instruction statistics collected through instrumented execution [9]. CUDAsap obtains basic-block execution frequencies and instruction statistics statically as an alternative to profiling [13]. TileSight explicitly models tile reuse, cache behavior, and memory traffic (Mo et al., 2026). Other approaches use instruction traces for analytical GPU-core modeling, as in GCoM [22], or detailed GPU simulation, as in PPT-GPU and Accel-Sim [4, 20]. Alongside these approaches, we investigate LLMs as estimators of executed arithmetic and device-memory traffic from static evidence.
LLMs for GPU performance prediction. Closely related studies by Bolet et al. [7] evaluate off-the-shelf LLMs for Roofline regime classification and FLOP-count prediction for HeCBench CUDA kernels. This study extends that setting to estimating device-memory traffic and the numerical RAI derived from FLOPs and traffic. Trained predictors target related numerical quantities: LLMPerf predicts OpenCL kernel execution time, while Regression Language Models for Code includes Triton kernel latency [28, 2]. Omniwise fine-tunes a model on HIP kernels to predict arithmetic intensity, bandwidth, cache hit rates, and other performance metrics on AMD MI250 and MI300X GPUs (Wang et al., 2025). GPU Forecasters evaluates off-the-shelf and reinforcement-learning-tuned LLMs that forecast relative kernel speedup to prioritize GPU measurements during kernel search [21]. We compare source evidence, compiler artifacts, and sandboxed analysis across NVIDIA and AMD targets using off-the-shelf models without task-specific training. We measure accuracy, cost, latency, and completion without executing the target GPU workload during prediction.
LLMs for parallel code and tool-assisted optimization. Complementary work develops high-performance computing code models [30, 18, 19], compiler models for intermediate representations and assembly [12], and benchmarks for parallel-code and accelerator-kernel generation [29, 38] (Wen et al. 2025). Optimization systems such as CudaForge and AccelOpt use execution or profiling feedback to steer LLM-generated changes [31] (Zhang et al. 2025; Zhang et al. 2026). CUDA-LLM uses target-GPU latency feedback, while SwizzlePerf supplies hardware specifications and profiling logs [11] (Tschand et al. 2025). AutoKernel profiles models to identify bottlenecks and iteratively tests Triton or CUDA kernel refinements [16]. Kevin trains CUDA-kernel optimization with multi-turn reinforcement learning and execution feedback [6]. More broadly, PerfCodeGen refines general code using runtime feedback [39], and AlphaEvolve combines evolutionary code search with evaluator feedback [32]. Mapo trains a memory-performance predictor that uses static features at inference and supplies predicted metrics as rewards to a fine-tuned LLM optimizer [24]. Such static estimates complement hardware-feedback optimization by prioritizing candidates while accelerator access is constrained.
Methodology
We evaluate how well off-the-shelf LLMs can statically predict GPU kernel Roofline Arithmetic Intensity (RAI) through a series of experiments aimed at: (1) probing sensitivity to potential memorization of selected evaluation kernels, (2) testing for any bias towards certain GPU architectures and parallel runtimes, and (3) avoiding costly LLM experimentation via early pruning of both target GPU kernels and queried LLMs. These considerations allow us to save both experimental time and money while gathering a meaningful understanding of how off-the-shelf LLMs behave for our target task. Below we detail the steps and design decisions of our experimentation.
Target Kernel Selection
Figure 2 provides an overview of our kernel selection approach. Our target kernels are sourced from the HeCBench suite [17], where we profiled 254 kernels from well-established suites it contained (e.g.: NAS Parallel Benchmarks, Parboil, Rodinia, NVIDIA CUDA Samples) across three NVIDIA GPUs: an A10, A100, and H100. HeCBench supplies CUDA, HIP, and OpenMP implementations of the selected programs; OpenCL implementations are drawn from Rodinia or ported for this study, as detailed below.

Figure 2. Overview of kernel selection, code variants, and the GPU–runtime combinations used to construct prediction queries. Five kernel families, four variants, and nine GPU–runtime combinations define 180 nominal cases; 179 are evaluated because the execution-side OpenCL variant of particles is unavailable.
We used proximity to the GPU balance points and changes in BB/CB behavior across hardware and parallel runtimes to guide kernel selection. Cases near a balance point make classification sensitive to numerical RAI errors, while changing regimes require target-specific predictions. Selection operates at the kernel-family level, so individual variant–GPU–runtime cases can still lie far from their balance points.
Although our initial kernel selection is made with NVIDIA GPUs, we also consider the HIP, OpenMP, and OpenCL variants of the target kernels on an AMD MI300X GPU. This allows us to check cross-vendor bias in prediction accuracy, given the strong lexical similarity between CUD-A/HIP, and GPU-agnostic nature of OpenMP offload kernels. Unfortunately, OpenCL profiling support had been dropped from the NVIDIA toolchain, thus we sample OpenCL versions of the kernels as an additional generalizability study on the MI300X.
Each additional kernel family adds 36 cases, roughly 20% more queries for every model, strategy, and repetition, so the $2,000 experimentation budget described in subsection 3.4 led us to limit the study to five families. Many five-family sets were admissible, so we chose among them with a staged procedure, detailed in subsection A.3. We profiled eight candidate families on all four GPUs, each with CUDA, HIP, and OpenMP-offload implementations in HeCBench and an OpenCL implementation that could be sourced or ported. We excluded families whose dominant-precision FLOP count varied across the NVIDIA GPUs for the same source and input: threadfence, whose contention-dependent atomic retries spread its FLOP count by 37%, and the integer-only bfs, whose few counted FLOPs also vary by GPU. We then required each set to contain a saturated compute-bound and a saturated bandwidth-bound anchor, and ranked the four remaining valid sets by the share of their cases within 1.5 octaves () of a balance point. The selected set ranks first (31% of its cases lie near a balance point), contains no two families with the same work shape and memory-access pattern, and stays first under six of eight alternative ranking choices.
Selected GPU Kernels & Their Variants
The five selected programs and their target kernels are summarized in Table A.3 in the appendix. Their upstream lineages span AxBench, Rodinia, and the NVIDIA CUDA Samples: inversek2j comes from AxBench, lavaMD, particlefilter, and srad come from Rodinia, and particles comes from an NVIDIA SDK sample ([10, 34] (Yazdanbakhsh et al. 2017)). The CUDA, HIP, and OpenMP target-offload implementations are taken from HeCBench, while the matched OpenCL implementations use Rodinia donors where available and study-created ports for inversek2j and particles. Their measured regimes vary with the target GPU, runtime, and datatype.
To test robustness to changes in source code and execution conditions, we study four variants of each program: (O) the Original baseline source for each runtime, (CI) the same unmodified baseline source with altered Compiler flags and/or program Inputs, where supported, (R) a comment-stripped version with all symbols/functions Renamed to neutral names, (RD) the same comment-stripped/Renamed version with a change in Datatype (from FP32 → FP64, and FP64 → FP32). The variants provide complementary comparisons using unchanged and modified source code. O and CI share identical source, while R and RD remove recognizable names and comments. R preserves the intended computation of O, whereas CI changes compilation settings or inputs and RD changes the floating-point datatype. These comparisons test whether predictions respond to surface changes and changes affecting numerical targets, providing a best-effort check of reliance on memorized answers without establishing training-data exposure.
These kernel, variant, GPU, and runtime combinations define 180 nominal cases, of which we evaluate 179. The OpenCL particles CI case is excluded because neither its workload dimensions nor its device-compilation options can be changed without modifying the source, which would violate the CI constraint.
LLM Querying Approach
Our evaluation considers (1) direct zero-shot (ZS), and (2) agentic (AG) prompting approaches. An agentic setting is a typical area where we expect our work to be used by bottlenecked systems, often performing agentic kernel optimization in a loop. We intentionally study ZS alongside AG prompting to contrast the cost/time tradeoffs between the two.
Figure 3 and Figure 4 describe the ZS and AG prompting approaches, respectively. For both cases, we use similar input/instruction prompts to guide the LLMs towards an answer. We supply the name of the target kernel, the command line arguments, the compilation commands, and GPU specifications (i.e.: model name, cache hierarchy) so that the LLMs have context w.r.t the kernel we are asking it to predict and the system it is executing on. ZS queries receive fixed evidence inline, whereas AG runs can interactively inspect files and perform computations in the sandbox. ZS prompts include every source file of the target program, much of which does not affect the target kernel; AG runs receive the same files in a sandbox, together with a file tree, and choose what to inspect. The sandbox has no network access and no GPU, so agents can compile code and run their own analysis scripts but cannot run the target workload on a GPU; each run is limited to 100 model responses.

Figure 4. Agentic sandbox setup. We keep a similar input prompt as for the ZS-Code experiments, however we move the verbose source-code and ISA information into the sandbox for the agent to explore. Various helper tools are exposed to the LLM for managing a todo-list, reading/writing files, and interacting with the environment’s pre-installed CLI programs.
We additionally study the inclusion of post-compilation information in the form of SASS (NVIDIA) and GCN (AMD) instructions corresponding to the target kernels (henceforth referred to as ISA). Included with the raw ISA dumps, we add static instruction mix (IMIX) information to the ZS prompts and static IMIX files for AG. This IMIX inclusion saves LLMs from having to compute exact static ISA instruction counts, allowing them to focus on reasoning about dynamic execution. We denote ZS experiments supplying only source-code evidence as ZS-Code and those supplying ISA as ZS-ISA.
The expected output from the LLMs is a tool call dubbed rai_prediction_result (shown in Figure 3), which contains all the RAI-relevant predictions made by an LLM. This tool call includes (1) the launch bounds of the target kernel (i.e.: grid/block sizes) to confirm proper thread count estimates, (2) FP16/32/64 FLOP count estimates for the RAI numerator, and (3) bytes read/written across the specified device-memory counter boundary for the RAI denominator. For post-mortem analysis, each prediction is expected to provide an explanation and a list of assumptions made in an LLM’s calculations. These tool calls normalize our expected outputs, and allow us to compare the ground-truth profiled RAI performance counters to the LLM RAI estimates.

Figure 3. Zero-shot prompting and the expected structured tool-call response. Source-only queries provide source code, while source-plus-ISA queries also provide assembly instructions and instruction-mix (IMIX) evidence.
NVIDIA reference counters measure transfers between L2 and DRAM during the first target-kernel dispatch; MI300X counters measure requests from TCC/L2 toward MALL, including requests served by MALL. The prompts specify these boundaries, so the target is traffic crossing the stated boundary during the dispatch, rather than the byte volume of ISA loads and stores. A kernel can therefore execute stores yet record zero writes if no write traffic crosses that boundary within the measured interval.
Preliminary LLM Pruning Phase
Having 179 evaluated cases and 3 different prompting strategies (ZS-Code, ZS-ISA, AG) that we want to test across multiple LLMs quickly becomes very expensive, especially when we want to perform repeat trials of each query to account for variation in predictions. We consider open-source and frontier LLMs with a publication cutoff date of August 18, 2026. Appendix Table A.2 lists the LLMs we initially considered for this work. For reproducibility purposes, we capped our total experimentation spend at $2000 USD, with the expectation that the sum of all zero-shot prompting runs for a single LLM should be capped at a reasonable $200 USD, where leftover total budget would go towards agentic experimentation. With this spend cap, we pruned costly and unreliable LLMs as shown in Figure 5a. We sampled each LLM using only the O code variants and both ZS-Code and ZS-ISA prompts (a total of 90 query combinations), recording the number of successfully completed rai_prediction_result tool calls (i.e., usable predictions) and monetary spend for each query. Each LLM was queried using it’s manufacturer-default thinking (reasoning) setting, as our experimentation is focused on out-of-the-box behavior of these LLMs. From this initial cost data, we bootstrap-projected the cost of querying each LLM with the other variants to get a sense of how much the zero-shot experiments would cost us for each model with 5 repetitions of each query; dropping claude-opus-5 and qwen-3.8-max as they were projected to cost us $1,151 and $597, respectively. We then dropped the LLMs with less than 80% usable predictions (glm-5.3, glm-5.3-flash, minimax-m3, deepseek-v4-pro-0813) as they would waste money on incomplete queries. Figure 5b visualizes the expected spend and percent of usable predictions achieved during this cost-aware LLM pruning phase.
Figure 5. (a) pre-flight cost-aware LLM pruning workflow; (b) projected full-sweep cost versus tool-call completion rate.
After these pruning steps, we were left with three reliable and cost-effective LLMs (deepseek-v4-flash, gemini-3.7-flash, and gpt-5.6-sol) that we use for the remainder of our experiments. We refer to these models as deepseek, gemini, and gpt-5.6, respectively, in the evaluation.
Evaluation
We evaluate 179 kernel–variant–GPU–runtime cases under three models and three strategies, with five repetitions per case: 895 runs per model–strategy configuration and 8,055 runs overall. A run is one prediction attempt, including failed and incomplete predictions. We compute RAI from total FP16, FP32, and FP64 FLOPs divided by total device-memory bytes read and written. Traffic counts bytes crossing the target profiler’s memory boundary during the kernel dispatch. Reference ground-truth hardware perfor-
mance counter values are means taken over ten profiling trials per case; reference RAI is computed from these counter means. For a profiled reference value (RAI, FLOPs, or bytes) and an LLM estimate , the tolerance requires , treating proportional overestimates and underestimates symmetrically. We choose as a primary reporting threshold for close numerical agreement and additionally report a coarser tolerance. Numerical accuracy is the share of runs meeting the tolerance, with failed or incomplete predictions counted as misses. Appendix Figure A.21 shows that compiler-evidence gains and gpt-5.6’s agentic gain persist at and .
We also evaluate the Roofline classification regime implied by each numerical estimate. The balance point is the GPU’s compute peak for the precision with the largest reference FLOP count divided by its memory-bandwidth peak. A RAI value below is bandwidth-bound (BB); a RAI value at or above is compute-bound (CB). Selecting from each prediction’s dominant precision leaves classifications unchanged on the evaluated runs. Runs without a usable prediction or with non-finite RAI are unclassified and count as classification misses.
RQ1 assesses numerical accuracy, RQ2 the resulting Roofline classifications, RQ3 variation across workloads, GPUs, and code variants, and RQ4 the accuracy, cost, and latency tradeoffs of sandboxed analysis.
RQ1: Can LLMs Predict the RAI of GPU Kernels from Static Evidence?
With compiler evidence, LLMs predict numerical RAI within 1.20× of the reference in 26–32% of runs. Figure 6 compares numerical accuracy for RAI and its FLOP and traffic components across the three models and strategies. Compiler evidence increases numerical RAI accuracy by 18–20 percentage points over the 8–14% achieved under ZS-Code across the three models. At the tolerance, ZS-ISA accuracy reaches 48–60%. Appendix Table A.14 shows positive 95% intervals for all three compiler-evidence gains at 1.20× using paired case bootstraps, which resample whole cases with their five runs under both strategies kept together.

Figure 6. Compiler evidence improves numerical RAI prediction, with larger gains in FLOP counts than in device-memory traffic. Panels show RAI (top left), total FLOPs (bottom left; FP16+FP32+FP64), and total device-memory traffic (bottom right; bytes read and written) across models and strategies. Solid bars show the percentage of runs within the 1.20× tolerance; hatched bars use the 2× tolerance. Failed and incomplete predictions count as misses. Appendix Figure A.18 breaks FLOPs down by precision and traffic into reads and writes.
FLOP estimates benefit more from compiler evidence than memory-traffic estimates. Total-FLOP accuracy reaches 59–88% under ZS-ISA, with gpt-5.6 improving from 16% to 88%. Under ZS-ISA, total device-memory traffic is less accurate, at 36–40%, and remains a recurring source of numerical RAI error. Unlike an ISA load/store byte total, measured traffic depends on effective cache reuse, eviction, and writeback during the dispatch.
The original-CUDA lavaMD cases illustrate this difficulty: measured traffic is 290 MB on A10, compared with 149–152 MB on A100/H100. For gpt-5.6 under ZS-ISA, median predicted traffic is 0.92–0.93× the reference on A100/H100, within the 1.20× tolerance, but 0.67× on A10, outside the band; Appendix Table A.13(a) gives the matched measurements.
RQ1 Summary. Compiler evidence substantially improves numerical RAI prediction, raising agreement within 1.20× by 18–20 percentage points across the tested models. Under ZS-ISA, total-FLOP accuracy is 59–88%, while device-memory traffic accuracy is 36–40%, leaving traffic estimation a recurring weak point.
RQ2: Can Predicted RAI Correctly Identify a GPU Kernel’s Roofline Regime?
Predicted RAI often identifies the correct Roofline regime despite numerical error. Figure 7 separates numerical RAI agreement from BB/CB classification outcomes for each model and strategy. For gpt-5.6 under ZS-ISA, correct classifications inside and outside the tolerance (green plus blue) sum to 91.8% of runs, compared with 32.4% whose RAI falls within 1.20× of the reference. In 60.2% of all gpt-5.6 ZS-ISA runs, the numerical estimate falls outside this tolerance but the Roofline classification remains correct.

Figure 7. Correct Roofline classifications often survive numerical RAI error. Segments separate numerical accuracy at 1.20× from BB/CB classification outcomes across models and strategies. Green and blue segments indicate correct classifications with estimates within and outside the tolerance, respectively; failed runs and undefined RAI estimates are shown separately. Segment labels are rounded to whole percentages.
Classification accuracy rises from 65–80% under ZS-Code to 78–92% under ZS-ISA across the three models. Of the 179 evaluated cases, 93 are BB and 86 are CB by profiled RAI, so always predicting BB scores 52%. A simple baseline chooses the more common reference class for each GPU–precision combination and reaches 73.2% accuracy without reading code; Appendix Table A.8 gives the group counts. The eight class choices are fitted and evaluated on the same 179 cases, making this an
in-sample comparison. All three models under ZS-ISA classify individual kernels more accurately than this coarse rule, despite its being fitted to the evaluation labels; under ZS-Code, only gpt-5.6 does. Appendix Table A.7 confirms that gpt-5.6’s ZS-ISA accuracy holds for both regimes, with similar recall for BB and CB.
Compiler evidence helps near the balance point. Classification is more sensitive to numerical error near the balance point : a small error can change the predicted regime, whereas farther away a larger error can leave it unchanged. For a positive RAI , we quantify multiplicative distance from as . This factor is symmetric: it equals 1 at the balance point and 4 at or . Figure 8 groups classification results by their profiled distance , rather than by numerical tolerance. For cases within 2× of the balance point, gpt-5.6’s classification accuracy rises from 42.5% under ZS-Code to 79.5% under ZS-ISA, a gain of 37 percentage points. The paired case-bootstrap 95% interval for this gain, [19.5, 54.0] points, excludes zero, supporting a positive improvement under case resampling. For cases more than 4× away, gpt-5.6 exceeds 95% accuracy under every strategy.

Figure 8. Compiler evidence improves Roofline classification near the balance point. Panels compare classification accuracy under ZS-Code, ZS-ISA, and AG, grouping cases by profiled separation , , and . The groups contain 40, 30, and 109 cases, respectively, with five runs per case for each model and strategy. Colors distinguish models; bar labels are rounded to whole percentages, and failed or incomplete predictions count as misses.
RQ2 Summary: Compiler evidence raises gpt-5.6’s classification accuracy from 42.5% to 79.5% for the 40 cases within 2× of the balance point. Across all cases, ZS-ISA classifications are correct in 78–92% of runs, often preserving the regime despite numerical error.
RQ3: Does Numerical RAI Accuracy Vary Across Workloads, Target GPUs, and Code Variants?
Numerical RAI accuracy varies across workloads, target GPUs, and code variants. Figure 9 maps ZS-ISA accuracy for RAI, FLOPs, and traffic across workloads and GPUs for gpt-5.6. We focus on the model with the highest overall numerical accuracy to examine its successful cases and remaining limitations. lavaMD reaches 90% accuracy within 1.20× on A100 and 100% on H100, compared with 2.5% on A10 and 5% on MI300X. In contrast, particlefilter has no accurate RAI estimates on any GPU. The ordering of GPUs also depends on the workload: inversek2j is most accurate on MI300X. Appendix Figure A.19 extends the breakdown to all models and individual runtime–variant combinations; exact GPU rankings differ across models.

Figure 9. gpt-5.6’s numerical accuracy varies across workload–GPU combinations. Panels show ZS-ISA accuracy within 1.20× of the profiled total FLOPs, total device-memory traffic, and RAI. Variants and runtimes are pooled; each NVIDIA cell has 40 runs, each MI300X cell 60, and particles on MI300X 55. Failed predictions count as misses. Cell values are rounded to whole percentages. Runtime sets differ by vendor (CUDA and OpenMP on NVIDIA; HIP, OpenMP, and OpenCL on MI300X), so cells compare the evaluated targets.
NVIDIA cells reach 88–100% total-FLOP accuracy; traffic remains a frequent limitation. On MI300X, FLOP-counting errors also contribute: for inversek2j, traffic accuracy reaches 98%, but FLOP accuracy is 68% and RAI accuracy is 67%. FLOP accuracy also requires matching the target profiler’s counting convention. Appendix Table A.5 illustrates this in checked gpt-5.6 ZS-ISA inversek2j predictions: mismatched accounting for packed arithmetic and division helpers causes both FLOP and RAI estimates to miss tolerance. Component errors can compound: estimates within 1.20× for both FLOPs and traffic guarantee only a 1.44× bound on RAI. For gpt-5.6 on particles/A10, 18 of 40 ZS-ISA runs meet both component tolerances yet miss the RAI target.
Repeated accesses to neighboring boxes offer cache reuse in lavaMD. The O CUDA particlefilter writes and rereads a 110 MB temporary array, with adjacent threads accessing entries 276 bytes apart. These strided accesses make traffic sensitive to transaction granularity and effective reuse, even when FLOP estimates are accurate. Appendix Table A.13(a) shows median traffic predictions 4–26× below the reference for the O CUDA/HIP particlefilter cases across all four GPUs.
Compiler evidence improves accuracy in all variants. Figure 10 compares RAI accuracy for every model and strategy across variants that alter names, compiler flags, inputs, or datatypes. ZS-ISA exceeds ZS-Code for every model–variant combination. CI improves ZS-Code accuracy relative to O for all three models but has mixed

Figure 10. Compiler-evidence gains extend across all four code variants. Cells show numerical RAI accuracy within 1.20× (%) for each model and strategy, pooling workloads, GPUs, and runtimes. Columns show original (O), altered flags/inputs (CI), renamed (R), and renamed with changed datatype (RD) variants. Each cell includes 225 runs, except CI with 220; failed and incomplete predictions count as misses.
| O | CI | R | RD | |
| DeepSeek, ZS-Code | 6.2 | 15.0 | 8.9 | 0.9 |
| Gemini, ZS-Code | 6.2 | 11.8 | 12.4 | 4.4 |
| GPT, ZS-Code | 13.8 | 20.9 | 15.1 | 5.3 |
| DeepSeek, ZS-ISA | 30.7 | 25.0 | 28.0 | 27.1 |
| Gemini, ZS-ISA | 27.6 | 28.6 | 26.2 | 23.6 |
| GPT, ZS-ISA | 32.4 | 30.5 | 34.2 | 32.4 |
| DeepSeek, Agentic | 32.9 | 29.5 | 26.7 | 31.6 |
| Gemini, Agentic | 24.9 | 26.4 | 28.9 | 26.7 |
| GPT, Agentic | 39.1 | 39.1 | 36.9 | 40.4 |
caption: Numerical RAI accuracy (%) for original (O), altered flags/inputs (CI), renamed (R), and renamed with changed datatype (RD) variants.
effects under ZS-ISA. Relative to O, R has no consistent directional effect on accuracy across models and strategies. RD reduces ZS-Code accuracy relative to O, most strongly for deepseek and gpt-5.6; gpt-5.6’s O and RD accuracies rise from 13.8% and 5.3% under ZS-Code, respectively, to 32.4% for both under ZS-ISA. Appendix Table A.12 shows near-complete predictions across gpt-5.6’s variants but variant-dependent completion for the other models.
RQ3 Summary. Numerical RAI accuracy varies across workloads and targets: gpt-5.6 under ZS-ISA reaches 90–100% accuracy within 1.20× for lavaMD on A100/H100, but 0% for particlefilter on every GPU. Compiler-evidence gains extend across all four code variants, while traffic estimation remains a recurring weak point.
RQ4: Can Sandboxed Analysis Improve Numerical RAI Accuracy Beyond Zero-Shot ISA Prompting?
Agentic prompting improves end-to-end numerical RAI accuracy for gpt-5.6, while gains for the other models remain uncertain. Table 1 compares the accuracy, completion, cost, and latency of both strategies for all three models. For gpt-5.6, accuracy within 1.20× rises from 32.4% to 38.9%, a gain of 6.5 percentage points with a paired case-bootstrap 95% interval of [3.4, 9.6] points. The improvement comes at approximately 3.6× the median recorded cost and 2.5× the median latency of ZS-ISA.
| Strategy | Cost/run (USD) Median | Latency (min) Median | RAI acc. (%) | Complete (%) |
| deepseek ZS-ISA | 0.0060 | 7.6 | 27.7 | 96.4 |
| deepseek AG | 0.0405 | 22.0 | 30.2 | 88.4 |
| gemini ZS-ISA | 0.0400 | 0.62 | 26.5 | 93.5 |
| gemini AG | 0.709 | 7.6 | 26.7 | 63.9 |
| gpt-5.6 ZS-ISA | 0.223 | 1.3 | 32.4 | 100.0 |
| gpt-5.6 AG | 0.800 | 3.4 | 38.9 | 99.8 |
Table 1. Accuracy, completion, recorded cost, and prediction latency under ZS-ISA and AG (895 runs per configuration). Cost and latency are medians, with ratios calculated before rounding; RAI accuracy uses the 1.20× tolerance. Completion denotes a usable prediction. Appendix Figures A.14 and A.15 show the corresponding per-run distributions. Missing charges are omitted.
The observed AG RAI accuracy increases are 2.5 points for deepseek and 0.2 for gemini. Appendix § 8.15 shows that case-bootstrap intervals for these differences span both decreases and increases, leaving their gains uncertain. Lower completion also contributes to their end-to-end results: AG completion falls to 88% and 64%, respectively. Classification accuracy also falls to 75% for deepseek and 54% for gemini, while gpt-5.6 remains at 91.8%. Appendix Figure A.13 shows that exhausting the 100-response budget accounts for most unsuccessful AG runs for deepseek and gemini.
The sandbox enables analysis beyond a fixed prompt: inspected gpt-5.6 lavaMD trajectories construct GPU-specific LRU cache-simulator code. Appendix § 8.14 documents differing accuracy associations across GPUs; the observational comparison does not isolate a simulation benefit.
Under ZS-ISA, gpt-5.6 has the highest numerical RAI accuracy, deepseek the lowest median recorded cost, and gemini the lowest median latency. AG multiplies median cost per run by –, with a clearly supported gain of 6.5 percentage points in numerical accuracy only for gpt-5.6.
RQ4 Summary: AG improves gpt-5.6’s numerical RAI accuracy within by 6.5 percentage points over ZS-ISA at the median cost. For deepseek and gemini, AG costs – as much as ZS-ISA, with uncertain gains and lower completion.
Scope and Validity
Within a $2,000 experimentation budget, we prioritized comparisons across hardware, runtimes, code variants, and strategies by limiting the study to five kernel families and three LLMs. Repeated predictions characterize variability within these families rather than additional workload diversity. Of the 179 cases, 109 lie more than from the profiled balance point, so overall classification accuracy should be read alongside the distance breakdown.
Across ten profiling trials per case, RAI’s per-case coefficient of variation has a median of 0.08% and a maximum of 10.3%; Appendix § 8.8 gives the GPU breakdown. We use fixed prompt designs per strategy and do not assess sensitivity to alternative wording. We do not compare numerical estimates against dedicated static FLOP-counting or memory-traffic models.
Conclusion
In this work, we show that LLMs can estimate the Roofline Arithmetic Intensity of GPU kernels from static evidence across different hardware targets, parallel runtimes, and modified code variants. We empirically show that prompting LLMs with post-compilation assembly instruction artifacts substantially improves arithmetic intensity estimates compared to prompting with source code alone. Although estimates often contain errors, the resulting Roofline bandwidth- or compute-bound classifications remain correct in 78–92% of runs, depending on the LLM used for prediction. Our results highlight that hardware-specific floating point operation-counting conventions can cause FLOP estimation errors, while device-memory traffic estimation remains the main limitation of this approach, because it requires accounting for effective cache reuse at the target profiler’s counter boundary. We also emphasize that compared to zero-shot prompting, agentic LLM prompting in some cases can be detrimental to finishing a task, and in others it only provides disproportionately small improvements in arithmetic intensity prediction accuracy while costing up to as much. LLMs can thus help identify a kernel’s likely Roofline bandwidth- or compute-bound regime from static evidence, while cache-simulation and memory-traffic tools warrant further study as ways to improve arithmetic intensity numerical estimates.
Acknowledgments
This research was supported by Code Metal Inc. and the Pazy Foundation. This work was performed in part under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344 (LLNL-JRNL-2026894). The views and opinions of the authors do not necessarily reflect those of the U.S. government or Lawrence Livermore National Security, LLC neither of whom nor any of their employees make any endorsements, express or implied warranties or representations or assume any legal liability or responsibility for the accuracy, completeness, or usefulness of the information contained herein. The United States Government retains, and the publisher, by accepting the article for publication, acknowledges that the United States Government retains a non-exclusive, paid-up, irrevocable, world-wide license to publish or reproduce the published form of this manuscript, or allow others to do so, for United States Government purposes.
AI USAGE DISCLOSURE
We used generative AI both as the subject of the experiments and as assistance in implementing the study and preparing the manuscript. The models evaluated as predictors, their inputs, and their role in producing the experimental outputs are described in the methodology. The following describes AI assistance used to produce the work. We used OpenAI’s Codex assistant and agents using Anthropic’s Claude Opus models for implementation and manuscript preparation.
Research planning and implementation. Under author direction, LLM agents wrote substantial portions of the experimental implementation and data-collection software. AI assistants also helped develop analysis scripts, generate figures and tables, and check reported results against analysis outputs. They proposed refinements to metrics, statistical analyses, visualizations, and the presentation of findings; the authors selected which suggestions to adopt.
Benchmarks and data. The reference FLOP and device-memory traffic values are hardware performance-counter measurements collected with vendor profilers. LLM-produced FLOP and traffic estimates are the predictions evaluated against those references. Agents also assisted with the study-created OpenCL ports. The authors checked these ports by comparing their ground-truth performance profiles with those of the original implementations, aiming to match the original performance as closely as possible while preserving source semantics.
Writing and literature search. The authors wrote initial drafts of all the paper sections and used AI assistants to revise, edit, and critique the manuscript. Assistance also included developing outlines, drafting and substantially rewriting selected passages under author guidance, and refining figure and table captions. The authors iteratively reviewed the suggestions, supplied revisions, and made the final editorial decisions. AI assistants helped identify overlooked related papers, retrieve bibliographic records, and check citations against available primary sources.
The authors take full responsibility for the correctness, originality, and integrity of the paper, its software, and its reported results, including material produced with AI assistance.
Additional Details
Model and Endpoint Configuration
Table A.2 records the model and endpoint configuration snapshot used for experiment planning. Prices are the frozen, uncached standard rates in our study registry, expressed per one million input and output tokens; they are not necessarily the cheapest route currently advertised by a gateway. Resource comparisons use recorded experiment costs, including charges estimated from reported usage. Provider catalogs and endpoint limits are volatile, so we report the snapshot date and distinguish model-level limits from route-dependent limits (OpenRouter, 2026a;b; OpenAI, 2026; Microsoft, 2026).
The absence of a separate reasoning-token limit does not imply unlimited reasoning. In those rows, hidden reasoning competes with visible output under the endpoint’s completion limit. OpenRouter effort labels may influence a provider’s allocation, but they do not establish portable hard token limits. For route-dependent models, the exact provider route and response-reported usage must therefore accompany empirical cost and latency results. In particular, although GLM-5.3 advertises a 131,072-token maximum output, our requests without a client-imposed output limit have observed an effective 65,536-token stopping point; we treat that as endpoint behavior, not as a universal model limit.
Selected Target Kernels and Hardware
Table A.3 summarizes the five selected kernel families, their implementation provenance, their measured Roofline regimes across variants, and the profiled GPU specifications.
Kernel Family Selection
We selected the five kernel families in four stages, using only profiled counters and no LLM predictions. A case here is one target-kernel cell: a family’s target kernel under one variant, runtime, and GPU, excluding the R variant because renaming leaves its counters unchanged.
Candidates. Few programs have CUDA, HIP, OpenMP-offload, and OpenCL implementations at once: HeCBench supplies the first three but no OpenCL, so OpenCL implementations came from Rodinia or were ported for this study. Within that constraint we profiled eight candidate families on all four GPUs: bfs, inversek2j, lavaMD, lud, particlefilter, particles, srad, and threadfence.
Eligibility. Every candidate had to have all nine GPU–runtime combinations for the O variant, a dominant-precision FLOP count that does not depend on which NVIDIA GPU ran the same source and input, any cross-runtime arithmetic-intensity difference above explained by a documented mechanism, and clean measurements. Two families failed the FLOP-stability requirement. threadfence’s counted FLOPs include contention-dependent atomic retries, so its dominant-precision FLOP count spreads by 37% across the A10, A100, and H100, leaving no machine-independent value to predict; every other family spreads by at most . bfs is integer-only, so it has no meaningful arithmetic intensity, and its few counted FLOPs also vary across GPUs. Cross-runtime divergence was not a reason for exclusion: inversek2j’s 10.9× arithmetic-intensity spread across MI300X runtimes comes from OpenCL’s heavier acos and sqrt library implementations, which we confirmed in the disassembly, and we treat it as a deliberately hard case.
Structural constraints. A valid set must contain a saturated compute-bound anchor and a saturated bandwidth-bound anchor, and at least one member whose regime changes along two or more of the GPU, runtime, and variant axes. Only lavaMD qualifies as the compute-bound anchor and only particlefilter as the bandwidth-bound anchor, which leaves four valid five-family sets.
Ranking. We ranked the valid sets by the share of their cases within 1.5 octaves of the relevant balance point (Table A.4), because accuracy far from a balance point measures an easier classification problem. We also recorded the CB/BB balance and the number of member pairs that share both a work shape (fixed-trip, data-dependent, or single-pass) and a memory-access pattern (streaming, tiled through shared memory, or indirect). The selected set ranks first, and it is the only valid set with no such duplicate pair (lavaMD and lud share both properties). Re-running the ranking under eight alternatives (choice instead of median distance, near-ridge thresholds of 1.0 and 2.0 octaves, including the R variant, and dropping each GPU in turn) keeps the same set first in six; the 2.0-octave threshold and dropping the H100 favor replacing srad with lud. Counter noise does not affect the ranking: no case’s regime lies within three standard deviations of its balance point. No eligible family exercises atomic operations, so the study does not cover atomic-heavy kernels.
Agent Tool Use and Unfinished Agent Analysis
Figure A.11 breaks down the commands issued through execute and their recorded durations across all agentic runs and repetitions. Python/arithmetic commands account for 38%, 62%, and 52% of execute calls for deepseek-v4-flash, gemini-3.7-flash, and gpt-5.6-so1, respectively, and approximately 50–57% of summed execute-call durations across the models. This category includes scripts that parse and print disassembly, tally executed instructions, and calculate candidate component counters. Compilation and build commands account for 32% of gpt-5.6-sol’s summed execute-call duration, compared with 10% for deepseek-v4-flash and 12% for gemini-3.7-flash. The mean summed execute-call duration is 0.6 minutes per run for deepseek-v4-flash, 1.1 minutes for gemini-3.7-flash, and 0.2 minutes for gpt-5.6-sol. These durations exclude model inference and other tool calls.
| Model | Release | Price / 1M tokens (input/output) | Context limit | Output limit | Reasoning-token limit |
| GPT-5.6 Sol | 2026-07-09 | $5.50 / $33.00C | 1,050,000 | 128,000 | No separately published limit; reasoning and visible output share the completion budget. |
| Claude Opus 5 | 2026-07-24 | $5.00 / $25.00 | 1,000,000 | 128,000 | OpenRouter caps an explicit reasoning allocation at 128,000; the final answer must also fit. |
| Kimi K3 | 2026-07-16 | $3.00 / $15.00C | 1,048,576 | Route-dependent; catalog maximum approximately 974,842 | No separately published limit; constrained by the served route’s completion budget. |
| GPT-5.5 (Azure) | 2026-04-24 | $5.00 / $30.00S | 1,050,000 model; approximately 922,000 effective Azure input budget | 128,000 | No separate limit; reasoning and visible output share the 128,000-token generation budget. |
| Gemini 3.7 Flash | 2026-08-13 | $0.375 / $1.875 | 1,048,576 | 65,536 | No public per-effort cap; the provider determines reasoning use internally. |
| Qwen 3.8 Max | 2026-08-03 | $2.00 / $6.00 | 1,000,000 | 131,072 | No separately published limit; constrained by the completion budget. |
| GLM-5.3 | 2026-08-18 | $1.40 / $4.40 | 1,048,576 | 131,072 advertised; 65,536 effective default observed | No separately published limit; constrained by the completion budget. |
| DeepSeek V4 Pro 0813 | 2026-08-12 | $1.32 / $3.96C | 1,048,576 | 384,000 catalog maximum; route-dependent | No separately published limit; constrained by the served route. |
| DeepSeek V4 Flash 0731 | 2026-07-31 | $0.44 / $1.32C | Up to 1,310,720; route-dependent | 262,144 catalog maximum; route-dependent | No separately published limit; constrained by the served route. |
| MiniMax M3 | 2026-05-31 | $0.75 / $3.00C | Up to 1,048,576; route-dependent | 262,144 catalog maximum; route-dependent | No separately published limit; constrained by the served route. |
Table A.2. Model and endpoint comparison (configuration snapshot: 2026-08-24). Context is generally the combined input–output window, rather than an independently usable input allowance. Prices marked C are conservative route-planning rates; S denotes a shadow/list-price valuation paid with project credits rather than study cash.
Figure A.12 compares unfinished tasks in the 95 deepseek-v4-flash runs and 321 gemini-3.7-flash runs that exhausted the 100-response budget. Percentages are normalized separately by each model’s number of budget-limited runs. A manual review assigns each run one primary task from its last substantive tool action, using the preceding four substantive actions and earlier generated code for context. Empty responses and task-list updates are excluded when identifying that action. For gemini-3.7-flash, instruction analysis and FLOP calculations account for 163 runs (51%), followed by memory/cache analysis and device-memory traffic calculations in 76 runs (24%). The memory/cache category includes footprint calculations, access enumeration, cache-residency analysis, and cache-model development or execution. For deepseek-v4-flash, OpenMP runtime and launch-geometry inspection accounts for 52 runs (55%), followed by instruction analysis and FLOP calculations in 29 runs (31%). The remaining categories cover counter definitions, final calculations and result preparation, and input/preprocessing reconstruction. These labels describe where analysis ended; they do not measure whole-run time allocation or establish which task caused non-completion.
Completion Reliability and Resource Distributions
Figure A.13 separates usable predictions from unsuccessful run outcomes across all prompting strategies. A usable prediction is a valid structured result, independently of whether its predicted counters or derived RAI are accurate. For deepseek-v4-flash and gemini-3.7-flash, response-budget exhaustion is the most frequent unsuccessful agentic outcome, whereas most unsuccessful zero-shot runs return schema-invalid results or omit the required result call.
Figure A.14 shows the distribution of recorded costs per planned run and their sums across each model–strategy combination. Costs include recorded charges from unsuccessful submissions and earlier executions associated with the same planned run. Unreported charges are not filled in, so affected per-run values and summed costs are lower bounds. For gemini-3.7-flash, the 323 unsuccessful agentic runs account for $294.51 of the $638.24 recorded cost, or 46%.

Figure A.11. Commands issued through execute: share of calls (top) and summed call durations (bottom), pooled across all runs and repetitions. Each call is categorized by its first substantive command, with its full duration assigned to that category. Durations exclude model inference and other tools.

Figure A.12. Primary task at budget exhaustion for 95 deepseek-v4-flash runs and 321 gemini-3.7-flash runs, normalized separately for each model. Each run receives one qualitative label from its last substantive tool action, using preceding actions and generated code for context. Labels show percentages and run counts.
Figure A.15 shows the per-run prediction-latency distributions for all three prompting strategies. For zero-shot runs, prediction latency is the accumulated recorded request-chain duration associated with a planned run. For agentic runs, latency spans the selected execution from sandbox creation and evidence staging through model requests, tool calls, and retry waits until a prediction is submitted or execution terminates. It excludes subsequent archival and sandbox cleanup. One gemini-3.7-flash agentic run has no recorded duration and is omitted from the latency distribution, leaving 894 observations; the other configurations each have 895. Summed run hours add these per-run durations and do not represent elapsed campaign time because runs can execute concurrently.
Figure A.16 shows delivered model responses per agentic run, with medians of 30 for deepseek-v4-flash, 85 for gemini-3.7-flash, and 17 for gpt-5.6-sol. These counts include analysis turns and any summarization responses, which share the 100-response run budget. They differ from tool-call counts because a model response can request multiple tools or none.
Source-Only Accuracy Across Kernels and Targets
Figure A.17 provides the source-only counterpart to the joint kernel, variant, and GPU–runtime breakdown. Each populated cell represents one case with five repetitions, including unsuccessful predictions as misses. For gpt-5.6, aggregate RAI accuracy within the 1.20× tolerance is 14% on O, 21% on CI, 15% on R, and 5% on RD. The corresponding ZS-ISA accuracies are 32%, 30%, 34%, and 32%, respectively. These comparisons show sensitivity to the supplied evidence and code variants, without establishing whether a model encountered the original kernel during training.
Operation-Counting Conventions
The prediction targets are profiler-derived counters, whose operation counts can differ from counts of mathematical operations in the source. Our AMD reference follows VALU instruction-counter weighting: addition, multiplication, and transcendental instructions contribute one operation per work-item, while FMA contributes two, without an additional factor for packed components ([1]). NVIDIA FP16 reference counts can also include compiler-generated HFMA2 instructions that materialize constants, even when the source has no FP16 arithmetic. These contributions are retained in the reference targets.

Figure A.13. Run outcomes across all 895 runs per model and prompting strategy. Success denotes a usable structured prediction, independently of its numerical accuracy; the remaining categories distinguish termination and result-format failures.
Table A.5 reconciles gpt-5.6’s ZS-ISA FLOP predictions for the O and R inversek2j cases on MI300X/OpenMP. The reference total of 173 operations per work-item includes 171 in the computational body and two setup operations: a reciprocal and a multiplication. The model instead counts both components of nine packed FMAs, five packed multiplies, and four packed adds, adding operations relative to the reference weighting. It also counts 12 v_div_scale and six v_div_fixup instructions as 18 further operations outside the reference arithmetic categories. Its body estimate is therefore , and including setup yields 218 operations per work-item, exactly matching its predicted total of 7,143,424 FLOPs over 32,768 work-items.
| Contribution | Operations |
| Reference total, including setup | 173 |
| Additional packed weighting | 27 |
| Division-helper instructions | 18 |
| Predicted total, including setup | 218 |
Table A.5. Operation-count reconciliation for gpt-5.6’s ZS-ISA O and R inversek2j predictions on MI300X/OpenMP, per work-item.

Figure A.14. Recorded cost per planned run, including unsuccessful runs, on a logarithmic axis. Boxes show medians and interquartile ranges; the header shows summed recorded costs across 895 runs per configuration. Unreported charges are omitted, so affected values are lower bounds.
This accounting mismatch explains the FLOP overestimate for these cases. Predicted total traffic is approximately the reference, so the combined RAI overestimate is about . The RD FP64 body lacks the corresponding packed FP32 arithmetic; its smaller FLOP discrepancy and more accurate traffic estimate yield RAI within the tolerance. This reconciliation is specific to the checked model, strategy, and variants and does not attribute every MI300X error to the same convention.
Profiling Reference Variability
Reference FLOP and byte counters are unrounded means over ten profiling trials for each of the 179 cases. Reference RAI is the sum of the FLOP-counter means divided by the sum of the read- and write-counter means. Table A.6 summarizes the per-case coefficient of variation (CoV) of the ten individual trials’ RAI values, as recorded in the reference characterization. Each trial’s RAI uses its own total FLOPs and total bytes; CoV is the sample standard deviation divided by the mean, expressed as a percentage. This describes variation across profiling trials, whereas the numerical-agreement tolerance compares an LLM estimate with the reference ratio of counter means. Variability in one component counter need not equal variability in total traffic or RAI.
Component and Classification Accuracy
Figure A.18 separates the per-precision FLOP counters and device-memory reads and writes. Counter accuracy uses symmetric relative error , with zero error when both quantities are zero; the tolerance corresponds to an error no greater than . Unsuccessful predictions count as misses, including when the reference counter is zero. Table A.7 reports both reference classes and includes unclassified runs in each true class’s recall denominator. The reference set contains 93 bandwidth-bound and 86 compute-bound cases, with five repetitions per case.

Figure A.15. Per-run prediction latency across runs with recorded timings. Boxes show medians and interquartile ranges within the violin distributions; the header reports medians and summed run hours. The dashed line marks 60 minutes. Durations include agentic sandbox setup and analysis, excluding archival and cleanup.

Figure A.16. Delivered model responses per agentic run across all 895 runs per model. Boxes show medians and interquartile ranges; the dashed line marks the 100-response budget shared by analysis and summarization.
Table A.8 reports a majority-class lookup using only the GPU and dominant reference precision. We identify precision by the largest reference FLOP counter, yielding FP32 and FP64 groups on each of the four GPUs. Within each group, the lookup predicts whichever reference class is more common; a tie defaults to BB without changing its in-sample accuracy. Its 131 correct classifications out of 179 cases give 73.2% accuracy, compared with 52.0% for always predicting BB. Both fitting and scoring use the same labels, so this is an optimistic in-sample reference for class composition rather than a held-out prediction result.
As a precision-sensitivity check, we select each prediction’s balance point using its own largest FLOP counter, retaining the same hardware balance points, reference labels, and treatment of unclassified runs. All 7,122 classifiable predictions select the same dominant precision as their references; selecting balance points from predicted precision leaves classifications unchanged across all 8,055 runs.
Numerical Accuracy Among Completed Predictions
Table A.9 separates accuracy over all runs from accuracy within each configuration’s completed predictions. Completion means a usable structured result, including predictions whose derived RAI is non-finite and therefore numerically inaccurate. For gemini, 237 of 837 completed ZS-ISA predictions meet the tolerance, compared with 239 of 572 completed AG predictions: 28.3% and 41.8%, respectively. The completed subsets differ between strategies and can weight cases differently, so these rates describe selected returned predictions rather than a paired improvement on the same cases. Accuracy over all runs remains the primary end-to-end metric, with unsuccessful runs counted as misses.
Exploratory Reliability Signals
We examine associations between prediction-derived signals and accuracy on the evaluation cases themselves. These analyses are exploratory, without validation on held-out cases. Table A.10 summarizes classification accuracy and coverage for predicted separation from the balance point and agreement across repetitions. For a positive predicted intensity and known hardware balance point , predicted separation is and requires no target-kernel profiling. Under ZS-ISA, a predicted separation greater than selects 46–53% of all runs across the three models, with classification accuracy of 94–98%. When all five gpt-5.6 ZS-ISA predictions give the same valid class, they are correct 98.6% of the time, covering 82% of cases. The agreement signal requires five predictions per case, whereas predicted separation uses one.
Numerical consistency provides weaker assurance. For

Figure A.17. RAI accuracy under ZS-Code by kernel, variant, and GPU–runtime pair. Each cell counts how many of five repetitions meet the 1.20× tolerance; unsuccessful predictions count as misses. Columns follow O, CI, R, and RD within each kernel. Gray marks the unavailable CI variant of particles on MI300X/OpenCL.
gpt-5.6 under ZS-ISA, 51 of 179 cases (28%) have five finite, positive RAI estimates agreeing within 1.20× of one another. Among predictions in those cases, 55% meet the numerical tolerance against the reference, compared with 23% in the remaining cases. Agreement is associated with a higher share of accurate estimates but can also reproduce a shared error. Table A.11 extends the five-run agreement results to all nine model–strategy configurations. Numerical accuracy is the share of individual predictions meeting the reference tolerance within the selected cases, rather than the accuracy of an aggregate prediction. For gpt-5.6 under ZS-ISA, the 51 numerically agreeing cases divide into 28 with all five predictions accurate and 23 with all five inaccurate. Other configurations also have agreeing cases with a mixture of accurate and inaccurate predictions, as defined in the caption. The numerical consistency association is weaker or absent under source-only prompting, so the compiler-informed results should not be interpreted as a universal calibration rule.
Workload, Target, and Variant Breakdowns
Figure A.19 retains each kernel, variant, and GPU–runtime combination under ZS-ISA and AG; the source-only counterpart is Figure A.17. Table A.12 summarizes numerical accuracy and usable-prediction rates across all four variants. For gpt-5.6, original-versus-datatype-variant accuracy changes from 13.8% versus 5.3% under ZS-Code to 32.4% for both under ZS-ISA. The corresponding gap narrows for deepseek and increases slightly for gemini. Renaming produces no consistent directional accuracy change across models and strategies. These comparisons measure sensitivity to transformations of the supplied program and do not identify whether a model encountered a kernel during training.

Figure A.18. Accuracy of predicted component counters (FP16/32/64 FLOPs and device-memory bytes read/written) and derived RAI. Solid bars show the percentage of runs within the 1.20× tolerance (1/1.20–1.20 of the profiled value); hatched bars use the 2× tolerance (0.5–2.0). Failed and incomplete predictions count as misses.
Representative Device-Memory Traffic Cases
Table A.13(a) compares the original-variant CUDA implementations on NVIDIA with HIP on MI300X. Each row reports the reference total traffic, the median prediction across five repetitions, and the number of individual RAI estimates within tolerance. A median traffic ratio close to one does not imply that every individual RAI estimate is accurate, since each run has its own FLOP and traffic estimates.
For lavaMD, repeated accesses to neighboring boxes offer reuse, while the amount of traffic crossing the measured boundary varies substantially across GPUs. For the original CUDA cases, profiled total traffic is 149–152 MB on A100/H100 and 290 MB on A10. The median predicted-to-profiled ratios are 0.92–0.93 and 0.67, respectively. This contrast is consistent with greater effective reuse on A100/H100, without isolating cache capacity, scheduling, or replacement as a sole cause.
For the original CUDA particlefilter, 400,000 particles each generate 69 integer indices, yielding a 110.4 MB temporary array. At a fixed loop iteration, adjacent threads access entries 276 bytes apart. The kernel writes and subsequently reads this array, making traffic sensitive to transaction granularity and effective reuse. Median predicted total traffic is approximately 4–26× below the profiled totals across the four CUDA/HIP cases, and none of these RAI estimates meets the tolerance. The particles case further illustrates the limits of footprint-based estimates: MI300X records 4.8 MB of traffic against a median prediction of 0.8 MB despite the small data footprint. Nominal capacity alone does not establish which requests cross the counter’s memory boundary.
Cache-Simulator Code in Agentic Trajectories
Inspected gpt-5.6 AG lavaMD trajectories include Python LRU cache simulators over neighboring boxes, including an implementation modeling MI300X’s separate XCD-local L2 caches. For a reproducible code-pattern summary, we flag tool-call arguments containing move_to_end, OrderedDict(), or popitem(last=False). These patterns occur in 56 of 180 lavaMD runs, including 15 of 40 on A10 and 26 of 60 on MI300X (Table A.13). Pattern matches identify candidate simulator code; they do not confirm successful execution, and other implementations may go undetected. The table compares accuracy in runs with and without these patterns, but agents choose when to simulate, so the comparison establishes neither a causal benefit nor its absence. Figure A.20 provides the overall tool-call distribution.
Uncertainty in Accuracy Differences
Table A.14 reports paired case-bootstrap intervals for the numerical improvements from compiler evidence (RQ1), gpt-5.6’s near-boundary classification improvement (RQ2), and the numerical differences from sandboxed analysis (RQ4). RQ1 and RQ4 use all 179 cases; RQ2 uses the 40 cases whose profiled RAI lies within 2× of the balance point. Each of 20,000 resamples draws cases with replacement, keeping each case’s five repetitions under both compared strategies together, with unsuccessful runs retained as misses. We calculate the mean paired accuracy difference for each resample and report the 2.5th and 97.5th percentiles in percentage points, using random seed zero in paper_figures.py. The paired unit is the case, so repetitions are not treated as independent cases. Cases also share variants, runtimes, and kernel families; these intervals describe variation over the evaluated case set and do not establish generalization beyond the five families.
Sensitivity to Numerical Tolerance
Compiler-evidence gains at tighter tolerances and gpt-5.6’s agentic advantage extend beyond the primary 1.20× target. Figure A.21 shows the share of runs meeting numerical tolerances from 1× to 5× for RAI, total FLOPs, and total device-memory traffic. Table A.15 gives RAI accuracy at six selected factors for every model and strategy.

Figure A.19. RAI accuracy by kernel, variant, and GPU–runtime pair under ZS-ISA and AG. Each cell counts how many of five repetitions meet the tolerance; unsuccessful predictions count as misses. Columns follow O, CI, R, and RD within each kernel. Gray marks the unavailable CI variant of particles on MI300X/OpenCL.
At , , , and , ZS-ISA improves numerical RAI accuracy over ZS-Code for all three models. For gpt-5.6, observed AG accuracy remains above ZS-ISA throughout the – range. Coarser tolerances narrow the source-only versus compiler-informed difference for gpt-5.6: at , accuracy is 77.0% under ZS-Code and 76.5% under ZS-ISA, and both reach 80.6% at .
For deepseek and gemini, the small agentic differences at become lower accuracy than ZS-ISA at , , , and , reinforcing the model dependence of sandboxing’s benefits. Here, the tolerance factor compares a prediction with its profiled numerical reference; the distance bands in RQ2 instead compare profiled RAI with the hardware balance point.

Figure A.20. Distribution of recorded agent tool calls across all runs and repetitions, including unsuccessful runs. Labels show mean calls and errors per run; tool errors and invalid tool names form separate categories.
(a) Identity, provenance, and operation.
| Program | Target kernel by API | Upstream suite | CUDA/HIP/OMP | OpenCL | Operation |
| inversek2j | CUDA/HIP/OpenCL: invkin_kernel | AxBench | HeCBench | Study port | Two-joint inverse kinematics |
| lavaMD | CUDA/HIP: md OpenCL: kernel_gpu_opencl | Rodinia | HeCBench | Rodinia donor | Neighbor-box molecular forces |
| particlefilter | CUDA/HIP: kernel_likelihood OpenCL: likelihood_kernel | Rodinia | HeCBench | Rodinia donor | Particle likelihood update |
| particles | CUDA/HIP/OpenCL: collideK | NVIDIA CUDA Samples | HeCBench | Study port | Particle collision response |
| srad | CUDA/HIP: srad OpenCL: srad_kernel | Rodinia | HeCBench | Rodinia donor | Anisotropic diffusion coefficient |
(b) Measured bound-class signatures: ■ compute-bound, ○ bandwidth-bound, and – not collected.
| GPU | API | inversek2j | lavaMD | particlefilter | particles | srad |
| A10 | CUDA | ○○○■ | ■■■■ | ○○○○ | ○○■○ | ○○■○ |
| A10 | OMP | ○○○■ | ■■■■ | ○○○○ | ○○■○ | ○○■○ |
| A100 | CUDA | ■■■■ | ■■■■ | ○○○○ | ■■■■ | ■■■○ |
| A100 | OMP | ■■■■ | ■■■■ | ○○○○ | ■■■■ | ■■■ |
| H100 | CUDA | ■■○ | ■■■○ | ○○○○ | ■■■○ | ■■■○ |
| H100 | OMP | ■■○ | ■■■○ | ○○○○ | ○○■○ | ■■■○ |
| MI300X | OMP | ○○○○ | ■■■■ | ○○○○ | ○○○○ | ○○○○ |
| MI300X | HIP | ○○○○ | ■■■■ | ○○○○ | ○○○○ | ○○○○ |
| MI300X | OpenCL | ■■■■ | ■■■■ | ○○○– | ○○○○ | ○○○○ |
Within-cell order is original, rename-only (R), rename plus datatype (RD), and compiler plus input (CI). Each arm is classified against the target GPU’s ridge point at that arm’s dominant precision.
(c) Profiled GPUs and the DRAM-level balance points used for BB/CB classification. Peak throughput is in TFLOP/s; balance points (BP) are in FLOP/byte.
| A10 | A100 | H100 | MI300X | |
| Architecture | GA102 | GA100 | GH100 | CDNA3 |
| Compute cap. | 8.6 | 8.0 | 9.0 | gfx942 |
| Memory (GB) | 24 | 40 | 80 | 192 |
| BW (GB/s) | 600.1 | 1,555.2 | 3,352.3 | 4,208.7 |
| LLC (MiB) | 6 | 40 | 50 | 256 |
| FP16 peak | 16.31 | 60.55 | 107.46 | 39.09 |
| FP32 peak | 16.31 | 15.14 | 53.73 | 128.15 |
| FP64 peak | 0.25 | 7.57 | 26.86 | 104.97 |
| FP16 BP | 27.18 | 38.93 | 32.06 | 9.29 |
| FP32 BP | 27.18 | 9.73 | 16.03 | 30.45 |
| FP64 BP | 0.42 | 4.87 | 8.01 | 24.94 |
Ceilings come from the vendor profilers: the Nsight Compute device attributes on NVIDIA, and the ROCm Compute Profiler standalone Roofline microbenchmark on MI300X. MI300X lists its ISA target in place of a compute capability.
Table A.3. Selected target kernels, implementation provenance, measured Roofline behavior, and the GPUs those measurements were taken on.
| Five-family set | Cells | Near-ridge (%) | Median octaves | Balance | Collisions |
| inversek2j, lavaMD, particlefilter, particles, srad | 134 | 31 | 3.12 | 0.485 | 0 |
| inversek2j, lavaMD, lud, particlefilter, particles | 134 | 27 | 3.11 | 0.418 | 1 |
| inversek2j, lavaMD, lud, particlefilter, srad | 135 | 25 | 3.12 | 0.415 | 1 |
| lavaMD, lud, particlefilter, particles, srad | 134 | 25 | 3.14 | 0.388 | 1 |
Table A.4. Structurally valid five-family sets, ordered by near-ridge share (cases within 1.5 octaves of the balance point). Median octaves is the median ; balance is divided by the number of cases; collisions count member pairs with the same work shape and memory-access pattern. The selected set is in bold.
| GPU | Cases | Median | Maximum |
| A10 | 40 | 0.278 | 1.944 |
| A100 | 40 | 0.018 | 0.229 |
| H100 | 40 | 0.075 | 10.257 |
| MI300X | 59 | 0.056 | 0.579 |
| All | 179 | 0.076 | 10.257 |
Table A.6. Variation in profiled RAI across ten trials per case. Median and Maximum summarize the per-case CoV values within each GPU group; All summarizes all 179 cases. These characterize profiling variability, rather than confidence intervals on LLM accuracy. RAI CoV (%)
| Configuration | Acc. | Bal. | BB Prec. | BB Rec. | CB Prec. | CB Rec. | Uncl. |
| deepseek ZS-Code | 65.4 | 65.3 | 74.3 | 65.8 | 76.0 | 64.9 | 13.0 |
| gemini ZS-Code | 65.4 | 65.3 | 73.4 | 66.0 | 78.5 | 64.7 | 13.7 |
| gpt-5.6 ZS-Code | 80.0 | 79.5 | 75.4 | 91.2 | 89.3 | 67.9 | 0.7 |
| deepseek ZS-ISA | 83.9 | 84.0 | 91.0 | 82.6 | 88.6 | 85.3 | 6.6 |
| gemini ZS-ISA | 78.3 | 78.5 | 88.0 | 74.4 | 92.0 | 82.6 | 13.0 |
| gpt-5.6 ZS-ISA | 91.8 | 91.8 | 92.2 | 92.0 | 91.8 | 91.6 | 0.2 |
| deepseek AG | 75.3 | 75.6 | 90.6 | 68.2 | 87.7 | 83.0 | 15.4 |
| gemini AG | 53.9 | 54.3 | 91.9 | 43.9 | 91.1 | 64.7 | 41.1 |
| gpt-5.6 AG | 91.8 | 92.0 | 96.0 | 88.0 | 89.0 | 96.0 | 0.6 |
Table A.7. BB/CB classification metrics for every model and strategy (%; 895 runs each; 93 BB and 86 CB cases). Unclassified runs (Uncl.: no usable prediction or non-finite RAI) count as misses for accuracy and for recall of their true class; precision is computed over runs predicting that class. Bal.: balanced accuracy, the mean of the two recalls.
| GPU | Precision | BB | CB | Guess | Acc. (%) |
| A10 | FP32 | 24 | 6 | BB | 80.0 |
| A10 | FP64 | 1 | 9 | CB | 90.0 |
| A100 | FP32 | 7 | 23 | CB | 76.7 |
| A100 | FP64 | 2 | 8 | CB | 80.0 |
| H100 | FP32 | 14 | 16 | CB | 53.3 |
| H100 | FP64 | 2 | 8 | CB | 80.0 |
| MI300X | FP32 | 30 | 12 | BB | 71.4 |
| MI300X | FP64 | 13 | 4 | BB | 76.5 |
| All | 93 | 86 | by group | 73.2 |
Table A.8. GPU–precision majority lookup fitted and evaluated on the same 179 cases. BB and CB columns give reference-case counts; Guess selects the row’s majority class. Accuracy gives each case equal weight, equivalent to five repetitions per case; All pools the eight groups.
| Model | Strategy | Complete (n) | Accurate (n) | Accuracy All | Accuracy Complete |
| deepseek | ZS-ISA | 863 | 248 | 27.7 | 28.7 |
| deepseek | AG | 791 | 270 | 30.2 | 34.1 |
| gemini | ZS-ISA | 837 | 237 | 26.5 | 28.3 |
| gemini | AG | 572 | 239 | 26.7 | 41.8 |
| gpt-5.6 | ZS-ISA | 895 | 290 | 32.4 | 32.4 |
| gpt-5.6 | AG | 893 | 348 | 38.9 | 39.0 |
Table A.9. Numerical RAI accuracy within over all runs and among completed predictions (895 runs per configuration). Complete and Accurate give counts of usable results and estimates meeting tolerance. Under Accuracy, All uses 895 as the denominator and Complete uses the usable-result count; completed subsets differ by strategy. Accuracy (%)
| Configuration | All | |||
| deepseek ZS-ISA | 80 (26) | 93 (16) | 94 (52) | 84 |
| gemini ZS-ISA | 77 (26) | 89 (15) | 98 (46) | 78 |
| gpt-5.6 ZS-ISA | 79 (28) | 95 (19) | 98 (53) | 92 |
| gpt-5.6 AG | 81 (28) | 96 (19) | 97 (52) | 92 |
| Configuration | Same class Cases | Same class Correct | RAI within Cases | RAI within Accurate |
| deepseek ZS-ISA | 110/179 | 97.3 | 12/179 | 60 / 25 |
| gemini ZS-ISA | 105/179 | 93.3 | 27/179 | 52 / 22 |
| gpt-5.6 ZS-ISA | 147/179 | 98.6 | 51/179 | 55 / 23 |
| gpt-5.6 AG | 149/179 | 98.0 | 59/179 | 56 / 30 |
Table A.10. Exploratory reliability signals: single-run classification accuracy by predicted separation from the balance point (top) and five-run agreement (bottom). Single run: predicted distance from balance point. Five runs: agreement across repetitions. Top: classification accuracy (%), with the band’s share of all 895 runs in parentheses. Bands use the predicted RAI; failed or non-finite predictions fall in no band, so shares need not sum to 100. All: accuracy over all runs, with unsuccessful runs counted as misses. Bottom: cases (of 179) whose five predictions agree: all five give the same valid class (Same class), or all five RAI estimates are finite and positive with max/min (RAI within ). Correct: % classification accuracy within the agreeing cases. Accurate: % of predictions within of the reference in agreeing / remaining cases.
Table A.11: Five-run agreement for every model and strategy; case counts are out of 179. Same class: all five predictions give the same valid BB/CB class; Correct: classification accuracy of those predictions. RAI within 1.20×: all five RAI estimates are finite and positive with max/min ≤ 1.20; Acc.: % of predictions within 1.20× of the reference in agreeing / remaining cases. In / Out: agreeing RAI cases whose five predictions are all within, or all outside, 1.20× of the reference; the remaining agreeing cases contain a mixture of predictions within and outside tolerance.
| Configuration | Same class Cases | Same class Correct | RAI within 1.20× Cases | RAI within 1.20× Acc. | In | Out |
| deepseek ZS-Code | 104 | 77.9 | 20 | 9 / 8 | 1 | 18 |
| gemini ZS-Code | 95 | 77.9 | 10 | 2 / 9 | 0 | 9 |
| gpt-5.6 ZS-Code | 144 | 84.0 | 43 | 15 / 13 | 5 | 34 |
| deepseek ZS-ISA | 110 | 97.3 | 12 | 60 / 25 | 7 | 4 |
| gemini ZS-ISA | 105 | 93.3 | 27 | 52 / 22 | 12 | 11 |
| gpt-5.6 ZS-ISA | 147 | 98.6 | 51 | 55 / 23 | 28 | 23 |
| deepseek AG | 92 | 98.9 | 13 | 91 / 25 | 11 | 1 |
| gemini AG | 26 | 100.0 | 21 | 71 / 21 | 15 | 6 |
| gpt-5.6 AG | 149 | 98.0 | 59 | 56 / 30 | 30 | 24 |
Table A.11.
Table A.12: RAI accuracy within 1.20× and completion (usable prediction) by variant, for every model and strategy. Failed runs count as misses for accuracy; CI has fewer cases because particles CI is unavailable on MI300X/OpenCL.
| Configuration | Within 1.20× (%) O | Within 1.20× (%) CI | Within 1.20× (%) R | Within 1.20× (%) RD | Completion (%) O | Completion (%) CI | Completion (%) R | Completion (%) RD |
| deepseek ZS-Code | 6.2 | 15.0 | 8.9 | 0.9 | 97 | 94 | 95 | 73 |
| gemini ZS-Code | 6.2 | 11.8 | 12.4 | 4.4 | 90 | 94 | 92 | 89 |
| gpt-5.6 ZS-Code | 13.8 | 20.9 | 15.1 | 5.3 | 100 | 100 | 100 | 100 |
| deepseek ZS-ISA | 30.7 | 25.0 | 28.0 | 27.1 | 99 | 100 | 99 | 88 |
| gemini ZS-ISA | 27.6 | 28.6 | 26.2 | 23.6 | 96 | 94 | 93 | 92 |
| gpt-5.6 ZS-ISA | 32.4 | 30.5 | 34.2 | 32.4 | 100 | 100 | 100 | 100 |
| deepseek AG | 32.9 | 29.5 | 26.7 | 31.6 | 92 | 90 | 87 | 85 |
| gemini AG | 24.9 | 26.4 | 28.9 | 26.7 | 54 | 75 | 65 | 62 |
| gpt-5.6 AG | 39.1 | 39.1 | 36.9 | 40.4 | 100 | 99 | 100 | 100 |
Table A.12.
Table A.13: Representative gpt-5.6 traffic cases. (a) gpt-5.6 ZS-ISA on the O variant (CUDA on NVIDIA, HIP on MI300X): profiled total device-memory traffic, median predicted traffic over five runs, their ratio, and runs with RAI within 1.20×. MI300X has eight XCD-local 4 MiB L2 caches and a 256 MB Infinity Cache. (b) gpt-5.6 AG lavaMD runs (all variants and runtimes) whose tool-call arguments contain LRU cache-simulator code patterns (Detected); a pattern match does not confirm that the simulator ran, and other implementations may go undetected. RAI accuracy within 1.20× for runs with patterns detected / not detected is observational, since agents choose when to simulate.
| GPU | L2 (MiB) | Prof. (MB) | Pred. (MB) | Ratio | RAI in |
| lavaMD | |||||
| A10 | 6 | 290 | 195 | 0.67 | 1/5 |
| A100 | 40 | 152 | 141 | 0.93 | 2/5 |
| H100 | 50 | 149 | 137 | 0.92 | 5/5 |
| MI300X | 8 × 4 | 814 | 547 | 0.67 | 0/5 |
| particlefilter | |||||
| A10 | 6 | 2,198 | 117 | 0.05 | 0/5 |
| A100 | 40 | 323 | 82 | 0.26 | 0/5 |
| H100 | 50 | 370 | 71 | 0.19 | 0/5 |
| MI300X | 8 × 4 | 3,231 | 123 | 0.04 | 0/5 |
| particles | |||||
| A10 | 6 | 0.9 | 0.8 | 0.84 | 1/5 |
| A100 | 40 | 0.8 | 0.8 | 0.98 | 3/5 |
| H100 | 50 | 0.8 | 1.0 | 1.32 | 2/5 |
| MI300X | 8 × 4 | 4.8 | 0.8 | 0.16 | 1/5 |
| GPU | Detected | RAI acc. (%) detected / not |
| A10 | 15/40 | 33 / 12 |
| A100 | 10/40 | 100 / 97 |
| H100 | 5/40 | 100 / 97 |
| MI300X | 26/60 | 12 / 15 |
Table A.13.
Table A.14: Accuracy differences and paired case-bootstrap 95% intervals for the evaluation’s headline comparisons. Gain and interval are in percentage points, with positive values favoring the first strategy in Difference. Numerical accuracy uses the 1.20× tolerance; intervals use 20,000 resamples retaining all five repetitions per case and strategy, including unsuccessful runs.
| Model | Difference | Cases | Gain | 95% interval |
| RQ1: numerical RAI within 1.20× | ||||
| deepseek ZS-ISA − ZS-Code | 179 | 20.0 | [14.5, 25.5] | |
| gemini ZS-ISA − ZS-Code | 179 | 17.8 | [12.2, 23.6] | |
| gpt-5.6 ZS-ISA − ZS-Code | 179 | 18.7 | [12.0, 25.4] | |
| RQ2: classification, profiled | ||||
| gpt-5.6 ZS-ISA − ZS-Code | 40 | 37.0 | [19.5, 54.0] | |
| RQ4: numerical RAI within 1.20× | ||||
| deepseek AG − ZS-ISA | 179 | 2.5 | [−1.8, 6.6] | |
| gemini AG − ZS-ISA | 179 | 0.2 | [−3.4, 3.7] | |
| gpt-5.6 AG − ZS-ISA | 179 | 6.5 | [3.4, 9.6] |
Table A.14.

Figure A.21. Compiler evidence improves numerical accuracy at tighter tolerances, while coarser tolerances narrow some differences. Panels show RAI, total FLOPs, and total device-memory traffic as the numerical tolerance factor varies from 1 to 5 on a logarithmic axis; higher curves indicate more accurate predictions at that tolerance. Colors identify models and line styles identify strategies; vertical guides mark 1.20× and 2×. Every curve includes all 895 runs per configuration, with failed and incomplete predictions counted as misses.
| Configuration | 1.10× | 1.20× | 1.50× | 2× | 4× | 5× |
| deepseek ZS-Code | 3.4 | 7.7 | 20.2 | 31.2 | 56.1 | 60.3 |
| gemini ZS-Code | 4.5 | 8.7 | 21.7 | 32.8 | 58.2 | 60.3 |
| gpt-5.6 ZS-Code | 7.5 | 13.7 | 34.2 | 49.1 | 77.0 | 80.6 |
| deepseek ZS-ISA | 18.2 | 27.7 | 43.1 | 53.2 | 69.9 | 73.2 |
| gemini ZS-ISA | 17.0 | 26.5 | 37.4 | 47.9 | 69.4 | 72.5 |
| gpt-5.6 ZS-ISA | 20.7 | 32.4 | 45.6 | 59.7 | 76.5 | 80.6 |
| deepseek AG | 20.3 | 30.2 | 41.3 | 50.6 | 62.8 | 65.4 |
| gemini AG | 18.2 | 26.7 | 35.6 | 40.7 | 48.4 | 49.9 |
| gpt-5.6 AG | 23.9 | 38.9 | 53.9 | 66.0 | 78.0 | 81.1 |
Table A.15. RAI accuracy (%) at selected numerical tolerance factors for all nine model–strategy configurations. Each entry includes all 895 runs, with failed and incomplete predictions counted as misses; percentages are rounded to one decimal place.
References
- [1]Advanced Micro Devices, Inc. ROCm Compute Profiler: Pipeline metrics—FLOP counting conventions, 2026. URL https://rocm.docs.amd.com/projects/rocprofiler-compute/en/docs-7.2.0/conceptual/pipeline-metrics.html#flop-counting-conventions. ROCm 7.2.0 documentation.
- [2]Akhauri, Y., Song, X., Wongpanich, A., Lewandowski, B., and Abdelfattah, M. S. Regression language models for code, 2026. URL https://arxiv.org/abs/2509.26476.
- [3]Alayani, G., Varma, K., and Sarkar, S. Predicting execution time of CUDA kernel using static analysis. In 2018 IEEE Intl Conf on Parallel & Distributed Processing with Applications (ISPA/IUCC/BDCloud/SocialCom/SustainCom), pp. 948–955, 2018. doi: 10.1109/BDCloud.2018.00139.
- [4]Arafa, Y., Badawy, A.-H. A., Chennupati, G., Santhi, N., and Eidenbenz, S. PTT-GPU: Scalable GPU performance modeling. IEEE Computer Architecture Letters, 18(1):55–58, 2019. doi: 10.1109/LCA.2019.2904497.DOI
- [5]Baghsorkhi, S. S., Delahaye, M., Patel, S. J., Gropp, W. D., and Hwu, W.-m. W. An adaptive performance modeling tool for GPU architectures. In Proceedings of the 15th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP), pp. 105–114, 2010. doi: 10.1145/1693453.1693470.DOI
- [6]Baronio, C., Marsella, P., Pan, B., Guo, S., and Alberti, S. Kevin: Multi-turn RL for generating CUDA kernels, 2025. arXiv:2507.11948.arxiv.org/abs/2507.11948
- [7]Bolet, G., Georgakoudakis, G., Menon, H., Parasyris, K., Hasabnis, N., Estes, H., Cameron, K., and Oren, G. Can large language models predict parallel code performance? In Proceedings of the 34th International Symposium on High-Performance Parallel and Distributed Computing (HPDC), pp. 1–6, 2025a. doi: 10.1145/3731545.3743645.DOI
- [8]Bolet, G., Georgakoudakis, G., Parasyris, K., Menon, H., Hasabnis, N., Cameron, K. W., and Oren, G. Counting without running: Evaluating LLMs’ reasoning about code complexity, 2025b. URL https://arxiv.org/abs/2512.04355.
- [9]Braun, L., Nikas, S., Song, C., Heuveline, V., and Fröning, H. A simple model for portable and fast prediction of execution time and power consumption of GPU kernels. ACM Transactions on Architecture and Code Optimization, 18(1):7:1–7:25, 2021. doi: 10.1145/3431731.DOI
- [10]Che, S., Boyer, M., Meng, J., Tarjan, D., Sheaffer, J. W., Lee, S.-H., and Skadron, K. Rodinia: A benchmark suite for heterogeneous computing. In 2009 IEEE International Symposium on Workload Characterization (IISWC), pp. 44–54, 2009. doi: 10.1109/IISWC.2009.5306797.DOI
- [11]Chen, W., Zhu, J., Fan, Q., Ma, Y., and Zou, A. CUDA-LLM: LLMs can write efficient CUDA kernels, 2025. arXiv:2506.09092.arxiv.org/abs/2506.09092
- [12]Cummins, C., Seeker, V., Grubisic, D., Roziere, B., Gehring, J., Synnaeve, G., and Leather, H. Meta large language model compiler: Foundation models of compiler optimization, 2024. arXiv:2407.02524.
- [13]Emonds, Y., Braun, L., and Fröning, H. CUDAasap: Statically-determined execution statistics as alternative to execution-based profiling. In 2023 IEEE/ACM 23rd International Symposium on Cluster, Cloud and Internet Computing (CCGrid), pp. 119–130, 2023. doi: 10.1109/CCGrid57682.2023.00021.DOI
- [14]Guerreiro, J., Ilic, A., Roma, N., and Tomás, P. GPU static modeling using PTX and deep structured learning. IEEE Access, 7:159150–159161, 2019. doi: 10.1109/ACCESS.2019.2951218.DOI
- [15]Hong, S. and Kim, H. An analytical model for a GPU architecture with memory-level and thread-level parallelism awareness. SIGARCH Computer Architecture News, 37(3):152–163, 2009. doi: 10.1145/1555815.1555775.DOI
- [16]Jaber, J. and Jaber, O. AutoKernel: Autonomous GPU kernel optimization via iterative agent-driven search, 2026. URL https://arxiv.org/abs/2603.21331.
- [17]Jin, Z. and Vetter, J. S. A benchmark suite for improving performance portability of the SYCL programming model. In 2023 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS), pp. 325–327, 2023. doi: 10.1109/ISPASS57527.2023.00041.DOI
- [18]Kadosh, T., Hasabnis, N., Vo, V. A., Schneider, N., Krien, N., Wasay, A., Ahmed, N., Willke, T., Tamir, G., Pinter, Y., Mattson, T., and Oren, G. Scope is all you need: Transforming LLMs for HPC code, 2023. URL https://arxiv.org/abs/2308.09440.
- [19]Kadosh, T., Hasabnis, N., Vo, V. A., Schneider, N., Krien, N., Capotă, M., Wasay, A., Tamir, G., Willke, T., Ahmed, N., Pinter, Y., Mattson, T., and Oren, G. MonoCoder: Domain-specific code language model for HPC codes and tasks. In 2024 IEEE High Performance Extreme Computing Conference (HPEC), pp. 1–7, 2024. doi: 10.1109/HPEC62836.2024.10938441.DOI
- [20]Khairy, M., Shen, Z., Aamodt, T. M., and Rogers, T. G. Accel-sim: An extensible simulation framework for validated GPU modeling. In 2020 ACM/IEEE 47th Annual International Symposium on Computer Architecture (ISCA), pp. 473–486, 2020. doi: 10.1109/ISCA45697.2020.00047.DOI
- [21]Khan, Z., Chen, J. C.-Y., Cho, J., Stengel-Eskin, E., and Bansal, M. GPU forecasters: Language models as selective surrogates for kernel runtime optimization, 2026. URL https://arxiv.org/abs/2605.31464.
- [22]Lee, J., Ha, Y., Lee, S., Woo, J., Lee, J., Jang, H., and Kim, Y. GCoM: A detailed GPU core model for accurate analytical modeling of modern GPUs. In Proceedings of the 49th Annual International Symposium on Computer Architecture (ISCA), pp. 424–436, 2022. doi: 10.1145/3470496.3527384.DOI
- [23]Lim, R., Norris, B., and Malony, A. Autotuning GPU kernels via static and predictive analysis. In 2017 46th International Conference on Parallel Processing (ICPP), pp. 523–532, 2017. doi: 10.1109/ICPP.2017.61.DOI
- [24]Liu, S., Dong, X., Cao, J., Chu, R., Wang, Z., Wang, Q., and Bai, X. Mapo: Performance model driven GPU memory access code optimization. Future Generation Computer Systems, 184:108606, 2026. ISSN 0167-739X. doi: 10.1016/j.future.2026.108606. URL https://www.sciencedirect.com/science/article/pii/S0167739X26002402.DOI
- [25]Lopes, A., Pratas, F., Sousa, L., and Ilic, A. Exploring GPU performance, power and energy-efficiency bounds with cache-aware roofline modeling. In 2017 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS), pp. 259–268, 2017. doi: 10.1109/ISPASS.2017.7975297.
- [28]Nguyen-Nhat, M.-K., Do, H. D. N., Le, H. T., and Dao, T. T. LLMPerf: GPU performance modeling meets large language models. In 2024 32nd International Conference on Modeling, Analysis and Simulation of Computer and Telecommunication Systems (MASCOTS), pp. 1–8, 2024. doi: 10.1109/MASCOTS64422.2024.10786558.
- [29]Nichols, D., Davis, J. H., Xie, Z., Rajaram, A., and Bhatele, A. Can large language models write parallel code? In Proceedings of the 33rd International Symposium on High-Performance Parallel and Distributed Computing (HPDC), pp. 281–294, 2024a. doi: 10.1145/3625549.3658689.DOI
- [30]Nichols, D., Marathe, A., Menon, H., Gamblin, T., and Bhatele, A. HPC-Coder: Modeling parallel programs using large language models. In ISC High Performance 2024 Research Paper Proceedings, pp. 1–12, 2024b. doi: 10.23919/ISC.2024.10528929.DOI
- [31]Nichols, D., Parasyris, K., Jekel, C., Bhatele, A., and Menon, H. Integrating performance tools in model reasoning for GPU kernel optimization, 2025. arXiv:2510.17158.arxiv.org/abs/2510.17158
- [32]Novikov, A., Vũ, N., Eisenberger, M., Dupont, E., Huang, P.-S., Wagner, A. Z., Shirobokov, S., Kozlovskii, B., Ruiz, F. J. R., Mehrabian, A., Kumar, M. P., See, A., Chaudhuri, S., Holland, G., Davies, A., Nowozin, S., Kohli, P., and Balog, M. AlphaEvolve: A coding agent for scientific and algorithmic discovery, 2025. arXiv:2506.13131.arxiv.org/abs/2506.13131
- [33]NVIDIA. Nsight Compute: Known issues. Online documentation, 2026. Profiling and Metrics. Accessed 2026-10-30.
- [34]NVIDIA Corporation. CUDA Samples: particles—particles, 2018. URL https://docs.nvidia.com/cuda/archive/10.0/cuda-samples/index.html#particles. CUDA Toolkit 10.0 documentation.
- [38]Ouyang, A., Guo, S., Arora, S., Zhang, A. L., Hu, W., Ré, C., and Mirhoseini, A. KernelBench: Can LLMs write efficient GPU kernels?, 2025. arXiv:2502.10517.arxiv.org/abs/2502.10517
- [39]Peng, Y., Gotmare, A. D., Lyu, M. R., Xiong, C., Savarese, S., and Sahoo, D. PerfCodeGen: Improving performance of LLM generated code with execution feedback. In 2025 IEEE/ACM Second International Conference on AI Foundation Models and Software Engineering (Forge), pp. 1–13, 2025. doi: 10.1109/Forge66646.2025.00008.DOI
