Abstract
Deep learning training presents unique hardware challenges compared to inference, including complex execution graphs and high memory pressure from stashed activations. Existing hardware search tools often fail to navigate the vast design space of distributed training accelerators. This paper introduces WHAM (Workload-Aware Hardware Accelerator Mining), a framework that utilizes critical-path-based search and binary tree pruning to optimize hardware configurations. WHAM navigates the design space up to 31x faster than previous methods, achieving up to 12x higher throughput for individual models and outperforming hand-optimized architectures like Google’s TPUv2 by 12%.
Introduction
Most hardware accelerator research focuses on inference—the process of running pre-trained models. However, training is a significantly more demanding task involving forward passes, backward passes (gradient calculation), and parameter updates. This creates larger execution graphs and requires stashing activations in memory, demanding higher computational intensity.
Modern models are often too large for a single chip, necessitating distributed training across multiple devices via pipeline or tensor parallelism. Existing "black-box" search tools struggle with the resulting design space—deciding the optimal number of tensor cores, vector cores, and buffers for each chip in a multi-stage pipeline—which can reach a complexity of $10^{216}$. WHAM addresses this by automating the design of hardware accelerators specifically optimized for the rigors of deep learning training.
Methodology
WHAM employs a two-step "Local-to-Global" search strategy to navigate the massive architectural design space efficiently.
Local Search and Pruning
Instead of random configuration sampling, WHAM uses a Critical-Path-Based Search. It analyzes the DNN's execution graph to identify bottleneck operators. A key heuristic used is Mirror Conflict Resolution (MCR); since the backward pass in training often mirrors the dataflow of the forward pass, MCR adds hardware resources specifically to resolve conflicts on that critical path. To further accelerate the search, WHAM uses a binary tree-based Architecture Configuration Pruner. If a specific core dimension does not yield performance improvements, the entire corresponding branch of the search tree is pruned.
Global Search for Distributed Training
For multi-stage pipelines, WHAM identifies the "top-k" best designs for each stage and performs global optimization. This ensures the entire pipeline is balanced, preventing a single slow stage from bottlenecking the system. The framework supports a tunable architectural template including Tensor Cores (for matrix math), Vector Cores (for point-wise operations), on-chip SRAM, and High Bandwidth Memory (HBM).
Evaluation
WHAM was evaluated across 11 diverse DNN models, including image classification (ResNet-18, Inception_v3), translation (GNMT-4), and large language models (BERT-Large, GPT3-175B). The framework was compared against state-of-the-art search tools (ConfuciuX and Spotlight) and industry standards (TPUv2 and NVDLA).
Key Results and Insights
WHAM demonstrates that accelerators designed solely for inference perform poorly in training because they ignore the memory pressure of stashed activations and the specific compute needs of the backward pass. By exploiting the "Mirror" property of training graphs, WHAM naturally mitigates many backward-pass issues by solving forward-pass resource conflicts.
- Search Efficiency: WHAM converges to an optimal design 31x faster than Spotlight and 174x faster than ConfuciuX.
- Performance Gains: WHAM-generated designs achieved 12x higher throughput than Spotlight for individual models.
- Industry Benchmarking: Optimized for a set of workloads, WHAM’s "common" design yielded 12% better throughput than the hand-optimized Google TPUv2.
- Scalability: In a distributed setting with 64 devices, WHAM provided a 2x throughput improvement over a TPUv2-like setup for training GPT3.
Conclusion
WHAM provides a significant leap in automated hardware design for deep learning training. While current results are promising, future work could extend the framework to account for complex, hierarchical network topologies (e.g., multi-rack clusters) and co-optimize hardware dimensions with dataflow mapping. Additionally, exploring emerging memory technologies like CXL or Processing-In-Memory (PIM) remains an open area for research.
Summary updated