This PyTorch blog post details how the Hugging Face Kernels project added support for Helion, a tile-based DSL from Meta for writing portable, high-performance ML kernels, letting developers autotune, package, and distribute Helion kernels through the Kernels Hub. It walks through scaffolding a kernel with kernel-builder, and shows how Helion’s autotuner searches not just tile sizes but lowering strategies (memory-access patterns, loop ordering, reduction style) that would otherwise require hand-rewriting in Triton or CUDA. It also describes an ahead-of-time pre-tuning workflow that builds a decision tree mapping input shapes to pre-tuned configs, demonstrating attention and linear-attention kernels that beat PyTorch’s SDPA and flash-linear-attention by geomean speedups of 1.17-1.55x on held-out shapes.
