At-Scale Sparse Deep Neural Network Inference with Efficient GPU\n Implementation

Mert Hidayetoğlu, Carl M. Pearson, Vikram Sharma Mailthody, Eiman Ebrahimi, Jinjun Xiong, Rakesh Nagi, Wen‐mei Hwu

Abstract

This paper presents GPU performance optimization and scaling results for inference models of the Sparse Deep Neural Network Challenge 2020. Demands for network quality have increased rapidly, pushing the size and thus the memory requirements of many neural networks beyond the capacity of available accelerators. Sparse deep neural networks (SpDNN) have shown promise for reining in the memory footprint of large neural networks. However, there is room for improvement in implementing SpDNN operations on GPUs. This work presents optimized sparse matrix multiplication kernels fused with the ReLU function. The optimized kernels reuse input feature maps from the shared memory and sparse weights from registers. For multi-GPU parallelism, our SpDNN implementation duplicates weights and statically partition the feature maps across GPUs. Results for the challenge benchmarks show that the proposed kernel design and multi-GPU parallelization achieve up to 180 tera-edges per second inference throughput. These results are up to 4.3x faster for a single GPU and an order of magnitude faster at full scale than those of the champion of the 2019 Sparse Deep Neural Network Graph Challenge for the same generation of NVIDIA V100 GPUs. Using the same implementation, we also show single-GPU throughput on NVIDIA A100 is 2.37$\times$ faster than V100.

Introduction

As deep learning models continue to grow in scale, their memory requirements frequently exceed the capacity of modern hardware accelerators. While "sparsifying" networks—removing redundant connections—offers a path toward reducing memory footprints, it introduces significant computational challenges. GPUs are optimized for dense, predictable, block-based operations. In contrast, sparse deep neural networks (SpDNN) involve irregular memory access patterns that lead to uncoalesced memory accesses and wasted bandwidth. This work addresses these inefficiencies by redesigning memory access patterns and kernel execution for modern GPU architectures.

Optimized Kernel Design

The core of the proposed solution is a fused kernel that combines sparse matrix multiplication (SpMM) with the ReLU activation function. This fusion avoids the "memory wall" by preventing unnecessary writes of intermediate results back to global memory and subsequent re-reads.

Baseline fused kernel operation using CSR format.

To overcome the limitations of standard sparse formats like Compressed Sparse Row (CSR), the authors implemented several key optimizations focused on the memory hierarchy:

  1. Sliced ELLPACK Format: Weights are stored in a transposed "sliced ELLPACK" format. This ensures that threads within a warp access memory in a coalesced, aligned manner, significantly improving hardware efficiency compared to the irregular jumps required by CSR.
  2. Shared-Memory Tiling: A preprocessing step generates a "map" of required input features for each thread block. These features are staged into shared memory, transforming irregular global memory accesses into fast local lookups.
  3. Register Tiling: By processing a "minibatch" of features simultaneously, sparse weights are loaded into fast registers once and reused across multiple inputs, minimizing redundant memory reads.
Advanced memory optimizations including Sliced ELLPACK and shared-memory staging.

Performance and Scaling

The implementation was evaluated using the Sparse Deep Neural Network Challenge 2020 benchmarks, utilizing synthetic networks generated by RadiX-Net with up to 1,920 layers. The results demonstrate a significant leap in performance:

  • Single-GPU Efficiency: The optimized kernels achieved up to an 11.84× speedup over baseline sparse implementations and outperformed NVIDIA’s standard cuSPARSE library by 200× for these specific workloads.
  • Hardware Scaling: On the NVIDIA A100, the implementation was 2.37× faster than on the V100, demonstrating that the optimizations scale well with newer hardware generations.
  • At-Scale Throughput: When scaled to 768 GPUs on the Summit supercomputer, the system reached a record-breaking throughput of 180 TeraEdges per second. This is approximately 3.25× to 19.13× faster than the 2019 challenge champions using identical hardware.

Conclusion

By treating sparsity primarily as a memory hierarchy problem rather than a mathematical one, this research demonstrates that irregular neural networks can achieve high efficiency on GPUs. While challenges such as load imbalance in multi-GPU setups and decreased efficiency at small batch sizes remain, the use of software-managed caching and optimized data formats like Sliced ELLPACK provides a robust framework for at-scale sparse inference.

Summary updated

Abstract

This paper presents GPU performance optimization and scaling results for\ninference models of the Sparse Deep Neural Network Challenge 2020. Demands for\nnetwork quality have increased rapidly, pushing the size and thus the memory\nrequirements of many neural networks beyond the capacity of available\naccelerators. Sparse deep neural networks (SpDNN) have shown promise for\nreining in the memory footprint of large neural networks. However, there is\nroom for improvement in implementing SpDNN operations on GPUs. This work\npresents optimized sparse matrix multiplication kernels fused with the ReLU\nfunction. The optimized kernels reuse input feature maps from the shared memory\nand sparse weights from registers. For multi-GPU parallelism, our SpDNN\nimplementation duplicates weights and statically partition the feature maps\nacross GPUs. Results for the challenge benchmarks show that the proposed kernel\ndesign and multi-GPU parallelization achieve up to 180 tera-edges per second\ninference throughput. These results are up to 4.3x faster for a single GPU and\nan order of magnitude faster at full scale than those of the champion of the\n2019 Sparse Deep Neural Network Graph Challenge for the same generation of\nNVIDIA V100 GPUs. Using the same implementation, we also show single-GPU\nthroughput on NVIDIA A100 is 2.37$\\times$ faster than V100.\n
BibTeX
@misc{hidayetoglu2020at,
  author = {Mert Hidayetoğlu and Carl M. Pearson and Vikram Sharma Mailthody and Eiman Ebrahimi and Jinjun Xiong and Rakesh Nagi and Wen‐mei Hwu},
  title = {{At-Scale Sparse Deep Neural Network Inference with Efficient GPU\textbackslash\{\}n Implementation}},
  year = {2020},
  eprint = {2007.14152},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2007.14152},
}
Figure