AI Pulse by Inblix

Hugging Face Taught Claude and Codex to Write Production CUDA Kernels

Hugging Face Blog · Feb 13, 2026 · 2 min read · Read original article →

Curated by the Inblix editorial team


Featured image for article: Hugging Face Taught Claude and Codex to Write Production CUDA Kernels

Writing fast CUDA kernels is a dark art. It’s not just about knowing C++ — it’s about wrangling GPU memory hierarchies, warp shuffle reductions, and the byzantine integration patterns of PyTorch libraries. Hugging Face just made that expertise available to any coding agent. They built a new agent skill that packages roughly 550 tokens of structured guidance, templates, and troubleshooting docs, then pointed Claude and Codex at real targets: a diffusers pipeline and a transformers model. The agents shipped working, benchmarked kernels with correct PyTorch bindings, end-to-end.

The move solves a very specific bottleneck. The Kernel Hub already lets you load pre-compiled kernels with a single get_kernel call, skipping the usual build-and-flags nightmare. But someone still has to write the damn things. An H100 doesn’t optimize memory the way an A100 does, and a custom attention kernel for a Qwen3-8B model hits different integration pitfalls in transformers than a normalization kernel in diffusers. This is domain knowledge that usually lives scattered across NVIDIA docs, Stack Overflow, and painful trial-and-error. The skill compresses it into context an agent can load on demand.

Installation is a single pip command from the kernels library’s main branch, followed by kernels skills add cuda-kernels --claude (or --codex). The skill drops into the agent’s directory and gets picked up automatically. From there, a prompt like “Build a vectorized RMSNorm kernel for H100 targeting the Qwen3-8B model” triggers the agent to select architecture parameters, generate CUDA source, write PyTorch bindings, and produce a benchmark script. The package includes architecture-aware optimization guides for H100, A100, and T4 GPUs, kernel templates for BF16 and FP16, and integration patterns for both diffusers and transformers.

The real test isn’t just generating code — it’s whether that code survives the reality of environment matrices where CUDA, PyTorch, and Python versions all have to play nice. Hugging Face is opening the skill to contributions for more complex kernels not yet covered, betting that giving agents the fundamental building blocks is more scalable than trying to hand-write every optimization for every model.

💡 Key Takeaways

  1. Hugging Face's new agent skill gives coding assistants like Claude and Codex the domain expertise needed to write architecture-specific CUDA kernels, moving past generic code generation into specialized H100 and A100 optimization.
  2. The skill addresses the integration gap that kills most auto-generated kernels — it includes specific patterns for `transformers` and `diffusers` libraries, not just isolated CUDA snippets.
  3. By packaging decades of scattered GPU programming knowledge into roughly 550 tokens of structured guidance, the skill lets developers prompt for production kernels without manually hunting through NVIDIA docs and PyTorch's registration quirks.

Keep reading: See related articles below for more coverage on this topic.

Get smarter about AI

The sharpest AI news, curated daily. Delivered free to your inbox.

Learn more

← Back to all articles