基于分块 GEMM 的稀疏 DNN 加速
Accelerating Sparse DNNs Based on Tiled GEMM
AI总结:
提出一种 tile-wise 与 tile-vector-wise (TVW) 稀疏模式,结合分块级结构化与全局不规则剪枝,在 GPU 上相比密集、块稀疏和非结构化稀疏模型分别实现 1.85×、2.75× 和 22.18× 的平均加速。
摘要:
网络剪枝可以降低深度神经网络(DNN)模型的计算成本。然而,稀疏模型通常会产生随机分布的权重以保持精度,从而导致不规则计算。因此,在为密集矩阵计算而构建的商用硬件上,非结构化稀疏模型无法获得显著的加速。加速器通常会被修改或设计为具有结构化稀疏优化的架构,以利用稀疏性。例如,Ampere 架构引入了稀疏张量核心,该核心采用 2:4 稀疏模式。我们提出了一种剪枝方法,该方法基于这样一个洞察:矩阵乘法通常将大矩阵划分为多个较小的分块以进行并行执行。我们提出了 tile-wise 稀疏模式,该模式在分块级别保持结构化稀疏模式以实现高效执行,同时允许在全局范围内进行不规则剪枝以保持高精度。此外,tile-wise 稀疏性在全局内存级别实现,而 2:4 稀疏性在稀疏张量核心内部的寄存器级别执行。我们可以将这两种模式组合成 tile-vector-wise (TVW) 稀疏模式,以探索更细粒度的稀疏性并进一步加速稀疏 DNN 模型。我们在 GPU 上评估了 TVW,与密集模型、块稀疏和非结构化稀疏相比,平均分别实现了 $1.85\ imes$、$2.75\ imes$ 和 $22.18\ imes$ 的加速。
英文摘要:
Network pruning can reduce the computation cost of deep neural network (DNN) models. However, sparse models often produce randomly-distributed weights to maintain accuracy, leading to irregular computations. Consequently, unstructured sparse models cannot achieve meaningful speedup on commodity hardware built for dense matrix computations. Accelerators are usually modified or designed with structured sparsity-optimized architectures for exploiting sparsity. For example, the Ampere architecture introduces a sparse tensor core, which adopts the 2:4 sparsity pattern. We propose a pruning method that builds upon the insight that matrix multiplication generally breaks the large matrix into multiple smaller tiles for parallel execution. We present the tile-wise sparsity pattern, which maintains a structured sparsity pattern at the tile level for efficient execution but allows for irregular pruning at the global scale to maintain high accuracy. In addition, the tile-wise sparsity is implemented at the global memory level, and the 2:4 sparsity executes at the register level inside the sparse tensor core. We can combine these two patterns into a tile-vector-wise (TVW) sparsity pattern to explore more fine-grained sparsity and further accelerate the sparse DNN models. We evaluate the TVW on the GPU, achieving averages of $1.85\times$, $2.75\times$, and $22.18\times$ speedups over the dense model, block sparsity, and unstructured sparsity.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。