← All entries
Post#1419

One Search, Two Layers: Compiler Controls Inside PyTorch Helion Using NVIDIA CompileIQ

Summary

Helion is PyTorch's Python-embedded DSL for GPU kernels (released 2025): write PyTorch with hl.tile, the autotuner explores thousands of Triton configs (block sizes, loop orders, num_warps, num_stages, indexing, pid_type, reduction_loops), lowering through TorchInductor → Triton → PTX → ptxas → SASS. The post's argument: every kernel autotuner (Helion, Triton, torch.compile) searches the same space — "what work each thread block does" — while a second space sits below it: how that work becomes machine assembly via ptxas (NVIDIA's PTX assembler), i.e. register allocation policy, fine-grained instruction scheduling, code-gen heuristics, exposed as tunable "advanced controls" since CUDA 13.3 and left at defaults by everything shipping today. Helion's new autotune_search_acf hands a list of Advanced Control Files (ACFs — binary, portable, versionable compile-time artifacts) to Helion's own autotuner as just another search dimension; the empty string (compiler defaults) is auto-appended so the default is always a candidate — worst case you get back the kernel you had. The substantive argument for joint search: sequential tuning finds a local optimum because the spaces are coupled through hardware — block size/stage count determine register pressure, and register allocation decides whether that pressure causes spills; a control set that would shine at block_sizes=[64,64] is never evaluated there if the kernel config was frozen first under default controls. ACFs are produced by NVIDIA's CompileIQ, which treats compiler-control selection as hyperparameter optimization (evolutionary search: propose population, compile each, correctness-check vs reference, time survivors, breed winners); pip install compileiq. Pre-tuned "Booster Packs" are published on CompileIQ's GitHub releases — the helion-booster-pack holds 24 ACFs tuned across Helion kernels, validated against ptxas from CUDA 13.4, targeting B200 — so the realistic workflow is download the pack, point autotune_search_acf at it, autotune once, pin the winner. Case study (all vendor/first-party, GB200 sm_100 Blackwell, ptxas 13.3.73 / CUDA 13.3, CompileIQ 1.0.3, Triton 3.8.0, locked clocks, correctness vs PyTorch reference, Welch's t-test p<0.05 + Cohen's d>0.2 on every claim): nvfp4_gemv_fp4in_kernel, a W4A4 NVFP4 decode GEMV (N=8192, K=28672 down_proj) that already ships a checked-in Helion AOT config — i.e. the baseline was already swept, so headroom is real. Runtime objective: 0.0971 → 0.0928 ms = 1.047× (4.7%), confirmed in two independent runs (d≈2.5). Occupancy objective (ncu metric): +0.16pp achieved occupancy → ~1.75–2.0% runtime win. Multi-objective (runtime + L1TEX throughput): 6.9% runtime speedup + 4.5pp L1TEX gain (81.51%→85.96%), one Pareto-dominant point, nothing traded off. Joint ACF across two shapes (down_proj + N=15360,K=5120): one ACF beats baseline on both (1.05× d=67.71, 1.01× d=4.54). Stated expectations: 2–7% on already-highly-optimized kernels (meaningful for decode-step kernels running fleet-wide), double digits on less-optimized ones. Caveats (authors' own): ACFs are hardware- and toolkit-specific (sm_90 ACF invalid on sm_100 — can produce incorrect results, not just slower code; correctness check in the search loop is not optional); search time is nontrivial — run offline on kernels that matter, then pin; gains are workload-specific ("the only number that matters for your kernel is the one you measure on your kernel"). Links: github.com/pytorch/helion, helionlang.com, helion examples/acfs, pretuned_kernels; github.com/NVIDIA/CompileIQ, nvidia.github.io/CompileIQ, NVIDIA's CompileIQ blog post.

Venue
PyTorch blog
Source
blog
Access
free
Language
en
Added
Oct 19, 2026
Verified
Oct 19, 2026
Found via
#PyTorch

Research notes

  • Discovery: Hudson shared the official @PyTorch post 2026-10-19 12:00 PM ET (~9.1K views; https://x.com/PyTorch/status/2112212326057148443) linking via bit.ly to the blog post; attached infographic "Where the search stops": BEFORE — two tunable spaces, only one searched; WITH autotune_search_acf — one joint search space; Helion lowering pipeline @helion.kernel → Helion compiler → Triton kernel → PTX → ptxas (+ ACF) → SASS (what the GPU actually runs). Relevance: (1) his stack — he trains with custom FlashAttention kernels and cares about training throughput; kernel autotuning that searches the FULL lowering pipeline down to SASS instead of stopping at Triton is the systems/infra side of his efficiency cluster, and the joint-search argument (don't freeze one space before searching the other) generalizes to any of his kernel work; (2) the "run once offline, pin the winner" workflow maps to his pretraining infra — a few percent on decode-step or attention kernels compounds across a training run; (3) Launch Helm angle: none direct — this is training/systems infra, not monitoring. Cluster: kernels/compilation — ID 586 (Liger Kernel, Triton kernels for LLM training), ID 589 (SageAttention), ID 1206 (Hawkeye, hardware-aware GPU kernel optimization with minimal supervision — the closest neighbor: agent-driven hardware-specific optimization across Ampere/Hopper/Blackwell), ID 107 (KernelBook), #77 (Defeating Nondeterminism — batch-invariant kernels; shares the "the lowering pipeline below Triton matters" theme and the Triton-FA-backward detail), #75 (LoopQuant — PTQ for looped transformers; shares the ptxas-adjacent performance-engineering posture), queued #48 (xHC — fused Triton forward/backward kernels with measured training overhead). This entry is the first in the catalog to go below Triton into ptxas/SASS controls.
  • License: blog text has no stated reuse license — flag; Helion open source (PyTorch Foundation); CompileIQ under NVIDIA SLA (proprietary EULA); ACFs freely distributable

Similar entries