Latency-Optimal and Memory-Aware Model Partitioning for Cooperative Inference at the Edge
摘要
To deploy Deep Neural Networks (DNNs) with heavyweight computation on the IoT devices, a new paradigm, i.e., model partition, has been proposed to allow cooperative inference among IoT devices and edge server while keeping data at local. Unfortunately, to find the optimal partition of the DNN models, the existing works rely on transforming the model partition problem to the Min-Cut problem, which ignores the limited memory resources at the tiny IoT devices. To enable the work more practical and general, we investigate the DNN partition problem with memory constraints in this paper. Firstly, we formulate the minimum latency DNN partition problem with arbitrary memory constraint and prove it to be NP-hard. To address such a problem, we first propose an efficient O(n) algorithm for the model with single chain topology. Then, for the model with multiple chains topology, an optimal dynamic programming based algorithm and an approximate algorithm are proposed. Furthermore, we extend the proposed algorithm for the model composed of any number of Ship Structures, which suits most existing DNN models. Additionally, a branch and bound algorithm is also proposed for the model with any complex DAG topology. Finally, we test the proposed methods through both extensive simulations and experiments on real hardware, which shows that the proposed method outperforms the existing methods, reducing the latency by up to 28.5%.