Hawkeye: Hardware-Aware GPU Kernel Optimization with Minimal Supervision | alphaXiv
BlogSend Feedback?
Abstract<br>Achieving peak GPU kernel performance increasingly relies on architecture-specific optimizations targeting new hardware features. While AI coding agents show promise in generating performant kernels, they lack the necessary context to effectively implement and stack hardware-specific optimizations, especially on newer GPU architectures. We propose HAWKEYE (Hardware-Aware Kernel Optimization), an open-source framework that grounds autonomous kernel generation in a minimal and comprehensive taxonomy with only one unit test per optimization strategy per target architecture. Supporting a new accelerator therefore requires only 10 expert-written unit tests per architecture (one per recurring optimization strategy) that generalize across downstream workloads, rather than hand writing a new kernel for each workload and precision. HAWKEYE effectively scales the test-time compute of coding agents with this minimal expert supervision to enable kernel generation that consistently leverages hardware-specific features, approaching and even surpassing expert-written PyTorch or Triton in BF16 and emerging low precision (FP8, NVFP4, MXFP4) across Ampere, Hopper, Blackwell, and MI350 GPUs. HAWKEYE demonstrates that minimally supervised coding agents can exploit architecture-specific hardware features and reduce the overhead of supporting emerging hardware accelerators.
View more<br>View Paper<br>46<br>Save
Cite
From the authors<br>View full on X
Arya Tschand@AryaTschandWe’ve seen an explosion of new ML chips with unique architectural features, but software support remains the critical bottleneck<br>Achieving peak performance increasingly relies on hardware-specific optimizations in the kernels, but we observe that coding agents are particularly weak at this<br>Introducing Hawkeye, a framework that brings hardware-awareness to coding agents by grounding them in a minimal and comprehensive taxonomy of optimization strategies<br>For new GPU or ML accelerator architectures, you only need to write 10 unit tests and solution kernels (one per optimization strategy), and we show that coding agents can effectively scale test-time compute with this minimal supervision to write hardware-aware kernels<br>Hawkeye can port kernels across architectures (Ampere, Hopper, Blackwell), vendors (NVIDIA, AMD), and precisions (FP8, NVFP4, MXFP4) while consistently leveraging hardware features and approaching expert kernel performance<br>Work co-led with @keramakr and done in collaboration with Alexander Ingare @simonguozirui @18jeffreyma @ZishenW @simran_s_arora @Azaliamirh @profvjreddi
We define hardware-awareness as the ability to know what hardware-specific optimizations exist on the underlying chip and how to correctly implement them in a kernel<br>However, even frontier models struggle to implement architecture-specific kernel optimizations, especially on newer GPU architectures like Blackwell and alternative GPU vendors like AMD MI350<br>We can credit this to a variety of challenges like much less training data, harder/more verbose syntax, more complicated architectures, etc.<br>Without being able to quickly support our new ML accelerators with performant and adaptable software stacks, their usability is quite limited
The Hawkeye framework bootstraps coding agents with the minimal knowledge needed for hardware-aware kernel optimization, consisting of 10 unit tests grounded in the taxonomy and previously generated kernels on the same architecture<br>To generate hardware-aware kernels, agents are given a sandbox with the full Hawkeye taxonomy and GPU access to iteratively edit, execute, and profile code<br>We observe that agents spend productive turns reflecting on the taxonomy in context to write better kernels
Show full threadShow less
The Hawkeye taxonomy consists of optimization strategies (rows) and GPU architectures (columns)<br>Each cell shows its architecture-specific details, paired with a unit test, expert-authored solution kernel, and corresponding profiling metric<br>For a solution kernel to demonstrate valid signal, it must show an improvement in the optimization's bottleneck utilization metric and lead to an end-to-end speedup over a naive baseline
On emerging attention variants (ReBased Linear Attention, DeltaNet, and Forgetting Attention), Hawkeye beats performance against PyTorch and hardware-unaware baselines from prior work<br>We also compare against expert-written Triton FLA kernels and show strong performance, especially on Blackwell<br>There is still plenty of headroom though
Scaling agent test-time compute with Hawkeye yields strong speedups on Linear Attention kernels with Gemini 3.1 Pro and GPT-5.4<br>Against alternative context structures, Hawkeye is the only method that keeps producing faster kernels as productive turns grow
Taking a look at the generated kernels, Hawkeye wins by composing hardware-native primitives end-to-end<br>Baselines struggle to...