Verified tensor-program optimization via high-level scheduling rewrites
Amanda Liu, Gilbert Louis Bernstein, Adam Chlipala, Jonathan Ragan-Kelley
Abstract
We present a lightweight Coq framework for optimizing tensor kernels written in a pure, functional array language. Optimizations rely on user scheduling using series of verified, semantics-preserving rewrites. Unusually for compilation targeting imperative code with arrays and nested loops, all rewrites are source-to-source within a purely functional language. Our language comprises a set of core constructs for expressing high-level computation detail and a set of what we call reshape operators, which can be derived from core constructs but trigger low-level decisions about storage patterns and ordering. We demonstrate that not only is this system capable of deriving the optimizations of existing state-of-the-art languages like Halide and generating comparably performant code, it is also able to schedule a family of useful program transformations beyond what is reachable in Halide.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext ba13cd5e-e6a4-448f-b0f9-7f90e8206233Cited by top-tier papers11
- Exocompilation for productive programming of hardware acceleratorsYuka Ikarashi, Gilbert Louis Bernstein, Alex Reinking, Hasan Genc et al.PLDI 2022 · 56 citations
- Indexed Streams: A Formal Intermediate Representation for Fused Contraction ProgramsScott Kovach, Praneeth Kolichala, Tiancheng Gu, Fredrik KjolstadPLDI 2023 · 11 citations
- Mechanised Hypersafety Proofs about Structured DataVladimir Gladshtein, Qiyuan Zhao, Willow Ahrens, Saman P. Amarasinghe et al.PLDI 2024 · 10 citations
- Finch: Sparse and Structured Tensor Programming with Control FlowWillow Ahrens, Teodoro Fields Collin, Radha Patel, Kyle Deeds et al.OOPSLA 2025 · 6 citations
- TensorRight: Automated Verification of Tensor Graph RewritesJai Arora, Sirui Lu, Devansh Jain, Tianfan Xu et al.POPL 2025 · 6 citations
Builds on1
Related papers
- A Verified Compiler for a Functional Tensor LanguageAmanda Liu, Gilbert Bernstein, Adam Chlipala, Jonathan Ragan-KelleyPLDI 2024 · 2 citations
- A Mechanized Algebra of Verified Data Structures for Optimizing Sparse Tensor ProgramsAmanda Liu, Gilbert Louis Bernstein, Shoaib Kamil, Adam Chlipala et al.PLDI 2026
- End-to-end translation validation for the halide languageBasile Clément, Albert CohenOOPSLA 2022 · 13 citations
- A sparse iteration space transformation framework for sparse tensor algebraRyan Senanayake, Changwan Hong, Ziheng Wang, Amalee Wilson et al.OOPSLA 2020 · 51 citations
- Verifying Array Properties in Pure Data-Parallel ProgramsNikolaj Hey Hinnerskov, Robert Schenck, Cosmin E. OanceaPLDI 2026 · 1 citation
