Helion 联合 CompileIQ 调优编译器参数
PyTorch 官方博客介绍,Helion 的内核自动调优器过去只搜索分块形状、warp 数量、流水线阶段和内存访问策略,如今还可借助 NVIDIA CompileIQ 搜索 ptxas 的寄存器分配策略、指令调度和代码生成启发式等编译器控制项,结果以可移植的 Advanced Control File(ACF)形式发布。博客举例称,在一个已固化的 NVFP4 GEMV 内核配置上,于 GB200 上运行 8 代、每代 15 个候选的进化搜索后,执行时间从 0.0971 毫秒降至 0.0928 毫秒,即 1.047 倍(4.7%)加速;文中强调该数字来自单一负载,收益取决于工作负载、形状和架构。Helion 为 PyTorch 基金会托管的开源项目,CompileIQ 采用 NVIDIA 专有许可但可免费使用,其生成的 ACF 文件可自由分发。
博客指出,目前几乎所有已交付内核都把 ptxas 的寄存器分配与指令调度等控制项留在默认值,并非因为默认最优,而是因为此前无人搜索这一空间。作者认为编译器的可调控制面本身就是一个值得搜索的优化维度,并将其作为超越已调优内核的“最后一公里”空间。
With Helion’s release last year, it aimed at enabling developers to write GPU kernels in PyTorch-native Python and let its powerful autotuner do the work that used to require hand-written Triton and abstract away hardware-specific implementation details. Helion’s autotuner explores thousands of kernel configurations and routinely lands within a few percent of expert-tuned code, and oftentimes exceeding it.
The question that now needs to be answered is this: If a kernel has already been autotuned and optimized to the best of a developer’s ability, is there anything left?
There is. It lives below the kernel, in the compiler.
Every kernel autotuner in the ecosystem whether it is Helion’s, Triton’s, the one inside torch.compile, they all search the same thing: tile shapes, warp counts, pipeline stages, memory access strategy. All of those are decisions about what work each thread block does. Underneath them sits a second set of decisions about how that work becomes machine assembly instructions generated by ptxas, NVIDIA’s PTX assembler. Things like register allocation policy, fine-grained instruction scheduling, code-generation heuristics are left at their defaults for all kernels shipping today – not because the defaults are optimal, but because nothing was searching and optimizing them!
#Helion#NVIDIA CompileIQ#NVIDIA#PyTorch Foundation#ptxas#Triton#torch.compile#GB200#Qwen3