[论文解读] Escort: Efficient Sparse Convolutional Neural Networks on GPUs
Escort 提出了一种针对 GPU 的直接稀疏卷积内核,绕过矩阵乘法降级,通过优化并行性和数据局部性,在稀疏卷积上实现了相较于 CUBLAS 和 CUSPARSE 的 2.63x–3.07x 加速,并在整体推理速度上实现了 1.38x–1.60x 的提升,克服了稀疏性引起的不规则性与内存重用性差所带来的效率低下问题。
Deep neural networks have achieved remarkable accuracy in many artificial intelligence applications, e.g. computer vision, at the cost of a large number of parameters and high computational complexity. Weight pruning can compress DNN models by removing redundant parameters in the networks, but it brings sparsity in the weight matrix, and therefore makes the computation inefficient on GPUs. Although pruning can remove more than 80% of the weights, it actually hurts inference performance (speed) when running models on GPUs. Two major problems cause this unsatisfactory performance on GPUs. First, lowering convolution onto matrix multiplication reduces data reuse opportunities and wastes memory bandwidth. Second, the sparsity brought by pruning makes the computation irregular, which leads to inefficiency when running on massively parallel GPUs. To overcome these two limitations, we propose Escort, an efficient sparse convolutional neural networks on GPUs. Instead of using the lowering method, we choose to compute the sparse convolutions directly. We then orchestrate the parallelism and locality for the direct sparse convolution kernel, and apply customized optimization techniques to further improve performance. Evaluation on NVIDIA GPUs show that Escort can improve sparse convolution speed by 2.63x and 3.07x, and inference speed by 1.38x and 1.60x, compared to CUBLAS and CUSPARSE respectively.
研究动机与目标
- 解决由稀疏性引起的不规则性与内存带宽利用率低下所导致的 GPU 上稀疏卷积效率低下的问题。
- 克服权重剪枝带来的性能下降问题,尽管剪枝能减小模型尺寸,但在 GPU 上仍会损害推理速度。
- 设计一种针对 GPU 优化的稀疏卷积内核,避免降级为矩阵乘法,以保留数据重用性和计算规整性。
- 通过直接稀疏计算方法,协调并行性与局部性,实现在稀疏卷积上的高性能。
提出的方法
- 实现一种直接稀疏卷积内核,无需将稀疏卷积降级为矩阵乘法,从而保留数据局部性并减少内存带宽浪费。
- 协调线程级与数据级并行性,高效地将稀疏操作映射到 GPU 流式多处理器上。
- 应用定制化的内存访问模式与分块策略,以最大化数据重用并最小化不规则内存访问模式。
- 优化内核启动配置与内存合并,以提升占用率并降低稀疏计算中的延迟。
- 采用类似压缩稀疏行(CSR)的格式,实现稀疏权重的高效表示与内存访问。
- 将内核集成到完整的推理流水线中,以在真实模型上评估端到端性能。
实验结果
研究问题
- RQ1在 GPU 上,直接稀疏卷积与基于矩阵乘法的方法相比,性能表现如何?
- RQ2在大规模并行 GPU 上,经过优化的并行性与数据局部性能在多大程度上可以缓解稀疏操作的低效问题?
- RQ3在稀疏推理场景下,自定义稀疏卷积内核是否能够超越高度优化的库(如 CUBLAS 和 CUSPARSE)?
- RQ4稀疏性对推理速度有何影响?通过算法与架构优化,能否有效抵消其负面影响?
主要发现
- Escort 在 NVIDIA GPU 上相较于 CUBLAS 将稀疏卷积速度提升了 2.63 倍,相较于 CUSPARSE 提升了 3.07 倍。
- 与 CUBLAS 和 CUSPARSE 相比,该方法在整体模型推理速度上分别实现了 1.38 倍和 1.60 倍的加速。
- 通过避免矩阵乘法降级,Escort 减少了内存带宽压力,并提升了稀疏操作中的数据重用性。
- 直接稀疏内核设计有效缓解了阻碍 GPU 占用率与性能的不规则内存访问模式。
- 针对线程映射、内存访问与分块的定制化优化显著提升了稀疏卷积内核的性能。
- 性能提升在多个模型与不同稀疏度水平下均保持一致,证明了其在现代 GPU 架构上的鲁棒性与可扩展性。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。