TorchSparse++: Efficient Training and Inference Framework for Sparse Convolution on GPUs

Haotian Tang, Shang Yang, Zhijian Liu, Ke Hong, Zhongming Yu +4 more
10/25/2023
cs.DCcs.CVcs.LG

Official code: mit-han-lab/torchsparse (1,470 stars, MIT, PyTorch, last commit 2025-02-24).

Abstract

Sparse convolution plays a pivotal role in emerging workloads, including point cloud processing in AR/VR, autonomous driving, and graph understanding in recommendation systems. Since the computation pattern is sparse and irregular, specialized high-performance kernels are required. Existing GPU libraries offer two dataflow types for sparse convolution. The gather-GEMM-scatter dataflow is easy to implement but not optimal in performance, while the dataflows with overlapped computation and memory access (e.g.implicit GEMM) are highly performant but have very high engineering costs. In this paper, we introduce TorchSparse++, a new GPU library that achieves the best of both worlds. We create a highly efficient Sparse Kernel Generator that generates performant sparse convolution kernels at less than one-tenth of the engineering cost of the current state-of-the-art system. On top of this, we design the Sparse Autotuner, which extends the design space of existing sparse convolution libraries and searches for the best dataflow configurations for training and inference workloads. Consequently, TorchSparse++ achieves 2.9x, 3.3x, 2.2x and 1.7x measured end-to-end speedup on an NVIDIA A100 GPU over state-of-the-art MinkowskiEngine, SpConv 1.2, TorchSparse and SpConv v2 in inference; and is 1.2-1.3x faster than SpConv v2 in mixed precision training across seven representative autonomous driving benchmarks. It also seamlessly supports graph convolutions, achieving 2.6-7.6x faster inference speed compared with state-of-the-art graph deep learning libraries.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

[MICRO'23, MLSys'22] TorchSparse: Efficient Training and Inference Framework for Sparse Convolution on GPUs.

1,470191C, C++Aug 24, 20201 years agoMIT
accelerationpytorch

Cite this paper

@article{tang2023torchsparse,
  title  = {TorchSparse++: Efficient Training and Inference Framework for Sparse Convolution on GPUs},
  author = {Haotian Tang and Shang Yang and Zhijian Liu and Ke Hong and Zhongming Yu and Xiuyu Li and Guohao Dai and Yu Wang and Song Han},
  year   = {2023},
  eprint = {2311.12862},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.12862v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2311.12862.svg)](https://codeofpaper.com/paper/2311.12862)

Discussion