Skip to main content
QUICK REVIEW

[Paper Review] SparseRT: Accelerating Unstructured Sparsity on GPUs for Deep Learning Inference

Ziheng Wang|arXiv (Cornell University)|Aug 26, 2020
Advanced Neural Network ApplicationsComputer Science42 references8 citations
TL;DR

SparseRT is a code generator that accelerates unstructured sparsity in deep learning inference on GPUs by leveraging the inspector-executor framework to optimize sparse matrix-dense matrix multiplication (SpMM). It achieves geometric mean speedups of 3.4x at 90% sparsity and 5.4x at 95% sparsity for 1x1 convolutions and fully connected layers, demonstrating that unstructured sparsity can be efficiently exploited on commodity GPUs.

ABSTRACT

In recent years, there has been a flurry of research in deep neural network pruning and compression. Early approaches prune weights individually. However, it is difficult to take advantage of the resulting unstructured sparsity patterns on modern hardware like GPUs. As a result, pruning strategies which impose sparsity structures in the weights have become more popular. However,these structured pruning approaches typically lead to higher losses in accuracy than unstructured pruning. In this paper, we present SparseRT, a code generator that leverage unstructured sparsity to accelerate sparse linear algebra operations in deep learning inference on GPUs. For 1x1 convolutions and fully connected layers, we demonstrate geometric mean of speedups of 3.4x over the equivalent dense computation at 90% sparsity and 5.4x at 95% sparsity when evaluated on hundreds of test cases in deep learning. For sparse 3x3 convolutions, we show speedups of over 5x on use cases in ResNet-50.

Motivation & Objective

  • To challenge the conventional belief that unstructured sparsity is poorly supported on modern GPU hardware.
  • To address the performance bottleneck of existing SpMM implementations in deep learning, which are optimized for scientific computing with extreme sparsity.
  • To enable efficient inference for pruned deep neural networks with unstructured sparsity using general-purpose GPU architectures.
  • To demonstrate that unstructured pruning can be both accurate and performant when paired with custom-optimized kernels.

Proposed method

  • SparseRT uses an inspector-executor framework to analyze sparsity patterns and generate optimized PTX kernels for SpMM operations.
  • It starts from dense matrix multiplication and eliminates unnecessary computations based on sparsity patterns, avoiding reliance on complex sparse formats.
  • The system generates custom CUDA kernels via a PTX code generation backend tailored to the sparsity structure of each layer.
  • Sparse 3x3 convolutions are accelerated by transforming them into SpMM using the im2col technique.
  • The approach is evaluated on real-world pruned models from computer vision and NLP, including ResNet-50 and BERT-like architectures.
  • Performance is measured at varying sparsity levels (90% and 95%) across hundreds of test cases to ensure generalization.

Experimental results

Research questions

  • RQ1Can unstructured sparsity be efficiently accelerated on commodity GPUs without custom hardware?
  • RQ2How effective are inspector-executor-based code generation techniques for SpMM in deep learning inference workloads?
  • RQ3What performance gains can be achieved with unstructured sparsity at practical sparsity levels (e.g., 90–95%)?
  • RQ4To what extent can SpMM optimizations improve inference speed for 1x1 convolutions and fully connected layers in pruned networks?
  • RQ5Can sparse convolution operations be effectively reduced to SpMM with minimal performance loss?

Key findings

  • SparseRT achieves a geometric mean speedup of 3.4x over dense computation at 90% sparsity for 1x1 convolutions and fully connected layers.
  • At 95% sparsity, the geometric mean speedup increases to 5.4x, demonstrating strong scalability with higher sparsity.
  • For sparse 3x3 convolutions in ResNet-50, the system achieves up to 4x speedup by reducing the operation to SpMM.
  • The performance gains are consistent across hundreds of test matrices from real-world pruned models in computer vision and NLP.
  • The results challenge the prevailing assumption that unstructured sparsity is incompatible with general-purpose GPU architectures.
  • The study shows that with proper code generation and optimization, unstructured sparsity can be a viable path for efficient deep learning inference.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.