多层数据流:编排蝴蝶稀疏以加速注意力计算
Multilayer Dataflow: Orchestrate Butterfly Sparsity to Accelerate Attention Computation
AI总结:
本文提出混合蝴蝶稀疏网络与可扩展多层数据流方法,在可重构数据流阵列上高效编排注意力计算,显著提升加速比和能效。
摘要:
近年来,具有自注意力机制的神经网络在不同人工智能领域展现出竞争力,但核心的注意力机制带来了巨大的计算和内存需求。为此,各种稀疏模式被引入以降低二次计算复杂度,其中结构化蝴蝶稀疏已被证明能够在保持模型精度的同时有效减少计算量。然而,其复杂的数据访问模式会导致利用率下降,并使得在GPU等通用面向块架构上难以利用并行性。由于可重构数据流架构在通用神经网络加速中具有更好的数据复用性和架构灵活性,我们希望将其应用于蝴蝶稀疏,从而为注意力工作负载获得更高的计算效率。我们首先提出一种混合蝴蝶稀疏网络,以在注意力精度和性能之间取得更好的权衡。接着,我们提出一种可扩展的多层数据流方法,并辅以粗粒度流式并行设计,在数据流阵列上编排蝴蝶稀疏计算。实验表明,与Jetson Xavier NX相比,我们的设计在注意力工作负载中实现了最高14.34倍(平均9.29倍)的加速,以及11.14倍的能效提升。与同等峰值性能的SOTA注意力加速器相比,我们的数据流架构通过蝴蝶稀疏优化获得了2.38倍至4.7倍的效率提升,以及6.60倍至15.37倍的能耗降低。
英文摘要:
Recent neural networks (NNs) with self-attention exhibit competitiveness across different AI domains, but the essential attention mechanism brings massive computation and memory demands. To this end, various sparsity patterns are introduced to reduce the quadratic computation complexity, among which the structured butterfly sparsity has been proven efficient in computation reduction while maintaining model accuracy. However, its complicated data accessing pattern brings utilization degradation and makes parallelism hard to exploit in general block-oriented architecture like GPU. Since the reconfigurable dataflow architecture is known to have better data reusability and architectural flexibility in general NN-based acceleration, we want to apply it to the butterfly sparsity for acquiring better computational efficiency for attention workloads. We first propose a hybrid butterfly-sparsity network to obtain better trade-offs between attention accuracy and performance. Next, we propose a scalable multilayer dataflow method supported by coarse-grained streaming parallelism designs, to orchestrate the butterfly sparsity computation on the dataflow array. The experiments show that compared with Jetson Xavier NX, our design has a speedup of up to $14.34\times$ ($9.29\times$ on average) as well as $11.14\times$ energy efficiency advancement in attention workloads. In comparison with SOTA attention accelerators of the same peak performance, our dataflow architecture acquires $2.38\times$-$4.7\times$ efficiency improvement as well as $6.60\times$-$15.37\times$ energy reduction with butterfly sparsity optimization.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。