paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Symbolic Basic Block Profiling for Machine Learning Kernels

面向机器学习内核的符号化基本块剖析
OOPSLA 10(OOPSLA2)2026匹配度 7/10 · 论文将符号化程序分析应用于机器学习内核的基本块剖析,属于PL→AI中“机器学习系统静态分析”方向,并在LLVM/TVM上有工程实现和工业模型评估;但不涉及Agentic/LLM、浮点或贝叶斯程序分析,因此并非正中当前核心问题。引用 0 inbox
Jingyu Qiu, Rongcui Dong, Sreepathi Pai
crossref: 2026-10-02

AI 速览

一句话:提出符号化程序剖析,用输入相关的符号公式代替动态插桩计算 ML 内核基本块计数,中位加速约 1.5 万倍。

现有基本块剖析依赖动态插桩统计每个基本块的执行次数,会引入运行时开销,并且必须实际运行程序,在大输入下耗时显著。本文提出符号化程序剖析:为基本块的执行计数生成以程序输入为自变量的符号公式,从而无需运行程序即可获得计数;该方法仅适用于一类特定程序,即机器学习(ML)内核。作者在 LLVM 编译器中实现了该技术,并在来自 50 个 ML 模型的 78 个 ML 算子上进行评估,这些算子由 ML 编译器 TVM 生成。实验表明,对 78 个内核中的 73 个,符号化剖析结果与动态插桩完全相同,中位加速比达到 15093 倍。

问题
动态插桩式基本块剖析会带来运行时开销,且必须实际执行程序,对于大输入规模可能耗费大量时间。
方法
面向机器学习内核,为基本块执行次数生成以输入为自变量的符号公式,并在 LLVM 编译器中实现该符号化剖析技术。
评估
在 TVM 生成的、来自 50 个 ML 模型的 78 个 ML 算子上与动态插桩对比;其中 73 个内核结果完全一致,中位加速 15093 倍。
原文摘要(Abstract)

Current basic block profiling techniques obtain the count of executions of each basic block in a program using dynamic instrumentation. These profiling counters create runtime overheads and also require the execution of the program, which, for large input sizes, can take substantial time. We propose symbolic program profiling that generates symbolic formulae for a basic block’s count with inputs as the independent variables. Our technique is limited in applicability to a certain class of programs, namely machine learning (ML) kernels. We implement our technique in the LLVM compiler and evaluate it on 78 ML operators from 50 different ML models. These operators are generated by TVM, a machine learning compiler. Our symbolic profiles deliver exactly the same results as dynamic instrumentation for 73 out of 78 kernels with a median speedup of 15093×.

链接与引用

DOI 原文 · arXiv ·

BibTeX
@article{paperbot12079,
  title = {Symbolic Basic Block Profiling for Machine Learning Kernels},
  author = {Jingyu Qiu and Rongcui Dong and Sreepathi Pai},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {OOPSLA2},
  year = {2026},
  doi = {10.1145/3839483}
}