arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.21048cs.PFcs.DCcs.LG
收藏

xMem:一种基于CPU的深度学习训练工作负载GPU内存精确估计方法

xMem: A CPU-Based Approach for Accurate Estimation of GPU Memory in Deep Learning Training Workloads

University of Glasgow(格拉斯哥大学)

Jiabo Shi, Dimitrios Pezaros, Yehia Elkhatib

AI总结:

xMem提出一种仅基于CPU动态分析的框架,用于先验精确估计深度学习训练峰值GPU内存,相比现有方案将中位相对误差降低91%,并提升内存节省潜力368%。

摘要:

全球GPU的稀缺性使得在共享集群环境中对深度学习作业采取更复杂的策略成为必要。准确估计作业将需要多少GPU内存,是实现高级调度和GPU共享的基础,这有助于防止内存不足(OOM)错误和资源利用不足。然而,现有的估计方法存在局限性。依赖静态分析或基于机器学习的历史数据的方法,往往无法准确捕捉运行时动态。此外,直接进行GPU分析会消耗稀缺资源,且某些技术需要侵入性的代码修改。因此,关键挑战在于在不消耗GPU资源且不进行侵入性代码修改的情况下,精确估计动态内存需求,包括内存分配器的细微差别。为应对这一挑战,我们提出了xMem,一种新颖的框架,利用仅基于CPU的动态分析来先验地准确估计峰值GPU内存需求。我们使用来自25个不同模型(包括卷积神经网络和Transformer等架构)的工作负载,对xMem与最先进的解决方案进行了全面评估。对5209次运行的分析(包括ANOVA和Monte Carlo结果)突显了xMem的优势:它将中位相对误差降低了91%,并将估计失败作为安全OOM阈值的概率显著降低了75%,这意味着估计值通常可以直接使用而不会导致OOM。最终,这些改进使得内存节省潜力相比现有解决方案提高了368%。

英文摘要:

The global scarcity of GPUs necessitates more sophisticated strategies for Deep Learning jobs in shared cluster environments. Accurate estimation of how much GPU memory a job will require is fundamental to enabling advanced scheduling and GPU sharing, which helps prevent out-of-memory (OOM) errors and resource underutilization. However, existing estimation methods have limitations. Approaches relying on static analysis or historical data with machine learning often fail to accurately capture runtime dynamics. Furthermore, direct GPU analysis consumes scarce resources, and some techniques require intrusive code modifications. Thus, the key challenge lies in precisely estimating dynamic memory requirements, including memory allocator nuances, without consuming GPU resources and non-intrusive code changes. To address this challenge, we propose xMem, a novel framework that leverages CPU-only dynamic analysis to accurately estimate peak GPU memory requirements a priori. We conducted a thorough evaluation of xMem against state-of-the-art solutions using workloads from 25 different models, including architectures like Convolutional Neural Networks and Transformers. The analysis of 5209 runs, which includes ANOVA and Monte Carlo results, highlights xMem's benefits: it decreases the median relative error by 91% and significantly reduces the probability of estimation failure as safe OOM thresholds by 75%, meaning that the estimated value can often be used directly without causing OOM. Ultimately, these improvements lead to a 368% increase in memory conservation potential over current solutions.

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

↑