Horizontally Fused Training Array: An Effective Hardware Utilization Squeezer for Training Novel Deep Learning Models

Shang Wang, Peiming Yang, Yuxuan Zheng, Xin Li, Gennady Pekhimenko

TL;DR

The Horizontally Fused Training Array (HFTA) is a new library that significantly slashes the cost of deep learning research by "fusing" multiple repetitive training jobs—like those used for hyperparameter tuning—into a single, high-throughput job. By mathematically merging operators across different models to run simultaneously on one accelerator, HFTA achieves up to a 15.1× increase in training throughput compared to standard serial execution.

What Problem Does This Paper Address?

Deep learning (DL) is notoriously expensive, requiring massive amounts of compute. While much research focuses on scaling up massive models across thousands of GPUs, the authors discovered a different bottleneck: the "long tail" of small, repetitive jobs.

After analyzing two months of usage data from a top research institute, the authors found that repetitive single-accelerator jobs (used for hyperparameter tuning, stability tests, and architecture searches) accounted for 46.2% of total cluster usage. Surprisingly, these jobs are incredibly inefficient, often utilizing only a fraction of a modern GPU’s or TPU’s actual processing power.

Existing hardware-sharing solutions like NVIDIA’s MPS (Multi-Process Service) or MIG (Multi-Instance GPU) help, but they have major drawbacks. They run jobs as separate processes, which duplicates memory overhead and introduces significant runtime overhead for every kernel launch. HFTA aims to solve this by moving the "sharing" logic directly into the DL framework itself.

Methods

The core innovation is inter-model horizontal fusion. The authors observed that repetitive jobs usually run the same model architecture with different parameters (like learning rates).

Instead of running these as separate processes, HFTA fuses the operators of these models together. For example, multiple independent Conv2d layers from different jobs are mathematically merged into a single Grouped Convolution operator.

Figure 1. An example showing the key idea of HFTA where two training jobs for hyper-parameter tuning are fused into one via inter-model horizontal operator fusion.

This approach is powerful because:

  1. Mathematical Equivalence: The fusion doesn't change the math; it just changes how the hardware executes it. This means there is zero impact on model convergence or accuracy.
  2. Framework Native: It leverages existing, highly-optimized kernels (like grouped convolutions) already present in libraries like cuDNN and XLA.
  3. Low Overhead: Because it runs as a single process, it avoids the memory and kernel-launch overhead that plagues MPS and MIG.

The authors implemented HFTA as a library for PyTorch, allowing researchers to enable it by changing just a few lines of code to swap standard operators for HFTA-fused versions.

Datasets

The authors evaluated HFTA across six diverse DL models and several standard datasets:

  • PointNet: Used for 3D object classification and segmentation on the ShapeNet dataset.
  • DCGAN: A generative model trained on the LSUN dataset.
  • ResNet-18 & MobileNetV3-Large: Image classification models trained on CIFAR-10.
  • Transformer & BERT-Medium: Language models trained on WikiText-2.

Key Insights and Ideas

  • The "Repetitive Job" Dominance: The discovery that nearly half of a major research cluster's resources are spent on repetitive, low-utilization jobs highlights a massive opportunity for optimization that the systems community has largely overlooked.
  • Fusion is Better than Partitioning: While hardware partitioning (MIG) or time-slicing (MPS) are the industry standards, HFTA proves that framework-level operator fusion is far more efficient for this specific class of workloads.
  • Memory Efficiency: By avoiding process duplication, HFTA can fit significantly more models on a single GPU—up to 7.57× more than MPS in some cases.
  • Generality: Because the fusion relies on mathematical properties rather than specific hardware hacks, it works seamlessly across different architectures, including both NVIDIA GPUs (Volta, Turing, Ampere) and Google TPUs.

Key Results

HFTA delivers dramatic performance improvements across the board:

  • Throughput: On GPUs (V100, RTX6000, A100), HFTA achieved 2.42× to 11.50× higher throughput than serial execution. On TPUs, the gains were even higher, reaching up to 15.13×.
  • Comparison to Baselines: HFTA consistently outperformed hardware-based sharing, beating MPS by up to 4.50× and MIG by up to 4.88× in peak throughput.
  • End-to-End Savings: When integrated into a hyperparameter tuning workflow (HFHT), HFTA reduced the total GPU hours required by up to 5.10×.
  • Utilization: Hardware profiling showed that HFTA significantly increases both temporal (SM active) and spatial (SM occupancy) utilization of the GPU, effectively "squeezing" the hardware for all it's worth.

Limitations and Future Work

While HFTA is highly effective, the authors note a few areas for growth:

  • Operator Coverage: HFTA currently supports 17 common PyTorch operators. While this covers many SOTA models, expanding this library is necessary for broader adoption.
  • Tuning Algorithm Compatibility: Some hyperparameter tuning algorithms, like Hyperband, are less "HFTA-friendly" because they quickly discard many configurations, leaving fewer models to fuse in later stages. The authors suggest that future work could involve designing "fusion-aware" tuning algorithms.
  • TPU Profiling: The authors noted lower-than-expected gains on certain TPU tasks (like PointNet segmentation) and cited the need for better profiling tools for PyTorch/XLA to diagnose these bottlenecks.

Summary updated

Abstract

Driven by the tremendous effort in researching novel deep learning (DL) algorithms, the training cost of developing new models increases staggeringly in recent years. We analyze GPU cluster usage statistics from a top research institute for more insights into the hardware efficiency achieved by typical DL training jobs. Our study reveals that single-accelerator training jobs can dominate the cluster-wide resource consumption when launched repetitively (e.g., for hyper-parameter tuning) while severely under-utilizing the hardware. Fortunately, we observe that such workloads have the following unique characteristics: (i) the models among jobs often have the same types of operators with the same shapes, and (ii) the inter-model horizontal fusion of such operators is mathematically equivalent to other already well-optimized operators. Thus, to help DL researchers and practitioners effectively improve the hardware utilization of their novel DL training workloads, we propose Horizontally Fused Training Array (HFTA). HFTA is a new DL framework extension library that horizontally fuses the models from different repetitive jobs deeply down to operators and then trains them simultaneously on a shared accelerator. To show the generality of our solution, we apply HFTA to six DL models training on state-of-the-art accelerators (GPUs and TPUs). Our results indicate that HFTA is highly effective in improving hardware utilization and achieves up to $15.1 \times$ higher training throughput vs. the standard practice of running each job on a separate accelerator.
BibTeX
@misc{wang2021horizontally,
  author = {Shang Wang and Peiming Yang and Yuxuan Zheng and Xin Li and Gennady Pekhimenko},
  title = {{Horizontally Fused Training Array: An Effective Hardware Utilization Squeezer for Training Novel Deep Learning Models}},
  year = {2021},
  eprint = {2102.02344},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2102.02344},
}
Figure