Verifying and improving Halide's term rewriting system with program synthesis
Julie L. Newcomb, Andrew Adams, Steven Johnson, Rastislav Bodík, Shoaib Kamil
摘要
SHOAIB KAMIL, Adobe Research, USA Halide is a domain-specific language for high-performance image processing and tensor computations, widely adopted in industry. Internally, the Halide compiler relies on a term rewriting system to prove properties of code required for efficient and correct compilation. This rewrite system is a collection of handwritten transformation rules that incrementally rewrite expressions into simpler forms; the system requires high performance in both time and memory usage to keep compile times low, while operating over the undecidable theory of integers. In this work, we apply formal techniques to prove the correctness of existing rewrite rules and provide a guarantee of termination. Then, we build an automatic program synthesis system in order to craft new, provably correct rules from failure cases where the compiler was unable to prove properties. We identify and fix 4 incorrect rules as well as 8 rules which could give rise to infinite rewriting loops. We demonstrate that the synthesizer can produce better rules than hand-authored ones in five bug fixes, and describe four cases in which it has served as an assistant to a human compiler engineer. We further show that it can proactively improve weaknesses in the compiler by synthesizing a large number of rules without human supervision and showing that the enhanced ruleset lowers peak memory usage of compiled code without appreciably increasing compilation times.
CCS Concepts: • Software and its engineering → General programming languages; • Social and professional topics → History of programming languages.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper15
- Alive2: bounded translation validation for LLVMNuno P. Lopes, Juneyoung Lee, Chung-Kil Hur, Zhengyang Liu 等PLDI 2021 · 被引用 109 次
- Automatic Generation of Vectorizing Compilers for Customizable Digital Signal ProcessorsSamuel Thomas, James BornholtASPLOS 2024 · 被引用 16 次
- Synthesizing contracts correct modulo a test generatorAngello Astorga, Shambwaditya Saha, Ahmad Dinkins, Felicia Wang 等OOPSLA 2021 · 被引用 13 次
- Equality Saturation Theory Exploration à la CarteAnjali Pal, Brett Saiki, Ryan Tjoa, Cynthia Richey 等OOPSLA 2023 · 被引用 11 次
- Fast Instruction Selection for Fast Digital Signal ProcessingAlexander J. Root, Maaz Bin Safeer Ahmad, Dillon Sharlet, Andrew Adams 等ASPLOS 2023 · 被引用 7 次
它引用的顶会 Paper1
相关 Paper
- MISAAL: Synthesis-Based Automatic Generation of Efficient and Retargetable Semantics-Driven OptimizationsAbdul Rafae Noor, Dhruv Baronia, Akash Kothari, Muchen Xu 等PLDI 2025 · 被引用 2 次
- Verified tensor-program optimization via high-level scheduling rewritesAmanda Liu, Gilbert Louis Bernstein, Adam Chlipala, Jonathan Ragan-KelleyPOPL 2022 · 被引用 25 次
- A Verified Compiler for a Functional Tensor LanguageAmanda Liu, Gilbert Bernstein, Adam Chlipala, Jonathan Ragan-KelleyPLDI 2024 · 被引用 2 次
- End-to-end translation validation for the halide languageBasile Clément, Albert CohenOOPSLA 2022 · 被引用 13 次
- Efficient automatic scheduling of imaging and vision pipelines for the GPULuke Anderson, Andrew Adams, Karima Ma, Tzu-Mao Li 等OOPSLA 2021 · 被引用 14 次
