TECHNOLOGY

KernelAgent: H100 hardware feedback and kernel speedup limits

In this article
THE QUICK TAKE

KernelAgent’s H100 operation-level gains depend on its baseline and timing protocol; roofline efficiency, kernel correctness tests and application speedups answer different questions.

On 6 March 2026, PyTorch described KernelAgent, a system that uses language models and profiler data to search for faster Triton GPU kernels. Instead of writing code once, it repeatedly measures candidates, checks their outputs and selects subsequent changes based on real-device behavior.

The authors report an average 1.56× speedup over standard torch.compile on NVIDIA H100 across 100 KernelBench Level 1 tasks. KernelAgent exceeded this baseline on 65 of the 100 tasks. These are author results for particular individual operations and one comparison configuration, rather than a promise of equivalent acceleration for every PyTorch model. Sources available for this article did not reveal an independent replication of these precise figures. Source: PyTorch.

Why a correct kernel is not enough

A GPU kernel is a program that performs computation on a graphics processor. Multiple correct implementations of the same operation can use memory, arithmetic units and parallelism differently. For example, an excessively large processing tile can increase register use and reduce simultaneously active thread groups; an excessively small tile creates other overhead. A successful choice depends on both input shapes and the particular GPU.

Triton expresses kernels at a higher level than low-level CUDA code, but tile sizes, memory-access patterns and other parameters still influence speed. KernelAgent’s idea is to provide hardware feedback so the system can test bottleneck hypotheses instead of merely generating plausible code. Approach description.

How the loop works

First, a profiling agent runs NVIDIA Nsight Compute on the input kernel. Its metrics help a diagnostic agent identify whether computation, memory traffic or insufficient device occupancy limits execution. Signals include DRAM throughput, L2 cache hits, warp occupancy and stall reasons. Nsight Compute documentation describes these as tools for analyzing GPU-program execution.

An agent then proposes changes, while an orchestrator distributes alternatives among workers. They can explore different tile sizes, memory patterns or pipeline depths. Each candidate is compared with a reference PyTorch implementation: only a candidate passing correctness checks proceeds to performance measurement. The system retains successful variants and uses attempt history in subsequent rounds. Parallel search regulates benchmark access to the GPU so concurrent workers do not distort one another’s measurements. Source: PyTorch.

For example, the authors’ matrix–vector multiplication case successively changes register use, memory access and row assignment among Triton programs. This loop’s value is that metrics inform the next testable hypothesis. Passing the chosen tests, however, does not automatically prove correctness for every possible input: the experiment’s validation scope matters.

What was measured

KernelBench has several task levels. Level 1 comprises 100 individual operations, including matrix multiplication, convolution and normalization; subsequent levels cover operation combinations and model architectures. An L1 result therefore cannot be transferred to a whole model or the other levels. This distinction follows the KernelBench description.

For the final comparison, the authors specify triton.testing.do_bench, more than one second of warmup and mean execution time over 100 repetitions of each variant on H100. The baseline was PyTorch Inductor through torch.compile in default mode, with static shapes and CUDA Graphs disabled. Other compiler modes, tensor shapes or GPUs may produce different results. The post also reports a 2.02× geometric-mean speedup over earlier correctness-focused KernelAgent kernels; this is a different baseline, and the two factors must remain separate. Source: PyTorch.

The 1.56× figure has a material limitation: the publication calls it an average speedup, but available materials do not clearly specify aggregation across tasks for that comparison. An open project issue asks whether the mean is arithmetic or geometric and requests individual timings. This matters because the same distribution of wins and losses can yield different summaries depending on aggregation.

The authors additionally report approximately 89% roofline efficiency on H100. Their definition takes the greater of Compute SOL and Memory SOL, profiler measures relative to corresponding hardware limits. This characterizes use of the limiting resource in their chosen metric; it is neither an 89% speedup nor evidence that every kernel reached that level. The available description does not clarify aggregation of this figure. Source: PyTorch.

The headline experiment does not identify the exact H100 variant. This matters: the NVIDIA specification version listing SXM and PCIe, hosted by Dell, specifies up to 3.35 TB/s memory bandwidth for H100 SXM with 80 GB versus up to 2 TB/s for H100 PCIe with 80 GB. These specifications provide context but do not identify the tested board. The current NVIDIA document compares SXM with NVL; NVL must not substitute for the earlier PCIe configuration.

Who may find the approach useful

The approach interests machine-learning library and infrastructure developers repeatedly executing expensive operations on known hardware, where subsequent acceleration can repay search time. It also helps investigate which changes affect a particular GPU. Whole-application benefit depends on the optimized operation’s share of total runtime and the cost of integrating and validating generated code.

KernelAgent is available on GitHub, and a separate artifact repository contains five demonstration problems with code and optimization materials. For these, the authors describe eight search rounds, four parallel workers and roughly an hour per problem on one H100. This is guidance for five examples, rather than complete experiment cost accounting or language-model API expenditure. Working-load adoption requires correctness, speed and cost checks on the target hardware.

For interpreting hardware signals, see arithmetic intensity and roofline reasoning; for checking whether gains transfer, see comparable inference benchmark methods.

Sources

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles