SlackSwap: Bandwidth-Aware Activation Swapping and Recomputation for Memory-Efficient DNN Training
Abstract
Swapping saved activations to host memory once enabled GPUs to train models that exceeded their device-memory capacity when compute throughput and host-link bandwidth were roughly balanced. For example, on a 2015 Titan X, PCIe bandwidth was sufficient to offload all VGG-16 activations during the forward pass. This balance no longer holds. From the Titan X to the H100, peak training throughput increased by 141x, whereas host-link bandwidth improved by only 3.9x. On an A100, the host link can hide transfers for only 11-38% of the activations in the transformer models we study. Existing swapping approaches, such as vDNN, SuperNeurons, and SwapAdvisor, offload tensors according to memory requirements without explicitly respecting the available link-time budget, resulting in transfer-induced stalls; block checkpointing, in contrast, leaves the host link underutilized. We present SlackSwap, which treats host-link time as an explicit resource budget. Using a single profiled iteration, SlackSwap allocates the forward-pass link budget to tensors that are most expensive to recompute, resolves the remaining memory deficit by recomputing the least expensive tensors, and schedules FIFO offloads and earliest-deadline-first prefetches without per-layer synchronization barriers. In trace-driven simulations of BERT-Large, GPT-2 XL, and a Llama-7B-style model on an A100, SlackSwap retains 96-100% of unlimited-memory GPU throughput while using half the activation memory, achieving 1.10-1.11x the throughput of the best baseline. Its plans are within 0.5% of a genetic search over 6,600-14,000 candidate plans, while requiring less than 0.4 seconds to generate.
Create a lesson
Related papers
TrimSO(2): Fast and Memory-Efficient Training of Equivariant Interatomic Potentials
Shared title terminologycs.DCChen Wang, Yuanchang Zhou, Guangming Tan et al.
Memory-Efficient Expert Routing for Distributed MoE Training
Shared title terminologycs.DCArnab Kanti Tarafder, Jaume Guasch-Martí, Gokcen Kestor et al.
BaGuaLu-2: Taming Dynamic Memory Fluctuation for Efficient MoE Model Training over 10,000 GPUs
Shared title terminologycs.DCMingshu Zhai, Minkun Guo, Hongrui Lian et al.
Fast and Memory Efficient Offload Training Framework with Hybrid XPU Computation
Shared title terminologycs.DCZhiyi Yao, Zuning Liang, Yuedong Xu et al.
Activation-Aware Balancing of Fused CPU and GPU Expert Execution for Offline MoE Inference
Shared title terminologycs.DCBorui Xu, Weihao Cui, Yao Chen et al.
Memory-Aware Scheduling of Large Task Graphs
Shared title terminologycs.DCIoannis Lamprou, Panagiotis Xanthopoulos, Etienne Filhol et al.