Optimizing Winograd Convolution on ARMv8 processors
Haoyuan Gui, Xiaoyu Zhang, Chong Zhang, Zitong Su, Huiyuan Li
TL;DR
The paper tackles the inefficiencies of Winograd convolution on ARMv8 by introducing a fused Winograd framework that unifies input transformation, GEMM, and output transformation with a cache-aware, assembly-optimized design. It introduces a z-shaped data layout, a ping-pong GEMM micro-kernel, and a multi-dimensional parallel strategy to adapt to layer scales, achieving substantial cross-platform speedups and strong scalability. Empirical results show significant improvements over existing ARM libraries across multiple platforms, with accuracy preserved within practical bounds. The work advances practical Winograd acceleration on mobile and server ARM CPUs and points to further extensions to 3-D Winograd and other architectures.
Abstract
As Convolutional Neural Networks (CNNs) gain prominence in deep learning, algorithms like Winograd Convolution have been introduced to enhance computational efficiency. However, existing implementations often face challenges such as high transformation overhead, suboptimal computation efficiency, and reduced parallel performance in some layers. We propose a fused Winograd Convolution algorithm optimized for ARMv8 CPUs, integrating input transformation, filter transformation, computation, and output transformation into a single pipeline. By maintaining consecutive memory access and using a custom z-shaped data layout, our approach fully utilizes an optimized GEMM micro-kernel with a ping-pong technique. Additionally, we introduce a multi-dimensional parallel strategy that adapts to convolutional layer scales. To maximize performance, we manually optimize each kernel in AArch64 assembly and carefully tune blocking parameters. Experimental results show speedups of up to 4.74x, 4.10x, 4.72x, and 10.57x over NCNN, NNPACK, FastConv, and ACL on the Kunpeng 920 platform using multiple threads, with respective gains of 3.85x, 2.81x, 4.20x, and 7.80x on the AWS Graviton2, and 3.32x, 3.68x, 8.00x, and 9.28x on the Phytium 2000+.
