arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2301.12865cs.LGcs.SYeess.SY
收藏

基于SMDP的动态批处理用于GPU平台上的高效推理

SMDP-Based Dynamic Batching for Efficient Inference on GPU-Based Platforms

Beijing National Research Center for Information Science and Technology(北京信息科学与技术国家研究中心);Tsinghua University(清华大学)

Yaodan Xu, Jingzhou Sun, Sheng Zhou, Zhisheng Niu

AI总结:

本文提出基于半马尔可夫决策过程的动态批处理策略,平衡GPU推理服务的效率与延迟,通过离散化求解最优策略,显著降低复杂度并优于基准方法。

摘要:

在云或边缘计算平台上的最新机器学习(ML)应用中,批处理是一种在大规模下提供高效且经济服务的重要技术。特别是,平台上的并行计算资源(如图形处理单元(GPU))在较大批处理规模下具有更高的计算和能源效率。然而,较大的批处理规模也可能导致更长的响应时间,因此需要明智的设计。本文旨在提供一种动态批处理策略,以在效率和延迟之间取得平衡。基于GPU的推理服务被建模为具有批处理规模相关处理时间的批处理服务队列。然后,动态批处理的设计是一个连续时间平均成本问题,并被表述为半马尔可夫决策过程(SMDP),其目标是最小化平均响应时间和平均功耗的加权和。通过求解具有有限状态近似和“离散化”的关联离散时间马尔可夫决策过程(MDP)问题来获得最优策略。通过引入抽象成本来反映“尾部”状态的影响,该过程的空间复杂度和时间复杂度可分别降低63.5%和98%。我们的结果表明,最优策略可能具有控制极限结构。数值结果还表明,基于SMDP的批处理策略能够适应不同的流量强度,并优于其他基准策略。此外,所提出的解决方案在平衡功耗和延迟方面具有显著的灵活性。

英文摘要:

In up-to-date machine learning (ML) applications on cloud or edge computing platforms, batching is an important technique for providing efficient and economical services at scale. In particular, parallel computing resources on the platforms, such as graphics processing units (GPUs), have higher computational and energy efficiency with larger batch sizes. However, larger batch sizes may also result in longer response time, and thus it requires a judicious design. This paper aims to provide a dynamic batching policy that strikes a balance between efficiency and latency. The GPU-based inference service is modeled as a batch service queue with batch-size dependent processing time. Then, the design of dynamic batching is a continuous-time average-cost problem, and is formulated as a semi-Markov decision process (SMDP) with the objective of minimizing the weighted sum of average response time and average power consumption. The optimal policy is acquired by solving an associated discrete-time Markov decision process (MDP) problem with finite state approximation and "discretization". By introducing an abstract cost to reflect the impact of "tail" states, the space complexity and the time complexity of the procedure can decrease by 63.5% and 98%, respectively. Our results show that the optimal policies potentially possess a control limit structure. Numerical results also show that SMDP-based batching policies can adapt to different traffic intensities and outperform other benchmark policies. Furthermore, the proposed solution has notable flexibility in balancing power consumption and latency.

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

↑