TorchBench: Benchmarking PyTorch with High API Surface Coverage

Yueming Hao, Xu Zhao, Bin Bao, David Berard, Will Constable +2 more
4/27/2023
cs.LGcs.AIcs.PF

No official code found. Best implementation: pytorch/benchmark (1,043 stars, BSD-3-Clause, PyTorch, last commit 2026-05-01).

Abstract

Deep learning (DL) has been a revolutionary technique in various domains. To facilitate the model development and deployment, many deep learning frameworks are proposed, among which PyTorch is one of the most popular solutions. The performance of ecosystem around PyTorch is critically important, which saves the costs of training models and reduces the response time of model inferences. In this paper, we propose TorchBench, a novel benchmark suite to study the performance of PyTorch software stack. Unlike existing benchmark suites, TorchBench encloses many representative models, covering a large PyTorch API surface. TorchBench is able to comprehensively characterize the performance of the PyTorch software stack, guiding the performance optimization across models, PyTorch framework, and GPU libraries. We show two practical use cases of TorchBench. (1) We profile TorchBench to identify GPU performance inefficiencies in PyTorch. We are able to optimize many performance bugs and upstream patches to the official PyTorch repository. (2) We integrate TorchBench into PyTorch continuous integration system. We are able to identify performance regression in multiple daily code checkins to prevent PyTorch repository from introducing performance bugs. TorchBench is open source and keeps evolving.

View on arXivView PDF

Code Implementations(1)

pytorch/benchmarkCommunity100%
PyTorchBSD-3-Clause

TorchBench is a collection of open source benchmarks used to evaluate PyTorch performance.

1,043341Shell, MATLABMay 26, 20175 months agoBSD-3-Clause
benchmarkpytorch

Similar Papers

Cite this paper

@article{hao2023torchbench,
  title  = {TorchBench: Benchmarking PyTorch with High API Surface Coverage},
  author = {Yueming Hao and Xu Zhao and Bin Bao and David Berard and Will Constable and Adnan Aziz and Xu Liu},
  year   = {2023},
  eprint = {2304.14226},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2304.14226v3}
}

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/2304.14226.svg)](https://codeofpaper.com/paper/2304.14226)

Discussion