arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.20496cs.LGcs.AI

面向 GPU 上层次化 N:M 稀疏的高效置换方法

Toward Efficient Permutation for Hierarchical N:M Sparsity on GPUs

Sungkyunkwan University(成均馆大学)

Seungmin Yu, Xiaodie Yi, Hayun Lee, Dongkun Shin

AI总结:

本文提出一种专为层次化N:M稀疏设计的通道置换方法gyro-permutation,通过策略性采样、聚类与分配规避局部最优,并开发GPU内核支持独立层置换,显著提升压缩网络精度至与无结构稀疏网络相当。

摘要:

N:M稀疏剪枝是一种压缩深度神经网络的强大技术,利用了NVIDIA的Sparse Tensor Core技术。该方法得益于硬件对稀疏索引的支持,能够采用细粒度稀疏以维持模型精度,同时最小化通常与不规则数据访问相关的开销。尽管由于依赖硬件而被限制在固定稀疏度,N:M稀疏可与更粗粒度的稀疏技术结合以实现多样的压缩比。首先对稠密模型应用列向量稀疏,随后在保留的列向量上应用行级N:M稀疏。我们将这种多级方法称为层次化N:M(HiNM)稀疏。与早期的单级稀疏技术类似,HiNM稀疏需要有效的通道置换策略以最大化压缩网络的精度。然而,它引入了进一步的复杂性,要求同时重排输入和输出通道,并解决置换顺序、HiNM稀疏感知置换以及维持跨层通道排序一致性等挑战。本文提出一种专为HiNM稀疏设计的通道置换方法,命名为gyro-permutation。该方法旨在利用HiNM剪枝的独特特性,在每个置换阶段(包括通道采样、聚类和分配)采用策略性策略以规避局部最优。此外,我们开发了支持HiNM稀疏网络执行时独立层置换的GPU内核。在多种DNN模型上的广泛实验评估表明,gyro-permutation显著提升了HiNM稀疏网络的精度,使其性能达到与无结构稀疏网络相当的水平。

英文摘要:

N:M sparsity pruning is a powerful technique for compressing deep neural networks, utilizing NVIDIA's Sparse Tensor Core technology. This method benefits from hardware support for sparse indexing, enabling the adoption of fine-grained sparsity to maintain model accuracy while minimizing the overhead typically associated with irregular data access. Although restricted to a fixed level of sparsity due to its reliance on hardware, N:M sparsity can be combined with coarser sparsity techniques to achieve diverse compression ratios. Initially, column-wise vector sparsity is applied to a dense model, followed by row-wise N:M sparsity on the preserved column vectors. We call this multi-level approach as hierarchical N:M (HiNM) sparsity. Similar to earlier single-level sparsity techniques, HiNM sparsity necessitates an effective channel permutation strategy to maximize the accuracy of the compressed networks. However, it introduces further complexities by requiring the rearrangement of both input and output channels, addressing challenges such as permutation sequence, HiNM-sparsity-aware permutation, and maintaining consistency in channel ordering across layers. In this paper, we introduce a channel permutation method designed specifically for HiNM sparsity, named gyro-permutation. This method is crafted to exploit the unique characteristics of HiNM pruning, incorporating a strategic policy in each permutation phase, including channel sampling, clustering, and assignment, to circumvent local minima. Additionally, we have developed a GPU kernel that facilitates independent layer permutation during the execution of HiNM sparse networks. Our extensive experimental evaluations on various DNN models demonstrate that our gyro-permutation significantly enhances the accuracy of HiNM sparse networks, allowing them to reach performance levels comparable to those of unstructured sparse networks.

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

↑