arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2610.13003cs.DC
收藏

SlackSwap:面向内存高效DNN训练的带宽感知激活交换与重计算

SlackSwap: Bandwidth-Aware Activation Swapping and Recomputation for Memory-Efficient DNN Training

University of California Merced(加州大学默塞德分校);University of Texas at Austin(德克萨斯大学奥斯汀分校)

Hui Feng, Xun Zhou, Yuxin Wang

AI总结:

SlackSwap将主机链路时间作为显式资源预算,通过分配链路预算、重计算低成本张量等策略,在A100上以半激活内存实现96%-100%无限内存GPU吞吐量,优于现有基线。

摘要:

将保存的激活值交换到主机内存曾使GPU能够训练超出其设备内存容量的模型,当时计算吞吐量与主机链路带宽大致平衡。例如,在2015年的Titan X上,PCIe带宽足以在正向传播期间卸载所有VGG-16的激活值。但这种平衡已不复存在:从Titan X到H100,峰值训练吞吐量提升了141倍,而主机链路带宽仅提升了3.9倍;在A100上,主机链路仅能隐藏我们研究的Transformer模型中11%-38%激活值的传输。现有交换方法(如vDNN、SuperNeurons、SwapAdvisor)根据内存需求卸载张量,未明确考虑可用的链路时间预算,导致传输引发的停顿;而块检查点则会造成主机链路利用率不足。我们提出SlackSwap,将主机链路时间视为显式资源预算:通过一次已分析的迭代,将正向传播的链路预算分配给重计算成本最高的张量,通过重计算成本最低的张量解决剩余内存缺口,并采用FIFO卸载和最早截止时间优先预取,无需每层同步屏障。在A100上对BERT-Large、GPT-2 XL和Llama-7B风格模型的轨迹驱动模拟中,SlackSwap在使用一半激活内存的同时,保留了无限内存GPU吞吐量的96%-100%,达到最佳基线吞吐量的1.10-1.11倍;其规划与6600-14000个候选规划的遗传搜索结果偏差在0.5%以内,且生成时间不足0.4秒。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑