AI Pulse by Inblix

Hugging Face Now Lets You Build and Share AMD ROCm Kernels Without the Toolchain Headaches

Hugging Face Blog · Nov 17, 2025 · 2 min read · Read original article →

Curated by the Inblix editorial team


Featured image for article: Hugging Face Now Lets You Build and Share AMD ROCm Kernels Without the Toolchain Headaches

If you’ve ever wrestled with CMake, Nix, or ABI issues just to get a custom GPU kernel running in PyTorch, the new workflow from Hugging Face’s kernels library is a genuine relief. It provides a structured, reproducible build process—called kernel-builder—for sharing accelerated kernels, and it now has first-class support for AMD’s ROCm stack alongside CUDA, Metal, and XPU.

The guide walks through a concrete, impressive example: the RadeonFlow GEMM kernel, an FP8 block-wise matrix multiplication implementation that won the Grand Prize at the AMD Developer Challenge 2025 in June. The kernel targets the AMD Instinct MI300X and uses the e4m3fnuz floating-point format with per-block scaling to balance throughput and accuracy for deep learning workloads. The authors, ColorsWind, Zesen Liu, and Andy, designed it for specific matrix shapes with a transposed memory layout.

The real magic isn’t just the kernel—it’s the packaging. Hugging Face enforces a clean project structure with a build.toml manifest, a flake.nix file for a perfectly reproducible build environment, and a torch-ext directory for the Python bindings. This means you can stop worrying about whether your colleague has the right ROCm version or compiler flags. The structure handles source code, launchers, utilities, and even test checkers in a logical layout.

For anyone who has lost an afternoon to a mismatched hipcc path or a missing header, this approach turns a fragile art into a repeatable process. It lowers the barrier for sharing optimized AMD kernels across teams or with the broader community, making portable performance a lot less painful.

💡 Key Takeaways

  1. Hugging Face's `kernels` library and `kernel-builder` toolchain now provide a standardized, reproducible way to build and distribute kernels for AMD ROCm GPUs, not just CUDA.
  2. The guide uses the Grand Prize-winning RadeonFlow FP8 GEMM kernel for the MI300X as a real-world example, demonstrating how to wrap it for seamless PyTorch integration.
  3. A mandatory project structure with `build.toml` and `flake.nix` files eliminates the environment inconsistencies and compiler flag chaos that typically plague kernel development.

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.

← Back to all articles