Abstract
Training deep learning models is compute-intensive and there is an industry-wide trend towards hardware specialization to improve performance. To systematically benchmark deep learning platforms, we introduce ParaDnn, a parameterized benchmark suite for deep learning that generates end-to-end models for fully connected (FC), convolutional (CNN), and recurrent (RNN) neural networks. Along with six real-world models, we benchmark Google's Cloud TPU v2/v3, NVIDIA's V100 GPU, and an Intel Skylake CPU platform. We take a deep dive into TPU architecture, reveal its bottlenecks, and highlight valuable lessons learned for future specialized system design. We also provide a thorough comparison of the platforms and find that each has unique strengths for some types of models. Finally, we quantify the rapid performance improvements that specialized software stacks provide for the TPU and GPU platforms.
Introduction
The rapid evolution of deep learning (DL) architectures has spurred an aggressive push toward specialized hardware, most notably Google’s Tensor Processing Units (TPUs) and NVIDIA’s Graphics Processing Units (GPUs). However, evaluating these platforms remains a significant challenge. Standard benchmark suites like MLPerf often rely on a narrow set of popular models, such as ResNet-50 or Transformer. While useful, this approach risks over-optimizing hardware and compilers for current workloads, potentially masking architectural flaws or failing to anticipate future needs. Conversely, micro-benchmarks that test isolated operations like matrix multiplication fail to capture the complex, end-to-end dependencies inherent in real-world neural networks.
To bridge this gap, we present a systematic, scientific benchmarking approach that explores a massive design space of potential model configurations.
Methodology: The ParaDnn Benchmark Suite
We developed ParaDnn (Parameterized Deep Neural Network benchmark suite) to explore the vast design space of neural networks. Unlike traditional benchmarks, ParaDnn generates thousands of end-to-end Fully Connected (FC), Convolutional (CNN), and Recurrent (RNN) networks by sweeping through critical hyperparameters such as layer count, node/filter counts, embedding sizes, and batch sizes.
Our methodology employs two primary analytical tools:
- Analytical Modeling: We use linear regression to quantify the impact of different hyperparameters on FLOPS (Floating Point Operations Per Second) utilization.
- Roofline Analysis: We apply the Roofline performance model to visualize whether specific models—and individual operations within them—are bottlenecked by compute throughput or memory bandwidth.
Datasets and Experimental Setup
The benchmark suite includes:
- ParaDnn Synthetic Models: Thousands of generated models spanning six orders of magnitude in parameter size, from 10k to nearly 1 billion parameters.
- Real-World Models: Six standard models (Transformer, ResNet-50, RetinaNet, DenseNet, MobileNet, and SqueezeNet) serve as grounding for comparison.
- Input Data: Synthetic data was generated on the CPU host to isolate device performance. Real datasets like ImageNet and COCO were used to evaluate the "data infeed" pipeline—the process of moving data from the host CPU to the accelerator.
Key Insights and Performance Analysis
Our analysis reveals that there is no "one size fits all" hardware platform. Each architecture exhibits unique strengths depending on the model type and configuration.
Architectural Strengths and Bottlenecks
- TPUs: These are highly optimized for large batch sizes and CNNs. Their systolic array architecture thrives on dense, massive matrix multiplications. On average, TPUs achieve 2x higher FLOPS utilization for CNNs and 3x higher for RNNs compared to GPUs, provided batch sizes are large enough.
- GPUs: NVIDIA’s V100 offers superior flexibility. Its warp-based scheduling is better suited for small batch sizes, massive FC models (which require high memory bandwidth for weight fetching), and irregular non-matrix-multiplication computations like RNN embeddings.
- CPUs: Despite the rise of accelerators, CPUs remain the only viable option for training extremely large models that exceed the limited on-board memory of current TPUs (8GB/core for v2) and GPUs (16GB for V100) without resorting to complex model-parallelism.
The Impact of Memory and Data Infeed
A critical finding is that memory bandwidth is often a silent killer. Even in "compute-bound" models like ResNet-50, up to 20% of operations are actually memory-bound. Furthermore, as accelerators become faster, the host CPU often becomes a bottleneck, unable to decode and feed data quickly enough. For models like RetinaNet, resolving this host-to-device bottleneck can improve training performance by over 34%.
Results and Software Evolution
- Generational Gains: TPU v3 delivers up to a 3x speedup over v2, driven by increased compute power, memory bandwidth, and capacity. The doubled memory capacity is particularly impactful, as it allows for larger batch sizes that shift memory-bound operations into the compute-bound regime.
- Software Optimization: Hardware performance is heavily dependent on the software stack. Over a seven-month period, updates to TensorFlow and the XLA compiler improved TPU performance by up to 9.7x for RNNs and 7x for FCs.
- Precision and Quantization: Moving from 32-bit floats to 16-bit (bfloat16) yields super-linear speedups by halving memory traffic and enabling larger batch sizes, boosting 90th-percentile speedups by up to 1.8x for FC models.
Conclusion and Future Work
While this study provides a comprehensive look at training throughput, several areas remain for future exploration. Our current evaluation focuses on single-node performance and does not account for the complexities of massive multi-node clusters or cloud virtualization. Additionally, we prioritize throughput over inference latency and statistical time-to-accuracy. Future research will need to address how massive batch sizes impact model convergence and how these platforms perform in large-scale distributed environments.
Summary updated