TENSORIZE: Fast synthesis of Tensor programs from legacy code using symbolic tracing, sketching and solving

Alexander Brauckmann, Luc Jaulmes, José W. de Souza Magalhães, Elizabeth Polgreen, Michael F. P. O'Boyle

Research output: Chapter in Book/Report/Conference proceedingConference contribution

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.
Original languageEnglish
Title of host publicationCGO '25
Subtitle of host publicationProceedings of the 23rd ACM/IEEE International Symposium on Code Generation and Optimization
Place of PublicationNew York, NY, USA
PublisherAssociation for Computing Machinery (ACM)
Pages15-30
Number of pages16
ISBN (Electronic)9798400712753
DOIs
Publication statusPublished - 1 Mar 2025
EventThe International Symposium on Code Generation and Optimization (CGO) 2025 - The Westin Las Vegas Hotel & Spa, Las Vegas, United States
Duration: 1 Mar 20255 Mar 2025
Conference number: 23
https://2025.cgo.org/

Publication series

NameProceedings of the CGO
PublisherAssociation for Computing Machinery (ACM)
ISSN (Print)2164-2397
ISSN (Electronic)2643-2854

Symposium

SymposiumThe International Symposium on Code Generation and Optimization (CGO) 2025
Abbreviated titleCGO 2025
Country/TerritoryUnited States
CityLas Vegas
Period1/03/255/03/25
Internet address

Keywords / Materials (for Non-textual outputs)

  • program synthesis
  • tensor compilers
  • lifting

Fingerprint

Dive into the research topics of 'TENSORIZE: Fast synthesis of Tensor programs from legacy code using symbolic tracing, sketching and solving'. Together they form a unique fingerprint.

Cite this