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.
翻译:我们提出了稀疏抽象机(SAM),这是一种针对稀疏张量代数定位至可重构和固定功能空间数据流加速器的抽象机模型。SAM定义了一个流数据流抽象,其中包括大量的张量代数表达式。SAM数据流图自然地将张量格式与算法分离,并具有足够的表达能力,可以包含任意迭代顺序和许多硬件特定的优化。我们还提供了Custard,一种从高级语言到SAM的编译器,用于证明作为中间表示时SAM的有用性。我们自动地从SAM绑定到流数据流模拟器。我们评估了SAM的通用性和可扩展性,探索了稀疏张量代数优化的性能空间,并展示了SAM代表数据流硬件的能力。