Mosaic: An Interoperable Compiler for Tensor Algebra
Mosaic: An Interoperable Compiler for Tensor Algebra
复制标题
Mosaic:张量代数的可互操作编译器
DOI:
10.1145/3591236
复制
发表时间:
2023
影响因子:
--
通讯作者:
Kjolstad, Fredrik
中科院分区:
文献类型:
--
作者:
Bansal, Manya;Hsu, Olivia;Olukotun, Kunle;Kjolstad, Fredrik
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.
登录
查看更多内容
DOI:
10.1145/3445814.3446702
发表时间:
2021-04
期刊:
Proceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems
影响因子:
--
作者:
Guowei Zhang;Nithya Attaluri;J. Emer;Daniel Sánchez
通讯作者:
Guowei Zhang;Nithya Attaluri;J. Emer;Daniel Sánchez
DOI:
10.1145/3544559
发表时间:
2022
期刊:
ACM Transactions on Architecture and Code Optimization (TACO)
影响因子:
--
作者:
["Aart J. C. Bik
通讯作者:
["Aart J. C. Bik
影响因子:
1.8
作者:
Kjolstad, Fredrik;Kamil, Shoaib;Amarasinghe, Saman
通讯作者:
Amarasinghe, Saman
DOI:
10.1137/17m1135578
发表时间:
2017-04
期刊:
SIAM J. Sci. Comput.
影响因子:
--
作者:
Jianyu Huang;D. Matthews;R. Geijn
通讯作者:
Jianyu Huang;D. Matthews;R. Geijn
影响因子:
--
作者:
Ryan Senanayake;Changwan Hong;Ziheng Wang;Amalee Wilson;Stephen Chou;Shoaib Kamil;Saman P. Amarasinghe;Fredrik Kjolstad
通讯作者:
Ryan Senanayake;Changwan Hong;Ziheng Wang;Amalee Wilson;Stephen Chou;Shoaib Kamil;Saman P. Amarasinghe;Fredrik Kjolstad