Abstract
Tensor domain specific languages (DSLs) achieve substantial performance due to high-level compiler optimization and hardware acceleration. However, to achieve such performance for existing applications requires the programmer to manual rewrite their legacy code in evolving Tensor DSLs. Prior efforts to automate this translation face significant scalability issues which greatly reduces their applicability to real-world code.
This paper presents TENSORIZE, a novel MLIR-based compiler approach to automatically lift legacy code to high level Tensor DSLs using program synthesis. TENSORIZE uses a symbolic trace of the legacy program as a specification and automatically selects sketches from the target Tensor DSLs to drive the program synthesis. It uses an algebraic solver to rapidly simplify the specification, resulting in a fast, automatic approach that is correct by design. We evaluate TENSORIZE on several legacy code benchmarks and compare against state-of-the-art techniques. Tensorize is able to lift more code than prior schemes, is an order of magnitude faster in synthesis time, and guarantees correctness by construction.
This paper presents TENSORIZE, a novel MLIR-based compiler approach to automatically lift legacy code to high level Tensor DSLs using program synthesis. TENSORIZE uses a symbolic trace of the legacy program as a specification and automatically selects sketches from the target Tensor DSLs to drive the program synthesis. It uses an algebraic solver to rapidly simplify the specification, resulting in a fast, automatic approach that is correct by design. We evaluate TENSORIZE on several legacy code benchmarks and compare against state-of-the-art techniques. Tensorize is able to lift more code than prior schemes, is an order of magnitude faster in synthesis time, and guarantees correctness by construction.
Original language | English |
---|---|
Title of host publication | CGO '25 |
Subtitle of host publication | Proceedings of the 23rd ACM/IEEE International Symposium on Code Generation and Optimization |
Place of Publication | New York, NY, USA |
Publisher | Association for Computing Machinery (ACM) |
Pages | 15-30 |
Number of pages | 16 |
ISBN (Electronic) | 9798400712753 |
DOIs | |
Publication status | Published - 1 Mar 2025 |
Event | The International Symposium on Code Generation and Optimization (CGO) 2025 - The Westin Las Vegas Hotel & Spa, Las Vegas, United States Duration: 1 Mar 2025 → 5 Mar 2025 Conference number: 23 https://2025.cgo.org/ |
Publication series
Name | Proceedings of the CGO |
---|---|
Publisher | Association for Computing Machinery (ACM) |
ISSN (Print) | 2164-2397 |
ISSN (Electronic) | 2643-2854 |
Symposium
Symposium | The International Symposium on Code Generation and Optimization (CGO) 2025 |
---|---|
Abbreviated title | CGO 2025 |
Country/Territory | United States |
City | Las Vegas |
Period | 1/03/25 → 5/03/25 |
Internet address |
Keywords / Materials (for Non-textual outputs)
- program synthesis
- tensor compilers
- lifting