NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Hawkeye: Hardware-Aware GPU Kernel Optimization with Minimal Supervision

Arya Tschand, Kesavan Ramakrishnan, Alexander Ingare, Simon Guo, Jeffrey Jian Ma, Zishen Wan, Simran Arora, Azalia Mirhoseini, Vijay Janapa Reddi

TL;DR

Hawkeye is an open-source framework that enables AI coding agents to generate peak-performance GPU kernels for the latest hardware (like NVIDIA Blackwell and AMD MI350) using just 10 expert-written unit tests. By grounding agents in a structured "taxonomy" of hardware features, it achieves up to 18.9x speedups over standard compilers on emerging AI workloads.

What Problem Does This Problem Address?

Modern GPUs are evolving at a breakneck pace. Every new generation—from NVIDIA's Ampere to Hopper and now Blackwell—introduces specialized hardware instructions (like tcgen05 or TMA) that are essential for reaching peak performance. However, software often lags behind. Manually porting high-performance kernels like FlashAttention to a new chip can take expert engineers months of effort.

While AI coding agents (like GPT-4 or Gemini) are great at writing general code, they lack "hardware awareness." When asked to write a GPU kernel, they often fall back on older, slower programming patterns or hallucinate complex hardware descriptors. They struggle to "stack" multiple optimizations—like coordinating asynchronous data movement with tensor core math—which is required to actually make a kernel fast on modern silicon.

Methods

The authors introduce Hawkeye, a framework that bootstraps AI agents with a minimal but comprehensive taxonomy of unit tests.

  • The Taxonomy: Instead of flooding an agent with millions of lines of documentation, Hawkeye provides exactly 10 expert-authored unit tests per architecture. Each test targets a specific optimization strategy (e.g., Matrix-Multiply-Accumulate, shared memory swizzling, or asynchronous pipelines).
  • The Feedback Loop: Each unit test is paired with a specific profiling metric (like "tensor core utilization" or "DRAM bandwidth").
  • Optimization Stacking: The agent operates in a closed loop: it edits the kernel, compiles it in a sandbox, and checks the profiling metrics. If a specific hardware feature isn't firing, the agent consults the relevant unit test to fix its syntax and logic. This allows the agent to iteratively "stack" optimizations until the bottleneck is cleared.

Datasets

The framework was evaluated across a diverse set of workloads and hardware:

  • Architectures: NVIDIA A100 (Ampere), H100 (Hopper), B200 (Blackwell), and AMD MI350 (CDNA4).
  • Precisions: Standard BF16 and emerging low-precision formats like FP8, NVFP4, and MXFP4.
  • Workloads:
    • Established: GEMM (Matrix Multiplication), Conv2D, and standard Attention.
  • Emerging: Variants like Linear Attention, DeltaNet, and Forgetting Attention, which are architecturally superior but often lack optimized vendor kernels.

Key Insights and Ideas

  • Structure Over Volume: The paper proves that providing an AI with a structured taxonomy of working examples is far more effective than giving it raw ISA (Instruction Set Architecture) manuals. Context "pollution" is a real problem; Hawkeye's 11k-token prompt outperforms 1.2M-token documentation dumps.
  • The "Discontinuity" of Performance: Modern GPU features are tightly coupled. You often see zero speedup until you get three or four things right simultaneously (e.g., TMA + mbarrier + WGMMA). Hawkeye’s profiling feedback helps agents cross this "all-or-nothing" performance gap.
  • Cross-Vendor Portability: Because the taxonomy abstracts the strategy (e.g., "asynchronous pipeline") from the syntax, the same agentic approach works for both NVIDIA (CUDA) and AMD (HIP), effectively automating cross-vendor porting.

Key Results

  • Beating the Compiler: On established workloads, Hawkeye reaches a 1.13x geomean speedup in BF16 and 1.28x in low precision compared to torch.compile.
  • Dominating Emerging Workloads: On non-standard attention variants where compilers struggle to fuse operations, Hawkeye achieved an incredible 18.9x geomean speedup.
  • Expert-Level Performance: Hawkeye kernels approach or even exceed hand-written Triton kernels from the Flash Linear Attention library, including a 1.22x gain on Blackwell.
  • Zero-Day Support: It reduces the timeline for supporting new hardware from months of human engineering to minutes or hours of agentic "test-time compute."

Limitations and Future Work

  • Human-in-the-Loop: While Hawkeye reduces the work significantly, it still requires a human expert to write the initial 10 unit tests for a brand-new architecture.
  • Numerical Stability: In low-precision formats (like FP4), balancing the trade-off between extreme speed and numerical accuracy remains a challenge that requires careful "quantization tolerance" tuning.
  • Complex Composition: While the agent is great at stacking 3-4 optimizations, extremely complex kernels that require 10+ interleaved strategies still occasionally baffle the agent, leaving some headroom for future "agentic reasoning" improvements.

Summary updated

BibTeX
@inproceedings{tschand2026hawkeye,
  author = {Arya Tschand and Kesavan Ramakrishnan and Alexander Ingare and Simon Guo and Jeffrey Jian Ma and Zishen Wan and Simran Arora and Azalia Mirhoseini and Vijay Janapa Reddi},
  title = {{Hawkeye: Hardware-Aware GPU Kernel Optimization with Minimal Supervision}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=99gxreT4sW},
}
Figure