Abstract
Deploying deep neural networks (DNNs) on edge hardware like Google's Edge TPU is often constrained by limited on-chip memory, necessitating model pipelining across multiple devices. Traditional partitioning methods rely on slow, hardware-in-the-loop profiling, which can take hours and frequently fails for complex models. This paper introduces a novel approach using a Graphormer-based latency predictor to estimate DNN segment execution times rapidly. By replacing physical profiling with high-accuracy predictions, the proposed partitioners—PredPar and Pred-ProfPar—achieve up to a 98% reduction in partitioning time while maintaining a 100% success rate and performance within 1% of profiling-based methods.
Introduction
In mission-critical edge environments, such as disaster response or remote security, AI models must run locally without cloud support. Google’s Edge TPU is a popular choice for these applications due to its efficiency, but it faces a significant constraint: a small 8MB on-chip SRAM. When a model’s weights exceed this capacity, the system must fetch data from slower external DRAM, severely impacting performance.
To address this, researchers use "pipelining," splitting a single DNN into segments that run across multiple Edge TPUs. However, finding the optimal split points is computationally expensive. Existing tools like ProfPar utilize a binary search that physically compiles and runs every candidate partition on real hardware. This process is not only slow but also prone to crashes when handling large, complex networks. This paper proposes a prediction-based alternative to streamline this deployment phase.
Methodology
The core innovation of this work is a Graphormer-based Prediction Model. Instead of executing code on physical chips during the search process, the authors treat the DNN as a Directed Acyclic Graph (DAG) and process it through a specialized Transformer architecture.
Feature Engineering and Training
The model incorporates several critical features to ensure accurate latency estimation:
- Node Features: It considers operation types, "in-degree" (connectivity), and output tensor shapes.
- Memory Awareness: Crucially, the model accounts for the size of intermediate tensors that must be moved between TPUs via DRAM, a major source of overhead.
- Dataset: The researchers utilized NASBench-101, sampling 600 models to generate 416,000 unique DNN segments. Latency labels were collected using an ASUS AI Accelerator card with 8 Edge TPUs.
Partitioning Algorithms
The authors introduced two new partitioning strategies that leverage the latency predictor within a refined binary search framework. This framework includes a "relaxing factor" to prevent the algorithm from overshooting optimal solutions when target latencies are set aggressively low.
- PredPar: This method relies entirely on the Transformer's predictions to find the best split, making it the fastest deployment option.
- Pred-ProfPar: A hybrid approach that uses the predictor to narrow down the search space to the most promising candidates, followed by a single final hardware profile to ensure maximum accuracy.
Key Results and Insights
The study highlights that compilation is the primary bottleneck in edge deployment, often taking 10x longer than the actual inference. By using a predictor, the authors bypass the compilation step for thousands of candidate partitions.
- Massive Speedup: PredPar reduced partitioning time by 98.86% compared to the state-of-the-art ProfPar.
- Superior Robustness: While ProfPar failed to find valid partitions for 95% of the largest models on 8 TPUs, the prediction-based methods achieved a 100% success rate.
- High Accuracy: Inference times on the Edge TPU were found to be remarkably stable (std dev of 0.015ms). Consequently, the hybrid Pred-ProfPar achieved bottleneck latencies within 1% of physical profiling methods.
Conclusion
This work demonstrates that performance prediction can effectively replace hardware-in-the-loop profiling for DNN partitioning on edge devices. While the current model is optimized for CNNs on PCIe-based Edge TPUs, future research will focus on generalizing the approach to Transformer architectures and different hardware interfaces, such as USB-based accelerators.
Summary updated