Tenspiler: A Verified Lifting-Based Compiler for Tensor Operations (Extended Version)
Jie Qiu, Colin Cai, Sahil Bhatia, Niranjan Hasabnis, Sanjit A. Seshia, and Alvin Cheung

TL;DR
Tenspiler is a verified compiler that automatically translates general-purpose code into optimized tensor operations, enabling seamless use of diverse hardware and software frameworks with significant performance gains.
Contribution
It introduces TensIR, a simple intermediate language, and a lifting-based, verified compiler supporting multiple DSLs and backends for tensor operations.
Findings
Supports six DSLs across various environments.
Achieves over 100x kernel speedup on average.
Enables easy addition of new backends via pattern matching.
Abstract
Tensor processing infrastructures such as deep learning frameworks and specialized hardware accelerators have revolutionized how computationally intensive code from domains such as deep learning and image processing is executed and optimized. These infrastructures provide powerful and expressive abstractions while ensuring high performance. However, to utilize them, code must be written specifically using the APIs / ISAs of such software frameworks or hardware accelerators. Importantly, given the fast pace of innovation in these domains, code written today quickly becomes legacy as new frameworks and accelerators are developed, and migrating such legacy code manually is a considerable effort. To enable developers in leveraging such DSLs while preserving their current programming paradigm, we introduce Tenspiler, a verified lifting-based compiler that uses program synthesis to…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
