arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2104.12339cs.AR
收藏

TensorLib:一个面向张量代数的空间加速器生成框架

TensorLib: A Spatial Accelerator Generation Framework for Tensor Algebra

Liancheng Jia, Zizhang Luo, Liqiang Lu, Yun Liang

摘要:

张量代数在各个领域都有应用,这些应用,特别是在空间硬件加速器上加速时,可以提供高性能和低功耗。空间硬件加速器具有复杂的设计空间。基于手动实现的先前方法导致编程生产率低,使得彻底的设计空间探索不可能。在本文中,我们提出了TensorLib,一个为张量代数应用生成空间硬件加速器的框架。TensorLib的动机是观察到,不同的固件共享共同的硬件模块,这些模块可以在不同的设计中重用。为了构建这样一个框架,TensorLib首先使用时空变换来探索不同的时间流,这些时间流可以使用一个简单的变换矩阵来压缩表示硬件时间流。接下来,我们确定不同的硬件模块的通用结构,并使用Chisel构建参数化的硬件模块模板。我们的生成框架可以选择所需的硬件模块为每个FPGA,使用指定的互连模式连接的模块,并自动生成完整的硬件加速器设计。TensorLib显著提高了空间硬件架构开发和优化的生产力,提供了丰富的设计空间,并在性能、面积和功耗方面进行了权衡。实验结果表明,TensorLib可以自动生成不同时序的硬件设计,在FPGA上实现了21%的性能提升。

英文摘要:

Tensor algebra finds applications in various domains, and these applications, especially when accelerated on spatial hardware accelerators, can deliver high performance and low power. Spatial hardware accelerator exhibits complex design space. Prior approaches based on manual implementation lead to low programming productivity, rendering thorough design space exploration impossible. In this paper, we propose TensorLib, a framework for generating spatial hardware accelerator for tensor algebra applications. TensorLib is motivated by the observation that, different dataflows share common hardware modules, which can be reused across different designs. To build such a framework, TensorLib first uses Space-Time Transformation to explore different dataflows, which can compactly represent the hardware dataflow using a simple transformation matrix. Next, we identify the common structures of different dataflows and build parameterized hardware module templates with Chisel. Our generation framework can select the needed hardware modules for each dataflow, connect the modules using a specified interconnection pattern, and automatically generate the complete hardware accelerator design. TensorLib remarkably improves the productivity for the development and optimization of spatial hardware architecture, providing a rich design space with trade-offs in performance, area, and power. Experiments show that TensorLib can automatically generate hardware designs with different dataflows and achieve 21\% performance improvement on FPGA compared to the state-of-the-arts.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑