Memory Planning for Deep Neural Networks
Not on the map. Why?
Abstract (arXiv)
We study memory allocation patterns in DNNs during inference, in the context of large-scale systems. We observe that such memory allocation patterns, in the context of multi-threading, are subject to high latencies, due to textttmutex contention in the system memory allocator. Latencies incurred due to such textttmutex contention produce undesirable bottlenecks in user-facing services. Thus, we propose a "memorization" based technique, textttMemoMalloc, for optimizing overall latency, with only moderate increases in peak memory usage. Specifically, our technique consists of a runtime component, which captures all allocations and uniquely associates them with their high-level source operation, and a static analysis component, which constructs an efficient allocation "plan". We present an implementation of textttMemoMalloc in the PyTorch deep learning framework and evaluate memory consumption and execution performance on a wide range of DNN architectures. We find that textttMemoMalloc outperforms state-of-the-art general purpose memory allocators, with respect to DNN inference latency, by as much as 40%.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 38 of its 67 references that are in the map. First posted on arXiv 23 Feb 2022.
Builds on
38 of 67 references.
References · 38
- 2017Attention Is All You Needcited by 59,932
- 2015Deep Residual Learning for Image Recognitioncited by 51,809
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2014Very Deep Convolutional Networks for Large-Scale Image Recognitioncited by 15,267
- 2017Mask R-CNNcited by 7,259
- 2015Rethinking the Inception Architecture for Computer Visioncited by 5,451
- 2014Fully Convolutional Networks for Semantic Segmentationcited by 4,845
- 2017MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applicationscited by 3,827
- 2017Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layercited by 3,413
- 2016DeepLab: Semantic Image Segmentation with Deep Convolutional Nets, Atrous Convolution, and Fully Connected CRFscited by 3,239
- 2015SSD: Single Shot MultiBox Detectorcited by 3,125
26 more
- 2016Wide Residual Networkscited by 3,057
- 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsitycited by 3,014
- 2016Aggregated Residual Transformations for Deep Neural Networkscited by 2,540
- 2017Rethinking Atrous Convolution for Semantic Image Segmentationcited by 2,154
- 2015Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networkscited by 2,048
- 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,829
- 2016SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model sizecited by 1,054
- 2018MnasNet: Platform-Aware Neural Architecture Search for Mobilecited by 937
- 2018Object Detection with Deep Learning: A Reviewcited by 524
- 2015Deep Speech 2: End-to-End Speech Recognition in English and Mandarincited by 449
- 2018Fundamentals of Recurrent Neural Network (RNN) and Long Short-Term Memory (LSTM) Networkcited by 415
- 2015Quantized Convolutional Neural Networks for Mobile Devicescited by 212
- 2015MXNet: A Flexible and Efficient Machine Learning Library for Heterogeneous Distributed Systemscited by 195
- 2018Glow: Graph Lowering Compiler Techniques for Neural Networkscited by 73
- 2020MLIR: A Compiler Infrastructure for the End of Moore's Lawcited by 64
- 2018The PyTorch-Kaldi Speech Recognition Toolkitcited by 38
- 2018Deep Learning Inference in Facebook Data Centers: Characterization, Performance Optimizations and Hardware Implicationscited by 35
- 2019On-Device Neural Net Inference with Mobile GPUscited by 32
- 2018Relay: A New IR for Machine Learning Frameworkscited by 24
- 2019Chainer: A Deep Learning Framework for Accelerating the Research Cyclecited by 22
- 2020Nimble: Efficiently Compiling Dynamic Neural Networks for Model Inferencecited by 19
- 2020Comparison and Benchmarking of AI Models and Frameworks on Mobile Devicescited by 17
- 2020Efficient Memory Management for Deep Neural Net Inferencecited by 12
- 2021LazyTensor: combining eager execution with domain-specific compilerscited by 11
- 2018Profile-guided memory optimization for deep neural networkscited by 6
- 2018Hybrid Pruning: Thinner Sparse Networks for Fast Inference on Edge Devicescited by 6
Built on by
Citing papers per year: 2022: 1; 2023: 1; 2024: 1.
3 papers.