arXiv:2604.15272cs.PLcs.AI2026-04

用符号化方法自动优化张量程序,速度提升近5倍

Prism: Symbolic Superoptimization of Tensor Programs

  • 用符号图表示一类张量程序,统一建模复杂变换
  • 在5个LLM任务上实现最高4.9倍加速,优化时间缩短3.4倍
  • 适合需要极致性能的AI编译器研发者和系统优化工程师

本文提出Prism,首个针对张量程序的符号超优化器。核心是sGraph——一种符号化、分层的表示方法,通过符号化执行参数,紧凑编码大规模张量程序族。Prism将优化设计为两阶段搜索:先构建代表程序族的符号图,再实例化为具体实现。该框架结合符号推理,基于算子语义、代数恒等式与硬件约束,可结构化剪枝证明次优的搜索空间。我们开发了高效生成符号图、通过e-graph重写验证等价性,以及通过自动调优完成参数实例化的技术。这些组件使Prism在保持穷举搜索严谨性的同时,具备现代机器学习负载所需的可扩展性。在五个常用LLM工作负载上的评估显示,Prism相比最佳超优化器提速最高达2.2倍,相比最佳编译器方法提速达4.9倍,且端到端优化时间减少最多3.4倍。

原文摘要 · Abstract (English)

This paper presents Prism, the first symbolic superoptimizer for tensor programs. The key idea is sGraph, a symbolic, hierarchical representation that compactly encodes large classes of tensor programs by symbolically representing some execution parameters. Prism organizes optimization as a two-level search: it constructs symbolic graphs that represent families of programs, and then instantiates them into concrete implementations. This formulation enables structured pruning of provably suboptimal regions of the search space using symbolic reasoning over operator semantics, algebraic identities, and hardware constraints. We develop techniques for efficient symbolic graph generation, equivalence verification via e-graph rewriting, and parameter instantiation through auto-tuning. Together, these components allow Prism to bridge the rigor of exhaustive search with the scalability required for modern ML workloads. Evaluation on five commonly used LLM workloads shows that Prism achieves up to $2.2\times$ speedup over best superoptimizers and $4.9\times$ over best compiler-based approaches, while reducing end-to-end optimization time by up to $3.4\times$.

张量优化符号推理AI编译器性能提升

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。