Content area

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 translate sequential programs written in general-purpose programming languages (e.g., C++ or Python code) into tensor operations. Central to Tenspiler is our carefully crafted yet simple intermediate language, named TensIR, that expresses tensor operations. TensIR enables efficient lifting, verification, and code generation. Currently, Tenspiler already supports \(\textbf{six}\) DSLs, spanning a broad spectrum of software and hardware environments. Furthermore, we show that new backends can be easily supported by Tenspiler by adding simple pattern-matching rules for TensIR. Using 10 real-world code benchmark suites, our experimental evaluation shows that by translating code to be executed on \(\textbf{6}\) different software frameworks and hardware devices, Tenspiler offers on average 105\(\times\) kernel and 9.65\(\times\) end-to-end execution time improvement over the fully-optimized sequential implementation of the same benchmarks.

Details

1009240
Identifier / keyword
Title
Tenspiler: A Verified Lifting-Based Compiler for Tensor Operations (Extended Version)
Publication title
arXiv.org; Ithaca
Publication year
2024
Publication date
Dec 14, 2024
Section
Computer Science
Publisher
Cornell University Library, arXiv.org
Source
arXiv.org
Place of publication
Ithaca
Country of publication
United States
University/institution
Cornell University Library arXiv.org
e-ISSN
2331-8422
Source type
Working Paper
Language of publication
English
Document type
Working Paper
Publication history
 
 
Online publication date
2024-12-17
Milestone dates
2024-04-28 (Submission v1); 2024-07-28 (Submission v2); 2024-12-14 (Submission v3)
Publication history
 
 
   First posting date
17 Dec 2024
ProQuest document ID
3049783627
Document URL
https://www.proquest.com/working-papers/tenspiler-verified-lifting-based-compiler-tensor/docview/3049783627/se-2?accountid=208611
Full text outside of ProQuest
Copyright
© 2024. This work is published under http://creativecommons.org/licenses/by/4.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
Last updated
2024-12-18
Database
2 databases
  • ProQuest One Academic
  • ProQuest One Academic