Peak-Memory Schedules You Can Trust: Exact Realization, Certified Optimality, and the Limits of Recomputation for Inference
Not on the map. Why?
Abstract (arXiv)
Real-time inference on small devices needs low activation memory without extra latency, which makes operator order the most valuable memory lever: it is free in time. We show that the usual way of deploying a better order, handing it back to the compiler and regenerating code, is unreliable. In PyTorch Inductor the regenerated program misses its predicted peak in 22 of 54 CPU configurations. It is worse than the stock program in 9 of them and in 19 of 50 on a GPU, and on the GPU it also changes numerical results. We instead profile the generated program, model its memory exactly from its own statements and their read/write effects, and permute those statements. We prove that this realizes the modeled peak whenever allocation does not depend on history. It does so to the byte, with bitwise-identical results, in all our CPU runs. On the GPU we characterize why the caching allocator breaks the condition. To know when to stop, we give forward and reverse "trap" lower bounds, each computable with O(n2) minimum cuts. They certify the found order optimal for 94% of held-out wrapper graphs and all 16 microcontroller-class models we study, in under a second. So most inference graphs are already scheduled optimally. Branching networks are the exception, where reordering is free and pays, e.g. 10.0% on DeepLabV3. In compiled training we save up to 7.6%. Beyond the certified optimum we study selective recomputation with per-operator caps. It is strongly NP-hard for every fixed cap even at treewidth two, encodes knapsack exactly on series-parallel graphs, and is solvable exactly on bounded treewidth. It is useless on public tiny models whose peak is a single layer, but on architectures that hold a cheap value for a late reuse it pays: on the public ReDimNet speaker networks, whose order is already optimal, it lowers the peak by 5.2-6.1% at under 0.4% extra MACs, with bitwise-identical outputs.
Key facts. No citing papers in the map yet (data through 26 Nov 2026). Builds on 18 of its 43 references that are in the map. Submitted 16 Oct 2026.
Builds on
18 of 43 references.
References · 18
- 2016Training Deep Nets with Sublinear Memory Costcited by 924
- 2020TensorFlow Lite Micro: Embedded Machine Learning on TinyML Systemscited by 184
- 2021MLPerf Tiny Benchmarkcited by 138
- 2017Hello Edge: Keyword Spotting on Microcontrollerscited by 118
- 2021MCUNetV2: Memory-Efficient Patch-based Inference for Tiny Deep Learningcited by 97
- 2019Checkmate: Breaking the Memory Wall with Optimal Tensor Rematerializationcited by 96
- 2019Temporal Convolution for Real-time Keyword Spotting on Mobile Devicescited by 55
- 2020Dynamic Tensor Rematerializationcited by 52
- 2024Reshape Dimensions Network for Speaker Recognitioncited by 49
- 2020Ordering Chaos: Memory-Aware Scheduling of Irregularly Wired Neural Networks for Edge Devicescited by 28
- 2019Optimal checkpointing for heterogeneous chains: how to train deep neural networks with limited memorycited by 23
- 2023Rockmate: an Efficient, Fast, Automatic and Generic Tool for Re-materialization in PyTorchcited by 5
6 more
- 2014A Hybrid LP-RPG Heuristic for Modelling Numeric Resource Flows in Planningcited by 3
- 2023Memory-aware Scheduling for Complex Wired Networks with Iterative Graph Optimizationcited by 3
- 2014On Characterizing the Data Movement Complexity of Computational DAGs for Parallel Executioncited by 1
- 2019Typical Sequences Revisited --- Computing Width Parameters of Graphscited by 1
- 2023Moccasin: Efficient Tensor Rematerialization for Neural Networkscited by 1
- 2023New Tools for Peak Memory Schedulingcited by 1
Built on by
Not cited yet.