Abstract
Deploying state-of-the-art Deep Neural Networks (DNNs) on edge devices is frequently constrained by limited hardware resources, particularly RAM. While model compression is a common strategy, the execution schedule—the order in which operations are performed—significantly impacts the peak memory footprint. This paper presents a novel framework for memory-aware scheduling that utilizes iterative graph optimization and Integer Linear Programming (ILP). By simplifying complex computation graphs through provably optimal fusion and employing topology-aware variable pruning, the framework reduces peak memory footprints by an average of 13.4% and achieves massive speedups in scheduling time, transforming tasks that previously took hours into sub-second operations.
1. Introduction
Edge computing environments, such as microcontrollers and mobile system-on-chips, operate under stringent memory constraints. In these environments, the peak memory footprint—defined as the maximum memory required at any single point during execution—is the primary bottleneck for running sophisticated DNNs. Standard deep learning compilers typically rely on simple topological sorting (e.g., Reverse Post-Order) to determine execution sequences. However, these methods often ignore memory efficiency, leading to sub-optimal resource utilization.
Modern architectures, particularly those generated by Neural Architecture Search (NAS) or multi-scale networks like HRNet, feature "wired" structures with irregular, parallel branches. These complex topologies pose a significant challenge for existing memory-aware schedulers, which often suffer from poor scalability or fail to find optimal solutions within reasonable timeframes.
2. Methodology
The proposed framework addresses these challenges through a three-stage pipeline designed to optimize the computation graph before and during the scheduling process.
2.1 Iterative Graph Fusion
The first stage simplifies the computation graph by identifying and merging "isolated sub-graphs" into single "hyper-nodes." The authors provide a theoretical proof that if these sub-graphs satisfy specific monotonicity conditions, fusing them does not sacrifice the optimality of the final memory schedule. This iterative process can reduce the number of operators to be scheduled by up to 6x, making the subsequent optimization steps significantly more manageable.
2.2 Topology-Aware ILP Scheduling
To determine the optimal execution order for the simplified graph, the framework employs Integer Linear Programming (ILP). To overcome the combinatorial explosion typical of complex graphs, the authors introduce Variable Pruning. By analyzing the graph's topology, the system pre-calculates the valid execution windows for each operator (based on ancestry and descendant relationships). This allows the solver to replace a large portion of ILP variables with constants, drastically reducing the search space and accelerating the solving process.
2.3 Memory-Aware Graph Partitioning
For exceptionally large networks where global ILP remains computationally expensive, the framework utilizes a "divide and conquer" strategy. The graph is partitioned into smaller segments. The framework identifies "hot zones"—areas where peak memory usage is most likely to occur—and applies rigorous ILP optimization to these zones, while using faster heuristics for less critical sections of the graph.
3. Evaluation and Results
The framework was benchmarked against several complex architectures, including NASNet-A, AmoebaNet-A, Darts, Randwire, and HRNet (W18 and W32). It was compared against standard Reverse Post-Order (RPO) scheduling and state-of-the-art schedulers such as SERENITY and HMCOS.
3.1 Memory Efficiency
The proposed method achieved an average 13.4% reduction in peak memory footprint compared to standard topological scheduling. The most significant gains were observed in AmoebaNet-A, which saw a 26.4% reduction. These savings are critical for enabling the deployment of larger models on memory-constrained hardware.
3.2 Computational Scalability
The framework demonstrated a massive improvement in scheduling speed. For HRNet-W18, a network that caused previous state-of-the-art methods (HMCOS) to exceed a 10-hour timeout (30,000+ seconds), the proposed framework found the optimal schedule in less than one second. This efficiency is attributed to the combination of graph fusion and topology-aware pruning.
4. Conclusion and Future Work
This research demonstrates that iterative graph optimization and pruned ILP can effectively solve the memory-aware scheduling problem for complex, wired DNNs. While the graph partitioning used for massive networks is heuristic-based and may introduce minor sub-optimality (typically less than 1%), the overall framework provides a scalable and highly effective solution for edge deployment. Future work may explore extending these techniques to multi-device environments and integrating the framework into mainstream compilers like TVM or TensorFlow to provide automated memory optimization for the broader developer community.
Summary updated