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.