Runtime DNN performance scaling through resource management on heterogeneous embedded platforms

Xun Lei, Bashir M. Al‐Hashimi, Jonathon Hare, Geoff V. MerrettePrints 2021

Abstract

DNN inference is increasingly being executed locally on embedded platforms, due to the clear advantages in latency, privacy and connectivity. Modern SoCs typically execute a combination of different and dynamic workloads concurrently, it is challenging to consistently meet latency/energy budgets because the local computing resources available to the DNN vary considerably. In this poster, we show how resource management can be applied to optimise the performance of DNN workloads by monitoring and tuning both software and hardware constantly at runtime. This work shows how dynamic DNNs trade-off accuracy with latency/energy/power on heterogeneous embedded CPU-GPU platform.

Introduction

In a perfect world, an engineer optimizes a Deep Neural Network (DNN) for a specific chip, and it runs flawlessly. In the real world, embedded systems—such as smartphones or smart cameras—operate in highly dynamic environments. A background application might suddenly consume CPU cycles, or the device might overheat, forcing the system to throttle its clock speed to manage thermals.

When these "resource shifts" occur, a static, pre-compressed DNN often fails to meet its objectives. It might suddenly take twice as long to process an image, missing critical real-time deadlines or rapidly draining the battery. This research addresses these challenges by moving away from static models toward a system that can "dial" its complexity and hardware usage up or down on the fly to meet specific latency, energy, or power budgets.

Methodology

The researchers propose a holistic approach that manages both software and hardware simultaneously through three primary "knobs":

  1. Dynamic DNNs: Instead of one fixed model, the system uses architectures that can be executed partially. By employing techniques like incremental training and group convolution pruning (referencing frameworks like "Once-for-All"), they create a single model containing multiple "subnetworks" (e.g., 25%, 50%, 75%, and 100% of the full model's capacity).
A 50% subnetwork configuration where only groups G1 and G2 are active.
  1. Hardware Resource Management: The system leverages Dynamic Voltage and Frequency Scaling (DVFS) to tune the clock speeds of the CPU and GPU in real-time.
  2. Heterogeneous Execution: The system evaluates whether it is more efficient to run a specific subnetwork on a high-performance CPU core (like the Cortex-A15), an energy-efficient core (Cortex-A7), or the GPU.
Comparison between a 75% model (G1-G3 active) and a full 100% model (G1-G4 active).

By combining these knobs—subnetwork size, processor type, and frequency—the system creates a massive library of "operating points" to choose from at runtime based on current environmental constraints.

Key Insights and Ideas

  • The CPU Power Paradox: A significant finding is the difference in how CPUs and GPUs consume power when running dynamic models. On a single-core CPU, using a smaller subnetwork reduces latency (it finishes faster), but it doesn't significantly change the instantaneous power consumption because the computational intensity remains the same while the core is active.
  • GPU Scaling: In contrast, the GPU's power consumption scales directly with the size of the dynamic DNN. Smaller subnetworks lead to lower power draws on the GPU, providing a unique lever for meeting strict power (Wattage) targets that the CPU cannot match.
  • Context-Dependent Optimization: The "best" configuration is entirely dependent on the current goal. For example, on an Odroid XU3, if the requirement is to stay under 100mJ of energy and 400ms of latency, one specific subnetwork/frequency combo is optimal. If the requirement shifts to 200mJ and 200ms, a completely different configuration becomes the Pareto-optimal choice.

Experimental Results

The researchers demonstrated their approach on two popular embedded platforms: the Odroid XU3 (a mobile-class SoC) and the NVIDIA Jetson Nano (an AI-at-the-edge platform).

  • Latency Stability: The authors showed that when a background application is introduced, a standard DNN's latency spikes past the required threshold. By switching to a smaller subnetwork or increasing frequency, their system brings the latency back within the required bounds.
  • Trade-off Mapping: The team mapped out hundreds of operating points. On the Jetson Nano, they demonstrated a clear Pareto front where users can trade off execution time (from ~5ms to 80ms) against energy consumption (from ~2mJ to 45mJ per image) simply by switching subnetworks and hardware settings.

Conclusion and Future Work

While the presentation highlights the potential of these trade-offs, several areas remain for further exploration. The controller overhead must be minimal to avoid consuming the energy it is intended to save. Additionally, quantifying "transition costs"—the latency penalty when changing hardware frequencies or swapping model weights in memory—is vital for high-speed applications. Future work involves creating an automated runtime governor that can predict resource availability and preemptively switch modes before a latency violation occurs.

Summary updated

BibTeX
@inproceedings{lei2021runtime,
  author = {Xun Lei and Bashir M. Al‐Hashimi and Jonathon Hare and Geoff V. Merrett},
  title = {{Runtime DNN performance scaling through resource management on heterogeneous embedded platforms}},
  booktitle = {ePrints},
  year = {2021},
}
Figure