---
title: "GPU Kernel Scientist — paper by Andrews and Witteveen (2025)"
description: "GPU Kernel Scientist uses benchmark timings to guide automated HIP kernel optimization on AMD MI300, improving on the PyTorch reference."
canonical: "https://research.elamur.ai/free/en/papers/andrews-2025-gpu-kernel-scientist-llm-driven/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/andrews-2025-gpu-kernel-scientist-llm-driven/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2025](https://md.research.elamur.ai/free/en/papers/2025/) / GPU Kernel Scientist: An LLM-Driven Framework for Iterative Kernel Optimization

# GPU Kernel Scientist: An LLM-Driven Framework for Iterative Kernel Optimization

Paper · 2025 · Martin Andrews and Sam Witteveen

**Authors:** Martin Andrews and Sam Witteveen · **Year:** 2025 · **Venue:** arXiv:2506.20807 · **Licence:** [CC BY-NC-ND 4.0 (arXiv)](http://creativecommons.org/licenses/by-nc-nd/4.0/)

Cited by **23** papers in our library of more than 163,000 papers whose bibliographies we read · [licence](http://creativecommons.org/licenses/by-nc-nd/4.0/)

- [PDF](https://arxiv.org/pdf/2506.20807)
- [arXiv 2506.20807](https://arxiv.org/abs/2506.20807)

## Summary

Making a GPU kernel faster typically means working out which part of the computation holds it back. On the AMD MI300, the authors faced a harder version of that problem. They were writing a low-precision matrix multiplication kernel with few examples of the relevant hardware operations, and their competition interface returned only the time taken by the whole kernel for each input shape. GPU Kernel Scientist asks whether a system can make progress under those conditions by proposing code changes, testing them remotely and carrying the results into later experiments. The study is an example of [GPU parallel computing](https://md.research.elamur.ai/free/en/topics/gpu-parallel-computing/).

The system starts with a small collection of implementations, including the supplied PyTorch reference and versions written in HIP. In each round it chooses a version to modify and another to consult. It uses the code and relevant technical material to propose experiments, then turns selected plans into new HIP implementations. The competition platform runs the candidates, and the workflow records the results alongside the code and its ancestry. The selector sees timings for 6 matrix shapes. An implementation that performs well overall can become the next starting point, while an older version with an advantage on a particular shape can help guide the next change.

In the AMD Developer Challenge, the authors report approximate execution times of 850 µs for the PyTorch reference, 5000 µs for a naïve HIP implementation and 450 µs for GPU Kernel Scientist. The leaderboard metric was the geometric average of execution times over 18 matrix input sizes. The generated implementation described in the appendix uses AMD Matrix Cores for multiplication and stages data in shared memory. The paper also shows examples of how the system selected earlier versions and proposed changes to memory layout and output writes. Those examples explain how the search proceeded. The measured result applies to the optimized implementation as a whole.

The case establishes that a timing-driven search can improve a particular kernel on an unfamiliar target after a working starting point has been built. Getting to that point involved human collaboration, documentation gathering and probes of hardware behavior through the competition interface. The paper studies a narrow workload, and its evidence leaves open how much the search gained from its individual stages, how consistently a fresh run would find a fast implementation and how the method would perform on other kernels or devices.

## Deep dive: GPU Kernel Scientist: An LLM-Driven Framework for Iterative Kernel Optimization

GPU Kernel Scientist uses benchmark timings to guide automated HIP kernel optimization on AMD MI300, improving on the PyTorch reference. · about 31 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### What makes a kernel difficult to optimize

A GPU kernel is a routine that runs on the graphics processor. The task here is matrix multiplication with additional scaling. There are many ways to arrange the same calculation. An implementation can divide the matrices into tiles, decide which groups of threads handle each tile, choose where intermediate data lives and distribute the work of writing the answer. The result must agree with the task specification across the required inputs. Within that constraint, the arrangement of the work can make a substantial difference to elapsed time.

Matrix Cores are the specialized units the authors wanted to use for the multiplication. Calling one of their operations requires the inputs to be laid out as the operation expects. The paper describes an early difficulty in working out how the pieces of a matrix should be distributed among the threads operating together. A kernel can express the intended arithmetic yet still fail to compile, fail to run or produce incorrect answers because its assumptions about the instruction or data layout are wrong. The authors had to resolve enough of these issues to create a working starting point before the iterative search could concentrate on speed.

Documentation can make that work easier if it covers the operations, data types and target device that the programmer is using. The authors describe a substantial imbalance between the CUDA material they could consult and the resources they found for their AMD target. The AMD sources included a hardware reference, a matrix-instruction calculator and the rocWMMA library. Useful explanations of matrix multiplication and specialized hardware were also available for CUDA. They could suggest a strategy, such as staging inputs in tiles, while leaving open how that strategy should be expressed for AMD.

The competition interface imposed a distinct constraint. A profiler could have supplied information about activity inside the running kernel. The authors had elapsed times for full executions at specified input shapes. If a candidate takes longer, that observation gives a reason to reconsider the change. It gives little direct guidance about whether the cause was data movement, the distribution of work, a change in synchronization or some interaction among them. The shape-by-shape timings retain useful structure because a candidate can help one shape while hurting another. Explaining that pattern still requires a hypothesis.

The paper brings these constraints together in a concrete question. Given a working implementation, source material of uneven relevance and a remote benchmark that reports elapsed time, can an automated process make informed changes and use the results to guide later ones? The authors chose a relatively complex competition kernel and one unusual hardware target. This let them spend effort on the successive revisions of a single implementation, including the work needed to reach a sound starting point. A benchmark spanning varied kernels would address a broader question about how often such a system can do useful work.

#### How the paper situates the search

The authors trace the use of evolutionary search for programs back to genetic programming. In the older approach they describe, programs were represented as trees. A search could vary a program by changing part of its tree or by combining parts of existing programs. In GPU Kernel Scientist, the objects carried forward are actual kernel implementations. A system can draw from a prior program, reinterpret a strategy and make several related edits required to express it. The paper links this use of program ancestry to the work behind [Mathematical Discoveries from Program Search](https://md.research.elamur.ai/free/en/papers/paredes-2023-mathematical-discoveries-program-search-large/) and [AlphaEvolve](https://md.research.elamur.ai/free/en/papers/novikov-2025-alphaevolve-coding-agent-scientific-algorithmic/).

The authors discuss that flexibility in terms of mutation and crossover. Mutation changes a parent program. Crossover uses material from more than one parent. In this framework the two selected programs have unequal roles. One supplies the implementation to revise, and the other can supply a comparison, a technique or a clue about a tradeoff. There is no prescribed boundary where the program must be split, and the second program can influence an experiment without contributing a literal piece of code. The paper also points to the possibility of evolving the instructions used to generate programs, as investigated in [Promptbreeder](https://md.research.elamur.ai/free/en/papers/fernando-2023-promptbreeder-self-referential-self-improvement/). Its own method describes a staged workflow with defined responsibilities.

The idea of a scientist enters at the point where a revision can be formulated as an experiment. A candidate can be motivated by a proposed explanation, such as a mismatch between the arrangement of an input tile in shared memory and the arrangement expected by a matrix operation. Given that motivation, the writer can make a set of related changes and the benchmark can determine whether the resulting program is faster. That sequence resembles a narrow part of the workflows the authors discuss in connection with [The AI Scientist](https://md.research.elamur.ai/free/en/papers/lu-2024-ai-scientist-fully-automated/) and [The AI Scientist-v2](https://md.research.elamur.ai/free/en/papers/yamada-2025-ai-scientist-v2-workshop/). The scope here is performance engineering for a fixed computation under an existing evaluation procedure.

The paper also compares its setup with AI CUDA Engineer. The relevant distinctions are the workload, the hardware and the feedback available to guide a change. GPU Kernel Scientist concentrates its search on a relatively involved AMD kernel, with no profiling information and no collection of previously benchmarked kernels to consult. The authors cite [KernelBench](https://md.research.elamur.ai/free/en/papers/ouyang-2025-kernelbench-llms-write-efficient-gpu/) as a way to investigate kernel generation across a much larger set of challenges. Their own workload comes from the AMD Developer Challenge, so the choice of task reflects a competition objective. The paper treats growing hardware variety as a reason to study adaptation to a particular device in depth.

The authors identify another connection to automated tuners such as OpenTuner and Kernel-Tuner. A tuner can search the settings of an implementation, including choices analogous to hyper-parameters. A tile size is the kind of setting a kernel can expose for such a search. GPU Kernel Scientist can make changes larger than a setting adjustment. For instance, it can propose that different threads take responsibility for storing the result, with corresponding changes to the output code. The authors see room for both approaches in the same development process since a search over settings could refine an implementation after structural changes have been made.

Finally, the paper places HIP alongside tools designed to make advanced kernel patterns easier to express. It names [Triton](https://md.research.elamur.ai/free/en/papers/tillet-2019-triton-intermediate-language-compiler-tiled/), TileLang and ThunderKittens. The competition supported Triton among those options, and the authors were uncertain about its coverage of the low-precision operations they wanted to use on AMD. They chose to work directly in HIP, the programming interface used by the candidate kernels. This choice made the problem of getting the matrix operations to work part of the study. It also meant that later experiments could revise the code involved in staging data, calling those operations and writing the result.

### The method, step by step

#### Preparing code and knowledge before the search

A round of optimization begins with a prior implementation and ends with a new version that can be evaluated. Before those rounds can run, the process needs executable code, a way to check it against the task and enough knowledge of the hardware to make useful changes. The authors assembled a seed collection containing the supplied PyTorch implementation, a straightforward HIP translation and a HIP implementation using AMD Matrix Cores. The seeds exposed different possibilities. The PyTorch code expressed the computation the competition expected. The direct translation gave the search a simple HIP version. The Matrix Core implementation established a way to use the arithmetic units the authors wanted to exploit.

Getting the Matrix Core version working took experiments of its own. Scarce examples left questions about how low-precision operands could be passed to the compiler intrinsics, the operations by which the code calls particular hardware capabilities. The authors describe probing the competition interface and using compilation and execution responses to investigate what those operations did. The system proposed debugging steps and could ask for human intervention to obtain the needed observations. Correctness was important at this stage. A fast timing would have little meaning if the kernel had misunderstood the arrangement of the inputs or computed the wrong result.

The resulting knowledge was condensed into a findings document, which included pseudocode for a fast implementation. The purpose was to pass on working knowledge in a form that could accompany later code. The authors also drew on the AMD references and on CUDA material. They had relevant portions summarized for the specific task, so a subsequent experiment could begin with an explanation of a technique and a working AMD example. When more documents turned up during optimization, the authors could put them through the same process and make the resulting notes available to the experiment designer.

This preparation is the main distinction between starting a search and running one. The design does not involve a reported training procedure that fits parameters on a collection of kernels. It supplies technical material and examples as context and builds a history of experiments as code is tested. The paper identifies the text-generation services used in the workflow as Gemini 2.5 Flash Preview 05-20 and Gemini 2.5 Pro Preview 05-06. It identifies the Pro service with the kernel-writing stage. The context changes from one round to another as the search chooses different programs and new records become available.

From working HIP kernels to benchmarked revisions The steps in order.

#### Choosing what to modify and what to consult

The selector sees a population of kernel versions. Each has an identifier, the identifiers of its parents and benchmark results for 6 prescribed matrix configurations. Those records give it two types of evidence. Timings show where a candidate did well or poorly. Ancestry shows how versions are related, which can make one comparison more informative than another. The selector assigns a version to the base role and another to the reference role.

The base is the implementation that the writer will change. A version with consistently low timings makes a natural choice because it already embodies several successful changes. The shape-level results matter when deciding how strong that starting point is. A version can look attractive in aggregate while leaving a particular shape behind. The method delegates the judgment to the selector, with no separate mathematical rule reported for weighting inputs, measuring the distance between related implementations or deciding which tradeoff is worth investigating.

The reference provides a way to examine the base. A direct parent can help explain what was changed in the most recent promising step. A version from a branch with a common ancestor can show another way to modify similar code. An older version with a better timing on a particular shape can prompt a closer look at the strategy it uses for that case. In each situation the value of the reference comes from a relationship. Its position in an overall ranking is only one part of that relationship.

The appendix illustrates these choices with actual run identifiers. In one example the selector chose `00052` as its base and `00046` as its reference. It described `00052` as the strongest overall candidate so far. The branch containing `00046` diverged from the same ancestor, `00037`, and had an advantage on the first benchmark. In another example `00089` became the base and its immediate parent `00087` became the reference. That pairing let the writer examine the last transition from an already optimized version. The selector also paired `00097` with its ancestor `00091` because the latter had a useful advantage on a particular matrix configuration. These are examples of the selector's recorded reasoning.

The distinction between the two roles affects the code handed to the next stages. The experimental plan concerns the base. The writer receives both implementations and can consult the reference while producing a version derived from the base. For instance, if a faster parent changed the division of labor among threads, the comparison could reveal which parts of that change were connected. The reference can be useful even if no lines are copied. Both working implementations are concrete evidence about what has already been attempted.

#### Turning a broad direction into an experiment

The designer starts from the selected base and the relevant technical knowledge. It first proposes 10 avenues for exploration. An avenue is a potential source of improvement, such as changing how inputs are arranged in shared memory, widening memory loads or adjusting the size of the tiles. This part of the prompt gives the designer space to consider different portions of the kernel before specifying actual edits. The authors say they found the longer list helpful for diversifying what came next. The paper illustrates that observation with an example of the generated list.

From those avenues the designer produces 5 plans. Each plan describes an experiment, gives an implementation rubric and estimates both the range of possible performance benefit and the novelty of the idea. The rubric is a set of instructions about the code to change and the behavior to preserve. It gives the writer enough detail to know which part of the implementation should change. It also leaves room for a judgment about how to carry out the proposed design in the surrounding code.

One appendix plan focuses on the interface between a routine that moves tiles into shared memory and the rocWMMA operations that will consume them. Shared memory, called Local Data Share or LDS in the paper, is used to stage input tiles near the computation. The plan examines the order in which elements are placed there. If the program places values in an order that is awkward for the fragment load, the shape of the input tile can make the arrangement inefficient. The designer proposes reordering the data during the transfer from global memory into LDS to match the fragment definitions. It also leaves room to adjust padding, which changes the spacing of the stored elements.

The planner describes the benefit it expects from this layout proposal with the range `15, 40` and assigns it an innovation score of `85`. Another proposal has the range `5, 15` and an innovation score of `60`. These are the entries recorded in the appendix example. They are forecasts issued before evaluation, and the numbers are attached to the plans rather than to benchmark runs. The paper supplies no corresponding measured times for these two examples that would show how well the forecasts held up.

The second proposal concerns writing the output. In the base discussed in the plan, one wave is responsible for the final store. A wave is a group of threads that executes together. The plan asks what would happen if the store work were distributed among the waves participating in a block. This raises a concrete implementation requirement. Each participating thread needs a defined set of output elements and must respect the boundaries of the output tile. Dividing up the work changes which locations threads write and gives the experiment a correctness condition as well as a performance objective.

The workflow selects 3 of the 5 plans without replacement. It targets the proposal rated most innovative, the one with the highest upper estimate of benefit and the one with the highest lower estimate. The criteria serve different purposes. The upper estimate can favor a change with a large possible gain. The lower estimate can favor a plan whose forecast is more favorable at the cautious end of the range. Novelty can preserve an experiment that the performance forecasts alone would rank lower. The paper gives the selection criteria and the requirement for distinct plans. Its description leaves the handling of ties and overlapping winners unspecified.

#### Writing a testable implementation

Each selected plan is sent to its own instance of the kernel writer. The writer receives the competition task description and the basic PyTorch implementation, which remain the reference for the intended computation. It receives the findings document and its pseudocode, the selected base and reference code, and a short history of how each of those programs was produced. For each listing, the history includes the experiment leading to it and the timings of the version and its parent. The writers see a local comparison tied to the code in front of them.

This arrangement matters when an experiment requires changes in several places. A new shared-memory arrangement can affect the routine that loads a tile, the fragment declaration that describes its layout and the assumptions made when a matrix operation reads it. Editing one of these in isolation could leave the rest of the program expecting the old arrangement. The writer is tasked with making the implementation coherent across such changes. It then returns the HIP code and the calling code that allows the implementation to integrate with PyTorch.

The writer also describes the techniques it actually used. The authors added this report to the short experiment history because the implementation sometimes covered only part of the rubric. A plan can express what should be tried, but the code determines what reaches the benchmark. If the writer abandons part of a change or adapts it to the base, a later round needs that distinction to interpret the timing. Recording the implemented techniques keeps the proposed intervention and the resulting program connected without treating them as equivalent descriptions.

The independent writing requests allow multiple proposals to be elaborated from the same starting point. The resulting candidates go to the competition evaluation interface sequentially. The available command-line interface made a closed loop possible, and the authors chose to avoid parallel requests to the shared service. The benchmark times are entered in the history when the candidate is evaluated. Alongside the code and parent information, they become new evidence that the selector can use. The same version can later serve as a base if its timings are attractive or as a reference if it shows an interesting effect on a particular shape.

The paper names no training split for this process. The inputs to the search include the task specification, seed code, technical notes and records of attempted programs. The empirical feedback is generated by running kernels on the competition platform. This is why the collection of candidate programs is central to the method. An individual writing request operates on the versions and observations placed in its context. The wider process can reuse a program and its measured behavior long after it was first produced.

#### What the generated kernel computes

The appendix describes one generated HIP kernel, and the paper makes example code available in its supplementary materials. The example is a general matrix multiplication, abbreviated GEMM, with scaling applied to the accumulated output. The basic multiplication is written as follows.

```
C = A × B
```

A and B are the input matrices. C is their matrix product before the additional output scaling is taken into account. The symbol × denotes matrix multiplication, and = identifies the result of the expression on the right. In each output position, multiplication combines a row of A with a column of B and accumulates contributions along the dimension they share.

The benchmark labels configurations with three size dimensions.

```
M × K × N
```

M is the row dimension of the product, K is the dimension over which products are accumulated and N is the column dimension of the product. In this expression the × signs separate the dimensions in a configuration label. Changing K changes the extent of the accumulation for an output element. Changing M or N changes the extent of the output. The paper's experiments can therefore encounter different work sizes even though the operation that the kernel implements stays the same.

The generated example takes FP8 inputs, accumulates in FP32 and converts the result to BF16 for output. This is mixed-precision arithmetic because the representation used for the operands, the running sum and the stored result differs across stages. The example uses rocWMMA to express AMD Matrix Fused Multiply-Add operations. A fragment is the representation of a piece of a matrix or accumulator used by those operations. The reported kernel uses the `32x32x16` variant, with the dimensions describing the tile involved in a matrix operation. Work proceeds on pieces of the matrices sized for the implementation rather than on the full input arrays in a single hardware call.

The scaling in the appendix can be expressed in Unicode as follows.

```
scaled value = accumulated value × A scale × inverse B scale
```

The scaled value is the element prepared for conversion to BF16. The accumulated value is the FP32 result of the multiplication and accumulation for that position. A scale is the applicable factor supplied for the A input, and inverse B scale is the reciprocal of the applicable factor supplied for B. Each × here is multiplication of individual values. The = sign gives the value sent on to the output conversion. The factors come from separate inputs to the kernel, and the multiplication by them takes place before the cast to BF16.

The appendix describes the code in terms of what happens to the tiles between loading an input and storing an output. The example stages A and B in shared-memory buffers. Its double-buffered arrangement provides a pair of buffer sets so the storage designated for the next tile is separate from the one currently used by the arithmetic. The arrangement is intended to let the kernel make progress on data movement and calculation within the same pipeline. Workgroup synchronization keeps threads from using a buffer before its contents are ready or reusing a buffer while its old contents are still needed.

Once a region has served its role in staging a tile, the example can use that storage for scale factors. The appendix describes reusing space from the A buffers and interpreting it as floating-point storage for the scales. The reuse depends on the original values having finished their role in the computation. Threads in the block cooperate to put the scales into the available region. This is a concrete example of a structural revision that concerns how long values remain live as well as how much storage they occupy.

The example also divides responsibility differently at different stages. The threads cooperate on the global memory loads. The appendix describes multiple waves performing matrix operations on the same staged inputs, with accumulations held in their own registers. One wave performs the final global write, avoiding multiple waves writing the same locations. The broader write-back plan in the experiment-design appendix proposes a different arrangement. It illustrates a possible experiment on that design choice and does not establish that the illustrated output kernel implements the proposal.

Input and output layouts determine the order in which matrix elements sit in memory. The example uses column-major global layouts for A and B and a row-major layout for C. A vectorized transfer can move several adjacent FP8 elements at once. The appendix attributes the rearrangement and packing of loaded fragments to rocWMMA and describes the custom loading routines in terms of their linear and vectorized transfers. Together these details show the level at which the generated program operates. The workflow is proposing revisions to specific choices about data movement, arithmetic and thread responsibilities within a working HIP kernel.

### Experiments and results

#### What the competition measures

The authors evaluated the framework through the AMD Developer Challenge on an AMD MI300. The key inputs are matrices with competition-specified configurations. The paper describes 6 configurations whose timing results are presented to the selector, and it identifies 18 specific matrix input sizes for the leaderboard measure. Those counts describe distinct parts of the experimental account. The first specifies the shape-level evidence supplied to the search. The second specifies the evaluation underlying the leaderboard. The paper does not map the configurations in one set to the other or establish a formal holdout split between them.

Execution time is reported in microseconds. For the leaderboard, the competition combines the times over the 18 sizes with a geometric average. A geometric average combines positive values multiplicatively. A lower value is preferable because it represents less execution time on the benchmark as aggregated by the competition. The aggregate enables a direct comparison between implementations under the leaderboard metric. The per-shape measurements available during the search can reveal differences that such an aggregate hides.

Correctness is a separate concern in the workflow. During bootstrapping, the authors used the competition interface to establish that a working version returned the right results. The code continued to be written with the task specification and PyTorch implementation in context. The headline quantitative comparison reports time. The paper does not give an accuracy score for each candidate, a count of failed candidates or a breakdown of compilation, execution and correctness failures. Its evidence about those outcomes is mainly a description of the initial debugging and the authors' later impressions of the writer.

The experiment concerns kernel time on the target device. The framework also takes time to produce a plan, write code and wait for remote evaluation. These costs matter to somebody using the system, especially when submissions are sequential. They do not appear in the competition execution times. A low leaderboard number can establish that the search produced a fast program under the benchmark conditions. It leaves the cost of reaching that program as a separate question.

#### The implementations compared

The PyTorch reference uses library FP16 operations, according to the results table. It supplies an existing implementation of the required computation and a practical timing comparison. The naïve HIP result gives a second point of comparison. It represents a direct translation of the operation into HIP before the more elaborate work on the kernel. Having both comparisons makes the starting situation clear. The supplied framework code was already substantially faster than the straightforward HIP translation, so a custom implementation had to do more than reproduce the computation in a different programming interface.

The paper gives approximate execution times of 850 µs for the PyTorch reference and 5000 µs for naïve HIP. GPU Kernel Scientist is reported at approximately 450 µs on the same competition metric. These are the paper's illustrative aggregate values. They show the optimized custom implementation outperforming both reported starting comparisons under the competition measure. They do not reveal whether the ordering held at every input size or which inputs contributed most to the aggregate.

Approximate geometric average execution time on the AMD Developer Challenge matrix benchmark GPU Kernel Scientist has the lowest reported aggregate time among the implementations shown.

**The numbers**

| System or setting | µs |
| --- | --- |
| Naïve HIP | 5000 |
| PyTorch reference | 850 |
| GPU Kernel Scientist (this paper) | 450 |

The results table also refers to the leading human entry and includes a note associating hardware access with the top-8. The authors explicitly say they do not know the highest leaderboard position attained by a human entrant who lacked access to an actual MI300. That uncertainty matters because direct access can change both the detail of the feedback a developer receives and the speed with which they can try changes. The table supports a comparison with the two timed implementation baselines above. The paper leaves a human comparison under matched access unresolved.

The experiment is also distinct from a comparison across independent optimizer frameworks. The related-work discussion identifies other ways to tune or generate kernel code, while the results table compares implementations produced in and around this competition task. Both baselines tell the reader something about the final program. The PyTorch reference shows how it compares with the supplied implementation, and the naïve version shows how much room a direct HIP translation leaves for optimization. Neither comparison gives another search process the same seeds, evaluation opportunities and time budget.

#### What the run records reveal

The selection examples provide a closer view of the information available during optimization. The rationale for selecting `00089` cites strong overall timings and favorable performance across most of the configurations the selector saw. Its parent `00087` was useful because the code exposed an adjacent step in the lineage. This helps explain how an overall comparison could lead to a focused next round. The search can work from a good current candidate while examining changes that have recently been made.

The comparison between `00097` and `00091` brings out a different use of the timings. The ancestor retained an advantage at the benchmark with `m=6144, k=512, n=4096`, according to the selector's rationale. The lower-case letters denote the same dimension roles used in the matrix configuration notation. That observation tells the selector which previous version has a property worth studying for that shape. The appendix does not give the two actual timings for the pair, so it documents the basis for choosing the reference without quantifying the size of the advantage.

Likewise, the branch ending in `00046` offered a favorable result on the first benchmark described in the selector's record. The other branch, represented by `00052`, offered the better overall starting point in the selector's judgment. Taken together, the examples show why the history stores a vector of shape-level results. An aggregate can help nominate a base, while individual entries in the vector can motivate a reference. The appendix shows examples of the system using both kinds of evidence in those roles.

The experiment plans provide a different kind of record. An estimate such as `15, 40` is a planning input, while a timing in microseconds is a measurement produced by the platform. The innovation scores describe how the designer ranked the character of a proposal. Keeping these quantities distinct helps explain what the experiment established. The competition measurements show that the overall procedure reached a fast implementation. The appendix plans show the sorts of predictions and expectations the procedure used to allocate its trials.

### What the ablations show

The paper gives no formal component ablations and instead offers selection records, sample experiment plans, qualitative observations about attempts to isolate performance effects, and a description of a generated kernel.

#### What can be learned from comparing versions

The authors report that the system sometimes designed a test to isolate the effect of a specific change. This is an important use of timing feedback. If a candidate differs from the base in a tightly defined way, and both run the same shape through the same evaluation interface, a timing change can be associated with that intervention more readily than with a broad rewrite. What the observation attributes to the code still depends on what was implemented. A layout experiment may require coordinated edits to the loading code and the matrix fragments, making the tested unit a set of changes even when it has a single purpose.

The records of selected versions illustrate different comparisons the system found informative. A direct parent of a promising implementation allows a close look at the most recent transition. Branches from a common ancestor provide different realizations of a broadly similar starting point. An ancestor with a shape-specific advantage can draw attention to behavior that disappeared during overall improvement. The evidence in the appendix concerns the ability of the selector to articulate those reasons and pass a relevant comparison to the writer. It does not show how a search would have performed if allowed to choose only the fastest version and carry it forward alone.

The paper's baseline measurements add evidence at the level of complete programs. Both the naïve HIP kernel and the optimized HIP result implement the competition computation, but the versions differ in many choices about hardware operations, memory and parallel work. That comparison is appropriate for judging the performance of the delivered implementation. To identify the independent effect of a choice such as double buffering, the experiment would have to hold the other relevant features fixed or document the interacting changes. The paper does not report those measurements for the final result.

The writer's implementation report is relevant to this gap. The authors observed that a generated program could carry out only part of the proposed experiment. Even a well-formed plan therefore needs a factual account of the changes made before its measurement can be interpreted. If a plan calls for an input layout change and a padding adjustment, and the writer implements only the layout change, the trial offers evidence about the resulting layout implementation. The original plan is an incomplete description of that trial. This is also why a sequence of version histories is more informative than a list of predictions about possible gains.

#### What the appendix examples establish

The shared-memory layout plan illustrates how broad architectural knowledge was made specific. The designer named the code responsible for moving data into local storage, examined the fragment types used by matrix operations and described a revised ordering for A and B. The plan thus contains a hypothesis and an intervention that a writer can act on. The record establishes that the system could express a plausible optimization at the level of the actual program. It leaves the magnitude and even the direction of the measured effect of that particular proposal unreported.

The proposed cooperative output store illustrates a second kind of intervention. Its premise is that more waves may help carry out the write-back. The plan identifies the current restriction and spells out that any new scheme has to assign disjoint output work and handle the tile boundaries. The kernel examined in a separate appendix discussion still uses a single wave for the final store. The paper presents both pieces as examples, without tying the proposed experiment to the code listing as a before-and-after comparison. The pair shows how the process can consider a design alternative while the implementation it describes retains another arrangement.

The discussion also observes that the writer produced valid code in spite of significant structural edits. The authors suggest that supplying known-working code in context may have helped. There is no comparison that removes that context or replaces it with a task description alone. The finding is an observation about how the workflow operated with its chosen inputs. The proposed explanation is plausible because working code supplies details about acceptable layouts, types and calls, but the study does not estimate how much those examples contributed to compilation or correctness.

The same distinction applies to planning and selection. The authors used a long initial list of avenues to encourage variety, then chose plans by novelty and optimistic and cautious forecasts. The sample plans show that those criteria can bring substantially different changes into consideration. No run compares that rule with random selection, performance estimates alone or executing every proposed plan. The paper supports the account of how the design allocates the available trials. It provides no comparative estimate of the resulting gain in search quality.

The analysis of the generated program provides concrete architectural detail, including specialized arithmetic, buffering, scale caching and division of the work among waves. These features give the reader a basis for understanding what an optimized candidate can look like. The accompanying explanations of why each feature might help describe the behavior of the code and its intended performance benefits. The reported timing belongs to a complete implementation. The paper does not partition that timing among the features or measure how their effects interact.

### Limitations

#### Limits stated by the authors

The authors emphasize the lack of profiling data. Timing a full execution makes it possible to decide which implementation ran faster on a given shape. It leaves the optimizer with an indirect view of what happened inside the kernel. The authors expect richer feedback to make the search more focused. Their paper demonstrates optimization under the restricted interface and does not include an experiment in which the same system uses profiler output. The expected improvement from that added information remains a proposal.

The evaluation interface also limited how rapidly the search could gather evidence. The writers could work on independent plans, but evaluations were submitted sequentially. The authors describe that choice as a courtesy to the shared service and say it limited the number of kernels they could process. A candidate entering the selection history had to wait for its benchmark turn. The paper does not quantify the throughput of submissions or report the elapsed time taken by a full optimization run.

The authors also note the limited availability of target-specific documentation. They compensated with summaries of relevant resources, knowledge transferred from CUDA material and experiments that probed the hardware through the platform. Their discussion of bootstrapping includes occasions when the system needed human intervention to keep debugging. They describe giving it control over decisions about code changes after this preparation. Their account thus identifies a specific stage at which the iterative decisions were automated and a preparatory stage in which people helped collect evidence and establish working code.

A comparison with human entrants under similar conditions remains open. The authors lacked information about the best result from a human entrant with no direct access to the MI300. They suggest that access to profiling and faster iterations for tuning settings would help their own system as well. The competition figures characterize the submitted programs under the published timing measure. They do not settle what either people or the automated workflow would have achieved with the same information, access and opportunity to iterate.

The authors propose adapting the workflow to other devices and programming frameworks. They also propose automating the expansion of the technical knowledge available to the system. In the reported run, new material could be supplied and condensed for the designer when the authors found something relevant. A mechanism for finding and incorporating new documentation automatically is a future direction. The authors also suggest that kernels written by human competitors could serve as additional technical examples. The paper does not report a test of their effect on the search.

#### Limits of the experimental setup

The narrow workload supports an existence claim about improvement on the documented task. Estimating general performance would require evidence across more kernels, devices or programming environments. This study uses the same target and a particular class of scaled matrix multiplication throughout. The seed tied to AMD Matrix Cores, the findings document and the candidate code all depend on that setting. Even with the same orchestration on a different target, the useful source material, starting implementation and available measurements could change considerably.

There is also no reported distribution of outcomes across repeated searches. The time of roughly 450 µs describes the result presented in the competition comparison. The paper does not give a repeat-run success rate, a range of outcomes across complete searches or a sample of runs that were halted after an identical number of evaluations. A reader can see that the procedure reached the reported result. The available evidence gives no estimate of how reliably another run, beginning from the same seeds, would reach a comparable implementation.

The role of the starting programs deserves particular attention. Early collaboration produced working HIP code that invokes the specialized hardware. The optimizer could subsequently revise that code with verified behavior as a starting point. The paper does not isolate the performance of the Matrix Core seed in the main comparison or trace all benchmark improvements from that version to the reported result. The causal contribution of creating the initial hardware-specific implementation and the contribution of the ensuing search cannot be measured separately using the reported aggregate times.

The timings available to the selector are part of the search procedure. A candidate or its descendants can be favored because of their behavior on those configurations. The leaderboard involves a larger set of sizes, and the paper leaves their relationship to the selector's inputs unspecified. Accordingly, the leaderboard time should be read as a competition result. It cannot by itself establish generalization to matrix sizes that were withheld from all optimization decisions. The aggregate also does not quantify regressions on individual shapes. The selection records illustrate that such shape-level tradeoffs were relevant during the search.

The measured time also omits the engineering resources that a competing approach would need for comparison. The workflow required seed preparation, hardware probes, technical summaries, generation requests and access to a remote evaluation service. The paper reports the time taken by the resulting kernel and describes some costs qualitatively. It leaves total development time, resource use and the number of attempted candidates without a matched comparison. A conclusion about the cost of optimizing a kernel with this workflow would therefore require a separate experimental account.

Finally, the evidence for learning about the architecture is largely in the accumulated notes, code and experiments. The system can make an observation available to later rounds and act on it by changing a kernel. A successful revision can support a practical design decision for the tested conditions. Stronger claims about the inferred mechanism would need experiments that distinguish the proposed explanation from other changes in the same version, or measurements that show what happened within the kernel. The paper's case is strongest where it connects concrete programs to their benchmark behavior.

### What came after

There are no identified follow-up studies that establish how later work used GPU Kernel Scientist. The paper closes with possible extensions, including adapting the workflow to other hardware, expanding its access to technical knowledge and giving the search finer-grained profiling feedback. These remain directions proposed by the authors. The documented result is the timing-driven optimization of a HIP kernel for the AMD MI300 under the conditions of the AMD Developer Challenge.

## Cite

Cite as Martin Andrews and Sam Witteveen. 2025. GPU Kernel Scientist: An LLM-Driven Framework for Iterative Kernel Optimization. arXiv:2506.20807.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.2506.20807](https://doi.org/10.48550/arxiv.2506.20807) · [arXiv 2506.20807](https://arxiv.org/abs/2506.20807)

```bibtex
@misc{andrews2025gpu,
  title = {{GPU Kernel Scientist: An LLM-Driven Framework for Iterative Kernel Optimization}},
  author = {Martin Andrews and Sam Witteveen},
  year = {2025},
  doi = {10.48550/arxiv.2506.20807},
  eprint = {2506.20807},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2506.20807}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
