[Paper Review] High Performance Zero-Memory Overhead Direct Convolutions
This paper presents a high-performance direct convolution implementation that achieves 10% to 400% better performance than state-of-the-art matrix-multiplication-based convolution methods on CPUs, without any memory overhead. By using optimized data layouts and efficient loop tiling, the method eliminates packing costs and outperforms even expert-tuned BLAS routines, while scaling efficiently across multiple threads.
The computation of convolution layers in deep neural networks typically rely on high performance routines that trade space for time by using additional memory (either for packing purposes or required as part of the algorithm) to improve performance. The problems with such an approach are two-fold. First, these routines incur additional memory overhead which reduces the overall size of the network that can fit on embedded devices with limited memory capacity. Second, these high performance routines were not optimized for performing convolution, which means that the performance obtained is usually less than conventionally expected. In this paper, we demonstrate that direct convolution, when implemented correctly, eliminates all memory overhead, and yields performance that is between 10% to 400% times better than existing high performance implementations of convolution layers on conventional and embedded CPU architectures. We also show that a high performance direct convolution exhibits better scaling performance, i.e. suffers less performance drop, when increasing the number of threads.
Motivation & Objective
- To address the high memory overhead and performance degradation caused by data packing in matrix-multiplication-based convolution implementations.
- To demonstrate that direct convolution, when properly optimized, can outperform highly-tuned matrix-multiplication routines in both performance and memory efficiency.
- To design new data layouts for input, output, and kernel weights that require no additional memory beyond standard storage.
- To enable efficient parallelization of convolution on multi-core CPUs with minimal performance drop as thread count increases.
- To provide a foundation for porting the method to GPUs and optimizing backward pass computation.
Proposed method
- Proposes a custom direct convolution kernel that computes convolutions without any intermediate data packing or duplication.
- Introduces novel data layouts for input feature maps, output feature maps, and kernel weights that preserve memory efficiency while enabling high arithmetic intensity.
- Employs loop tiling and thread-level parallelism to maximize data reuse and cache efficiency on CPU architectures.
- Uses auto-tuning or analytical techniques to identify optimal blocking parameters for loop nests to maximize performance.
- Leverages existing GPU-optimized operations such as StridedBatchedGemm, enabling potential portability to NVIDIA GPUs via cuBLAS 8.0.
- Normalizes performance against SGEMM and matrix-multiplication routines to demonstrate relative gains.
Experimental results
Research questions
- RQ1Can a direct convolution implementation outperform highly optimized matrix-multiplication-based convolution routines in terms of raw performance and memory efficiency?
- RQ2Does eliminating data packing eliminate the primary performance bottleneck in existing deep learning inference pipelines?
- RQ3How does the parallel scalability of direct convolution compare to matrix-multiplication-based approaches on multi-core CPUs?
- RQ4Can direct convolution achieve near-peak performance on diverse CPU architectures including Intel, AMD, and ARM?
- RQ5Is the proposed direct convolution method portable to GPU architectures using existing optimized kernels?
Key findings
- The proposed direct convolution implementation achieves performance between 10% and 400% higher than SGEMM-based implementations, even outperforming expert-tuned BLAS libraries like Intel MKL.
- The method incurs zero memory overhead, as it avoids all data packing and duplication, making it ideal for memory-constrained embedded and edge devices.
- Performance per core degrades minimally with increasing thread count, showing superior scalability compared to matrix-multiplication-based methods.
- The implementation achieves 87.5%, 58.2%, and 88.9% of theoretical peak performance on Intel, AMD, and ARM architectures, respectively.
- The method scales efficiently up to the number of physical cores, with a significant performance drop only when thread count exceeds core count, indicating effective resource utilization.
- The authors demonstrate that the performance gap between direct convolution and SGEMM on HPC matrices can be closed through auto-tuning or analytical optimization of loop blocking parameters.
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.