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.
翻译:我们提出稀疏抽象机(Sparse Abstract Machine, SAM),这是一种面向稀疏张量代数计算,针对可重构与固定功能空间数据流加速器的抽象机器模型。SAM定义了一种包含稀疏原语的流式数据流抽象,可覆盖大范围可调度的张量代数表达式。SAM数据流图天然分离张量格式与算法,并具备充分的表达能力以纳入任意迭代次序与多种硬件特定优化。我们还提出了Custard——一个从高级语言到SAM的编译器,以此证明SAM作为中间表示的有效性。我们自动将SAM绑定至流式数据流模拟器。通过评估SAM的通用性与可扩展性,我们利用SAM探索了稀疏张量代数优化的性能空间,并展示了SAM表征数据流硬件的能力。