[Paper Review] MEC: Memory-efficient Convolution for Deep Neural Network
MEC (Memory-efficient Convolution) is a novel convolution algorithm that reduces memory overhead by compactly lowering input tensors into a highly compressed format, enabling faster matrix multiplications via optimized BLAS routines. It achieves up to 3.4x lower memory usage and 90% faster inference on mobile devices compared to conventional methods, with significant performance gains on both CPU and GPU platforms across diverse DNN workloads.
Convolution is a critical component in modern deep neural networks, thus several algorithms for convolution have been developed. Direct convolution is simple but suffers from poor performance. As an alternative, multiple indirect methods have been proposed including im2col-based convolution, FFT-based convolution, or Winograd-based algorithm. However, all these indirect methods have high memory-overhead, which creates performance degradation and offers a poor trade-off between performance and memory consumption. In this work, we propose a memory-efficient convolution or MEC with compact lowering, which reduces memory-overhead substantially and accelerates convolution process. MEC lowers the input matrix in a simple yet efficient/compact way (i.e., much less memory-overhead), and then executes multiple small matrix multiplications in parallel to get convolution completed. Additionally, the reduced memory footprint improves memory sub-system efficiency, improving performance. Our experimental results show that MEC reduces memory consumption significantly with good speedup on both mobile and server platforms, compared with other indirect convolution algorithms.
Motivation & Objective
- Address the high memory overhead of indirect convolution methods like im2col, FFT, and Winograd, which degrade performance on memory-constrained devices.
- Develop a memory-efficient convolution algorithm that maintains high computational performance without sacrificing accuracy.
- Reduce memory footprint to improve cache locality and memory subsystem efficiency, especially on mobile and server platforms with limited memory.
- Create a generic, platform-agnostic convolution engine suitable for deployment across diverse hardware, including mobile, GPU, and CPU systems.
- Minimize memory traffic and SRAM usage to lower energy consumption and improve response time in edge and mobile AI applications.
Proposed method
- Proposes a compact lowering technique to transform input feature maps into a reduced tensor format (L) with significantly less memory than traditional im2col or Winograd methods.
- Executes multiple small matrix multiplications in parallel using highly optimized BLAS routines, leveraging fast GEMM operations.
- Maintains the same functional output as standard convolution but with drastically reduced memory footprint due to efficient data layout.
- Uses row-major tensor indexing and sub-matrix operations to enable direct integration with existing BLAS libraries without data movement.
- Optimizes memory access patterns to improve cache locality, especially benefiting complex cache hierarchies in server CPUs.
- Supports both CPU and GPU deployment with no kernel configuration limitations, enabling full parallelization across all kernels and channels.
Experimental results
Research questions
- RQ1Can a novel matrix lowering scheme reduce memory overhead in convolution without compromising computational efficiency?
- RQ2How does MEC compare to im2col, FFT, and Winograd in terms of memory consumption and runtime on mobile and server platforms?
- RQ3To what extent does reduced memory footprint improve cache efficiency and overall performance in convolution operations?
- RQ4Can MEC achieve high performance across diverse hardware platforms (CPU, GPU, mobile) without kernel-specific tuning or configuration constraints?
- RQ5Does MEC’s memory efficiency translate into measurable improvements in energy efficiency and inference speed for real-world DNNs like ResNet-101?
Key findings
- MEC reduces memory consumption by up to 3.4x compared to im2col-based convolution on mobile platforms, with an average improvement of 3.2x.
- MEC.cpu achieves up to 90% faster inference than Conv.cpu on specific layers like cv6, and is 20% faster overall on mobile devices.
- On server CPUs, MEC.cpu reduces runtime by 8.8x compared to Conv.cpu and outperforms Wino.cpu on 5 out of 7 benchmarks.
- On server GPUs, MEC.gpu shows the lowest memory overhead of all methods tested, with 85% faster matrix write operations than Conv.gpu due to reduced data movement.
- In ResNet-101 inference on mobile, MEC reduces total memory usage by 3x and improves runtime by 20% compared to standard convolution.
- MEC.cpu achieves a 0.3% last-level cache miss rate (vs. 4% in Conv.cpu) on a default cache system, demonstrating superior cache efficiency.
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.