一句话:提出面向稀疏张量代数和空间数据流加速器的抽象机 SAM,并实现编译器 Custard 与仿真评估。
将稀疏张量代数映射到可重构和固定功能的空间数据流加速器,需要同时表达算法、张量格式、调度顺序与硬件优化,现有抽象往往难以兼顾。本文提出稀疏抽象机 SAM:一种面向此类加速器的抽象机模型,定义流式数据流抽象和稀疏原语,可覆盖广泛的已调度张量代数表达式。SAM 数据流图将张量格式与算法自然分离,并支持任意迭代顺序和多种硬件特定优化。作者还实现从高层语言到 SAM 的编译器 Custard,并自动绑定到流式数据流模拟器。评估展示了 SAM 的通用性与可扩展性,探索了稀疏张量代数优化的性能空间,并证明其表达数据流硬件的能力。
We propose the Sparse Abstract Machine (SAM), an abstract machine model for targeting sparse tensor algebra to reconfigurable and fixed-function spatial dataflow accelerators. SAM defines a streaming dataflow abstraction with sparse primitives that encompass a large space of scheduled tensor algebra expressions. SAM dataflow graphs naturally separate tensor formats from algorithms and are expressive enough to incorporate arbitrary iteration orderings and many hardware-specific optimizations. We also present Custard, a compiler from a high-level language to SAM that demonstrates SAM's usefulness as an intermediate representation. We automatically bind from SAM to a streaming dataflow simulator. We evaluate the generality and extensibility of SAM, explore the performance space of sparse tensor algebra optimizations using SAM, and show SAM's ability to represent dataflow hardware.
@inproceedings{paperbot10065,
title = {The Sparse Abstract Machine},
author = {Olivia Hsu and Maxwell Strange and Ritvik Sharma and Jaeyeon Won and Kunle Olukotun and Joel S. Emer and Mark A. Horowitz and Fredrik Kjølstad},
booktitle = {ASPLOS},
year = {2023},
doi = {10.1145/3582016.3582051}
}