Hugging Face Blog

From Zero to GPU: A Guide to Building and Scaling Production-Ready CUDA Kernels

arXiv Machine Learning
Aug 27

DataKernelBench: Can LLMs Optimize Database Queries on GPUs?

DataKernelBench evaluates whether large language models (LLMs) can optimize database queries for GPU execution. The benchmark translates SQL into PyTorch TorchPlan programs and tests LLMs on optimizing core tensor snippets or full queries in CUDA or Triton, using execution-guided repair. On TPC‑H SF10 with an H100 GPU, the best full‑query CUDA configuration outperforms torch.compile by 2.11×, and extending TorchPlan with Dask‑cuDF enables a 2.54× speedup on TPC‑H SF100 across four H100 GPUs.

By Gokul Karthik Kumar, Yotam Perlitz, Corey Lammie, Andrea Giovannini, Katja Hose
arXiv AI
Jul 29

Kernel Forge: An Agent Harness for LLM-based Generation and Optimization of CUDA Kernels

arXiv:2607. 24762v1 Announce Type: new Abstract: Machine learning models are increasingly embedded in everyday software, and most of their runtime is spent in a small set of compute kernels such as matrix multiplication, convolution, and normalization.

By Joshua Brodsky, Dhravid Kumar, Savini Kashmira, Jayanaka Danatanarayana, Jason Mars, Krisztian Flautner, Lingjia Tang
arXiv Machine Learning
Sep 4

KernelFoundry: Hardware-aware evolutionary GPU kernel optimization

KernelFoundry is a hardware‑aware evolutionary framework that optimizes GPU kernels by combining MAP‑Elites quality‑diversity search, meta‑prompt evolution, and template‑based parameter tuning. It generates SYCL and CUDA kernels, outperforming baseline methods with an average 2.3× speedup on KernelBench. The system is distributed, supports remote hardware access, and offers a flexible user interface for diverse real‑world kernel generation tasks.

By Nina Wiedemann, Quentin Leboutet, Michael Paulitsch, Diana Wofk, Benjamin Ummenhofer