[Paper Review] Memory-aware fusing and tiling of neural networks for accelerated edge inference
This paper proposes a memory-aware fusing and tiling technique for accelerating neural network inference on edge devices by independently fusing and tiling two groups of convolutional layers, reducing memory usage by over 50% and achieving up to 2.78x speedup under tight memory constraints. It introduces a memory predictor and search algorithm to automatically find optimal configurations with latency within 6% of manually tuned results.
A rising research challenge is running costly machine learning (ML) networks locally on resource-constrained edge devices. ML networks with large convolutional layers can easily exceed available memory, increasing latency due to excessive swapping. Previous memory reduction techniques such as pruning and quantization reduce model accuracy and often require retraining. Alternatively, distributed methods partition the convolutions into equivalent smaller sub-computations, but the implementations introduce communication costs and require a network of devices. However, a distributed partitioning approach can also be used to run in a reduced memory footprint on a single device by subdividing the network into smaller operations. This report extends prior work on distributed partitioning using tiling and fusing of convolutional layers into a memory-aware execution on a single device. Our approach extends prior fusing strategies to allow for two groups of convolutional layers that are fused and tiled independently. This approach reduces overhead via data reuse, and reduces the memory footprint further. We also propose a memory usage predictor coupled with a search algorithm to provide fusing and tiling configurations for an arbitrary set of convolutional layers. When applied to the YOLOv2 object detection network, results show that our approach can run in less than half the memory, and with a speedup of up to 2.78 under severe memory constraints. Additionally, our algorithm will return a configuration with a latency that is within 6% of the best latency measured in a manual search.
Motivation & Objective
- To address the challenge of running large, memory-intensive neural networks on resource-constrained edge devices.
- To reduce memory footprint without sacrificing model accuracy, avoiding the need for retraining or accuracy-reducing techniques like pruning and quantization.
- To enable efficient inference on a single device by applying distributed-style tiling and fusing techniques in a monolithic execution model.
- To develop an automated configuration search method that balances memory efficiency and inference latency.
Proposed method
- The approach extends traditional fusing by enabling independent fusion and tiling of two distinct groups of convolutional layers.
- It uses tiling to subdivide large convolutional operations into smaller, manageable computations that fit within limited on-chip memory.
- A memory usage predictor estimates the memory footprint of different fusing and tiling configurations to guide the search process.
- A search algorithm explores configurations to find the optimal trade-off between memory usage and inference latency.
- The method supports data reuse across tiled operations to reduce redundant memory accesses and computation.
- The framework is applied to YOLOv2, demonstrating effectiveness on a real-world object detection model.
Experimental results
Research questions
- RQ1Can independent tiling and fusing of two convolutional layer groups reduce memory usage more effectively than monolithic tiling?
- RQ2How effective is the proposed memory predictor in guiding the search for low-memory, high-performance configurations?
- RQ3To what extent can the automated configuration search achieve latency close to manually optimized settings?
- RQ4What is the maximum memory reduction and speedup achievable on a real-world model like YOLOv2 under tight memory constraints?
- RQ5Can the method avoid accuracy degradation without requiring retraining or quantization?
Key findings
- The proposed method reduces memory usage to less than half of the original YOLOv2 model under severe memory constraints.
- The approach achieves a maximum speedup of 2.78x compared to baseline inference on constrained edge devices.
- The automated search algorithm finds configurations with latency within 6% of the best result from a manual search.
- The method enables efficient inference on a single device by leveraging tiling and fusing strategies typically used in distributed systems.
- The memory predictor enables effective configuration space exploration without requiring exhaustive trial-and-error or retraining.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.