一句话:提出结合枚举合成与大语言模型的程序提升方法,自动学习概率文法启发式,将遗留代码提升到机器学习 DSL。
面向机器学习的领域特定语言(DSL)能带来高性能编译优化与加速器支持,但用户需先把遗留代码转写为 DSL。现有工作用程序合成实现自动提升,然而合成代价高,且依赖人工设计的启发式才能扩展。本文提出一种引导式张量提升方法,将枚举合成与大语言模型结合:由 LLM 自动学习领域特定的程序提升启发式,并表示为概率文法,用于指导合成搜索。实验表明,尽管只使用学习得到的启发式,该方法仍优于该领域现有最先进工具。
Domain-specific languages (DSLs) for machine learning are revolutionizing the speed and efficiency of machine learning workloads as they enable users easy access to high-performance compiler optimizations and accelerators. However, to take advantage of these capabilities, a user must first translate their legacy code from the language it is currently written in, into the new DSL. The process of automatically lifting code into these DSLs has been identified by several recent works, which propose program synthesis as a solution. However, synthesis is expensive and struggles to scale without carefully designed and hard-wired heuristics. In this paper, we present an approach for lifting that combines an enumerative synthesis approach with a Large Language Model used to automatically learn the domain-specific heuristics for program lifting, in the form of a probabilistic grammar. Our approach outperforms the state-of-the-art tools in this area, despite only using learned heuristics.
@article{paperbot3063,
title = {Guided Tensor Lifting},
author = {Yixuan Li and José Wesley de Souza Magalhães and Alexander Brauckmann and Michael F. P. O'Boyle and Elizabeth Polgreen},
journal = {Proceedings of the ACM on Programming Languages},
volume = {9},
number = {PLDI},
year = {2025},
doi = {10.1145/3729330}
}