CUDA Kernel Optimizer
This agentic CUDA kernel optimizer turns a plain-language workload description into a working GPU kernel by repeatedly generating code, checking correctness and benchmarking it, keeping the fastest validated version it finds.
Built on LangGraph, the agent proposes a kernel implementation and a launch configuration, compiles it with NVRTC through a standalone C++ harness, launches it via the CUDA Driver API, and compares its output against a reference implementation in Python. It can also query GPU properties, look up NVIDIA documentation for optimization guidance, and inspect Nsight Compute profiler counters to decide what to try next.
Every candidate must pass a correctness check before it is considered for ranking; ranking itself uses the geometric mean of latency across performance test cases, timed with CUDA events after a fixed number of warmup launches. Invalid candidates are repaired within an iteration budget rather than discarded outright, and each experiment, plus the fastest validated kernel and a timing heatmap, is saved.
It requires an NVIDIA GPU, CUDA toolkit, CMake and a C++17 compiler, and is written in Python and C++.