Compilation of Modular and General Sparse Workspaces
Proceedings of the ACM on Programming Languages · 20.06.2024 · 8 (PLDI) · 1213-1238
DOI: 10.1145/3656426 ↗Kurz gefasst
Fachartikel in der Zeitschrift Proceedings of the ACM on Programming Languages, online erschienen am 20.06.2024. Verfasst von Genghan Zhang und 2 weiteren Autor:innen. Die Arbeit wurde bisher 8-mal zitiert (Crossref) und nennt 87 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0).
Abstract (Originalsprache)
Recent years have seen considerable work on compiling sparse tensor algebra expressions. This paper addresses a shortcoming in that work, namely how to generate efficient code (in time and space) that scatters values into a sparse result tensor. We address this shortcoming through a compiler design that generates code that uses sparse intermediate tensors (sparse workspaces) as efficient adapters between compute code that scatters and result tensors that do not support random insertion. Our compiler automatically detects sparse scattering behavior in tensor expressions and inserts necessary intermediate workspace tensors. We present an algorithm template for workspace insertion that is the backbone of our code generation algorithm. Our algorithm template is modular by design, supporting sparse workspaces that span multiple user-defined implementations. Our evaluation shows that sparse workspaces can be up to 27.12 × faster than the dense workspaces of prior work. On the other hand, dense workspaces can be up to 7.58 × faster than the sparse workspaces generated by our compiler in other situations, which motivates our compiler design that supports both. Our compiler produces sequential code that is competitive with hand-optimized linear and tensor algebra libraries on the expressions they support, but that generalizes to any other expression. Sparse workspaces are also more memory efficient than dense workspaces as they compress away zeros. This compression can asymptotically decrease memory usage, enabling tensor computations on data that would otherwise run out of memory.
Zitieren
APA
Zhang, G., Hsu, O., & Kjolstad, F. (2024). Compilation of Modular and General Sparse Workspaces. Proceedings of the ACM on Programming Languages, 8(PLDI), 1213-1238. https://doi.org/10.1145/3656426
Vancouver
Zhang G, Hsu O, Kjolstad F. Compilation of Modular and General Sparse Workspaces. Proceedings of the ACM on Programming Languages. 2024;8(PLDI):1213-1238. doi:10.1145/3656426
BibTeX
@article{Zhang2024,
author = {Zhang, Genghan and Hsu, Olivia and Kjolstad, Fredrik},
title = {Compilation of Modular and General Sparse Workspaces},
journal = {Proceedings of the ACM on Programming Languages},
year = {2024},
volume = {8},
number = {PLDI},
pages = {1213--1238},
doi = {10.1145/3656426}
}
EUVIMED