Mosaic: An Interoperable Compiler for Tensor Algebra
Proceedings of the ACM on Programming Languages · 06.06.2023 · 7 (PLDI) · 394-419
DOI: 10.1145/3591236 ↗Kurz gefasst
Fachartikel in der Zeitschrift Proceedings of the ACM on Programming Languages, online erschienen am 06.06.2023. Verfasst von Manya Bansal und 3 weiteren Autor:innen. Die Arbeit wurde bisher 19-mal zitiert (Crossref) und nennt 71 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0). Gefördert von: NSF.
Abstract (Originalsprache)
We introduce Mosaic, a sparse tensor algebra compiler that can bind tensor expressions to external functions of other tensor algebra libraries and compilers. Users can extend Mosaic by adding new functions and bind a sub-expression to a function using a scheduling API. Mosaic substitutes the bound sub-expressions with calls to the external functions and automatically generates the remaining code using a default code generator. As the generated code is fused by default, users can productively leverage both fusion and calls to specialized functions within the same compiler. We demonstrate the benefits of our dual approach by showing that calling hand-written CPU and specialized hardware functions can provide speedups of up to 206× against fused code in some cases, while generating fused code can provide speedups of up to 3.57× against code that calls external functions in other cases. Mosaic also offers a search system that can automatically map an expression to a set of registered external functions. Both the explicit binding and automatic search are verified by Mosaic. Additionally, the interface for adding new external functions is simple and general. Currently, 38 external functions have been added to Mosaic, with each addition averaging 20 lines of code.
Förderung
- NSF
Zitieren
APA
Bansal, M., Hsu, O., Olukotun, K., & Kjolstad, F. (2023). Mosaic: An Interoperable Compiler for Tensor Algebra. Proceedings of the ACM on Programming Languages, 7(PLDI), 394-419. https://doi.org/10.1145/3591236
Vancouver
Bansal M, Hsu O, Olukotun K, Kjolstad F. Mosaic: An Interoperable Compiler for Tensor Algebra. Proceedings of the ACM on Programming Languages. 2023;7(PLDI):394-419. doi:10.1145/3591236
BibTeX
@article{Bansal2023,
author = {Bansal, Manya and Hsu, Olivia and Olukotun, Kunle and Kjolstad, Fredrik},
title = {Mosaic: An Interoperable Compiler for Tensor Algebra},
journal = {Proceedings of the ACM on Programming Languages},
year = {2023},
volume = {7},
number = {PLDI},
pages = {394--419},
doi = {10.1145/3591236}
}
EUVIMED