[论文解读] Fluid Batching: Exit-Aware Preemptive Serving of Early-Exit Neural Networks on Edge NPUs
本文提出Fluid Batching,一种面向边缘NPUs的软硬件协同设计框架,支持对早停神经网络的出口感知、抢先式批处理。通过动态调整批处理策略并利用可堆叠处理单元,该框架在可变且突发的负载下仍实现平均延迟降低1.97倍、SLO满足率提高6.7倍,优于当前最先进系统。
With deep neural networks (DNNs) emerging as the backbone in a multitude of computer vision tasks, their adoption in real-world applications broadens continuously. Given the abundance and omnipresence of smart devices in the consumer landscape, "smart ecosystems'' are being formed where sensing happens concurrently rather than standalone. This is shifting the on-device inference paradigm towards deploying centralised neural processing units (NPUs) at the edge, where multiple devices (e.g. in smart homes or autonomous vehicles) can stream their data for processing with dynamic rates. While this provides enhanced potential for input batching, naive solutions can lead to subpar performance and quality of experience, especially under spiking loads. At the same time, the deployment of dynamic DNNs, comprising stochastic computation graphs (e.g. early-exit (EE) models), introduces a new dimension of dynamic behaviour in such systems. In this work, we propose a novel early-exit-aware scheduling algorithm that allows sample preemption at run time, to account for the dynamicity introduced both by the arrival and early-exiting processes. At the same time, we introduce two novel dimensions to the design space of the NPU hardware architecture, namely Fluid Batching and Stackable Processing Elements, that enable run-time adaptability to different batch sizes and significantly improve the NPU utilisation even at small batches. Our evaluation shows that the proposed system achieves an average 1.97x and 6.7x improvement over state-of-the-art DNN streaming systems in terms of average latency and tail latency service-level objective (SLO) satisfaction, respectively.
研究动机与目标
- 解决在基于边缘的多设备推理工作负载中,维持高NPU利用率的同时满足严格延迟约束的挑战。
- 克服由于DNN中早期退出导致的动态批大小变化所引发的性能下降问题,该问题会降低深层网络的硬件利用率。
- 设计一种支持在不同请求速率和模型动态下高效、运行时自适应批处理与抢占的系统。
- 通过协同设计调度算法与新型硬件原原子如Fluid Batching和可堆叠PE,提升边缘NPUs在流式推理中的效率。
提出的方法
- 提出Fluid Batching:一种硬件级机制,根据每层的瞬时批大小和层特征动态调整批处理策略,实现对各种批大小的高性能支持。
- 设计一种出口与截止时间感知的抢先调度器,支持在中间出口处运行时抢占推理,实现对早期退出样本的重新批处理,以维持硬件利用率。
- 提出可堆叠处理单元(PEs):运行时可重构的PE,其尺寸可动态匹配每层输入张量的大小,从而在小批大小下提升利用率。
- 在调度器中集成精确的延迟估计,以实现良好分摊的抢占,最小化开销与SLO违规。
- 协同设计软件调度器与硬件原原子,确保在动态、实时边缘工作负载中实现端到端的自适应与低延迟响应。
- 在FPGA平台(ZC706、ZCU104)上评估该框架,使用带有早停机制的ResNet-50与Inception-v3主干网络,在不同请求速率与SLO约束下进行测试。
实验结果
研究问题
- RQ1如何在不牺牲延迟或硬件利用率的前提下,使批处理能够适应由DNN中早停引起的动态批大小?
- RQ2需要哪些硬件与调度机制,才能实现实时地在中间出口处高效抢占与重新批处理样本?
- RQ3Fluid Batching与可堆叠PE在不同批大小与工作负载下,能在多大程度上提升NPU利用率与延迟性能?
- RQ4与非抢占或静态批处理方法相比,抢占式、出口感知的调度器是否能有效减少延迟关键型边缘推理系统中的SLO违规?
- RQ5所提出技术在不同DNN架构(包括混合卷积与注意力模块的网络)中的可扩展性如何?
主要发现
- 在相同工作负载下,Fluid Batching相比最先进DNN流式推理系统,平均吞吐量提升1.97倍,SLO满足率提高6.7倍。
- 当SLO设置为合理阈值时,系统在所有测试配置下均实现零SLO违规,而基线方法如AdaptB即使在宽松SLO下也存在显著违规。
- 在ZC706平台上,当批大小超过3时,Fluid Batching在ResNet-50上达到接近峰值性能,优于所有静态批处理策略。
- 在小批大小(包括B=1)下,可堆叠PE显著提升了性能,Fluid Batching与可堆叠PE的联合效应在所有批大小下均实现了卓越的利用率。
- 出口感知的抢先调度器实现了对早期退出样本的高效重新批处理,减少了因动态批大小缩小导致的深层网络子模块硬件利用率不足。
- 即使在突发请求到达场景下,该框架仍保持高性能与低延迟,展现出在真实边缘部署场景中的鲁棒性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。