PassNet: 为图编译器通生成扩展大型语言模型
PassNet: Scaling Large Language Models for Graph Compiler Pass Generation
AI总结:
针对编译器默认优化在长尾子图上性能不佳的问题,提出PassNet生态系统,包含大规模数据集和基准测试,通过微调小模型在少量轨迹上即可接近前沿模型性能。
摘要:
现代张量编译器(如 TorchInductor)在主流模型上实现了显著加速,但在长尾负载上却面临系统性性能瓶颈——我们的性能分析显示,43% 的真实世界子图在默认编译下出现端到端减速。虽然 LLM 为实现自动化优化提供了途径,但现有工作集中于独立内核生成。我们认为,通生成(即 LLM 编写可直接集成到编译器流水线中的结构化图变换)是更合适的抽象。我们提出 PassNet,首个基于 LLM 的编译器通生成的大规模生态系统,包括:(1) PassNet-Dataset,包含来自 10 万个真实世界模型的超过 1.8 万个独特计算图;(2) PassBench,200 个精心挑选的长尾可融合任务(共包含 2060 个子图),在错误感知加速分数(ES_t)下进行评估——该指标统一了正确性、稳定性和性能——并具有针对系统性 LLM 利用的分层完整性防御。实验表明,PassBench 既具有高度区分性,又真正未饱和:最佳前沿模型在总体上落后 TorchInductor 37%,但在单个子图上,LLM 相比同一编译器可实现高达 3 倍的加速——这表明瓶颈在于一致性而非能力。在仅约 4000 个 PassNet 轨迹上微调一个小模型,可获得 2.67 倍的改进,接近前沿模型性能,证明了巨大的提升空间,并验证了 PassNet 作为推进 LLM 驱动编译器优化的实时训练基础设施。所有数据、基准测试和工具均已公开。
英文摘要:
Modern tensor compilers such as TorchInductor deliver substantial speedups on mainstream models, yet face a systematic performance ceiling on long-tail workloads -- our profiling shows that 43% of real-world subgraphs experience end-to-end slowdowns under default compilation. While LLMs offer a path toward automated optimization, existing efforts focus on standalone kernel generation. We argue that pass generation -- where LLMs author structured graph transformations that integrate directly into compiler pipelines -- is the more appropriate abstraction. We propose PassNet, the first large-scale ecosystem for LLM-based compiler pass generation, comprising: (1) PassNet-Dataset, over 18K unique computational graphs from 100K real-world models; and (2) PassBench, 200 curated long-tail fusible tasks (comprising 2,060 subgraphs in total) evaluated under the Error-aware Speedup Score (ES_t) -- a metric unifying correctness, stability, and performance -- with layered integrity defenses against systematic LLM exploitation. Experiments reveal that PassBench is both highly discriminative and genuinely unsaturated: the best frontier model trails TorchInductor by 37% in aggregate, yet on individual subgraphs LLMs achieve up to 3x speedup over the same compiler -- indicating that the bottleneck is consistency, not capability. Fine-tuning a small model on merely ~4K PassNet trajectories yields a 2.67x improvement approaching frontier-model performance, demonstrating substantial headroom and validating PassNet as live training infrastructure for advancing LLM-driven compiler optimization. All data, benchmarks, and tooling are publicly available.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。