[Paper Review] Fluid Batching: Exit-Aware Preemptive Serving of Early-Exit Neural Networks on Edge NPUs
This paper proposes Fluid Batching, a hardware-software co-design framework for edge NPUs that enables exit-aware, preemptive batching of early-exit neural networks. By dynamically adapting batching strategies and using stackable processing elements, it achieves 1.97× lower average latency and 6.7× higher SLO satisfaction than state-of-the-art systems, even under variable and spiky workloads.
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.
Motivation & Objective
- Address the challenge of maintaining high NPU utilization while meeting strict latency constraints in edge-based, multi-device inference workloads.
- Overcome the performance degradation caused by dynamic batch sizes due to early exits in DNNs, which reduce hardware utilization in deeper layers.
- Design a system that supports efficient, run-time adaptive batching and preemption across varying request rates and model dynamics.
- Improve the efficiency of edge NPUs for streaming inference by co-designing scheduling algorithms with novel hardware primitives like Fluid Batching and Stackable PEs.
Proposed method
- Introduce Fluid Batching: a hardware-level mechanism that dynamically adjusts batching strategies per layer based on instantaneous batch size and layer characteristics, enabling high performance across diverse batch sizes.
- Design an exit- and deadline-aware preemptive scheduler that allows runtime preemption of inference at intermediate exits, enabling re-batching of early-exiting samples to maintain hardware utilization.
- Propose Stackable Processing Elements (PEs): run-time reconfigurable PEs that adapt their dimensions to match the input tensor size of each layer, improving utilization at small batch sizes.
- Integrate accurate latency estimation into the scheduler to enable well-amortized preemptions, minimizing overhead and SLO violations.
- Co-design the software scheduler with hardware primitives to ensure end-to-end adaptability and low-latency response in dynamic, real-time edge workloads.
- Evaluate the framework on FPGA platforms (ZC706, ZCU104) using ResNet-50 and Inception-v3 backbones with early exits, under varying request rates and SLO constraints.
Experimental results
Research questions
- RQ1How can batching be made adaptive to dynamic batch sizes caused by early exits in DNNs without sacrificing latency or hardware utilization?
- RQ2What hardware and scheduling mechanisms are required to enable efficient preemption and re-batching of samples at intermediate exits in real time?
- RQ3To what extent can Fluid Batching and Stackable PEs improve NPU utilization and latency performance across varying batch sizes and workloads?
- RQ4Can a preemptive, exit-aware scheduler reduce SLO violations in latency-critical edge inference systems compared to non-preemptive or static batching approaches?
- RQ5How do the proposed techniques scale across different DNN architectures, including those with mixed convolutional and attention components?
Key findings
- Fluid Batching achieves an average 1.97× improvement in throughput and 6.7× higher SLO satisfaction compared to state-of-the-art DNN streaming systems under the same workload.
- The system achieves zero SLO violations across all tested configurations when the SLO is set to a reasonable threshold, while baseline methods like AdaptB suffer significant violations even at relaxed SLOs.
- Fluid Batching converges to near-peak performance on the ZC706 platform for ResNet-50 when batch size exceeds 3, outperforming all static batching strategies.
- Stackable PEs provide a significant performance boost at small batch sizes (including B=1), with the combined effect of Fluid Batching and Stackable PEs enabling superior utilization across all batch sizes.
- The exit-aware preemptive scheduler enables efficient re-batching of early-exiting samples, reducing hardware underutilization in deeper network subnets caused by dynamic batch shrinkage.
- The framework maintains high performance and low latency even under spiky request arrivals, demonstrating robustness in real-world edge deployment scenarios.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.