基于GPU的Winograd 卷积算法并行化
2025-09-02王鑫甄雪茹

中图分类号:TP183 文献标志码:A 文章编号:1001-3695(2025)08-026-2446-06
doi:10.19734/j. issn.1001-3695.2024.11.0502
GPU-based parallelization of Winograd convolution algorithm
Wang Xin†,Zhen Xueru (KeyLboratodedrotroghstr(tcto)gUsitui)
Abstract:This paper proposedaninovativeWinogradparalelconvolutionalgorithmbasedonGPU toaddress theproblemof excessivecomputationalloadinmodernconvolutionalneuralnetworks.Thealgorithmusedload-balanced task mapping,optimized thedataloadingstrategyto hidelatency,andcombined thedynamic padding methodtofullexplore thesynergybetwen theWinogradconvolution algorithmandtheGPUarchitecture.Experimentalresultsshowthatonmultipleconvolutionallayers of the classic convolutional l network model ResNet,the proposed algorithm outperforms the standard Winograd convolutionalgorithmintheNVIDIAcuDNN8.3.Olibrary.Itachievesaspeed-upratioofupto2.46ontheTuringarchitecture RTX 2080Ti GPUand maintainshigh computational accuracy.Compared with the standard Winograd convolutionalgorithm based on GPU,the algorithm significantly improves the efficiency of convolutional computation.
Key Words:Winograd algorithm;parallel computing;CUDA;convolutional neural network
0 引言
卷积神经网络(convolutionalneuralnetwork,CNN)作为深度学习(deeplearning,DL)中的核心技术,已经在图像分类[1]和目标分割[2]等多个领域得到了广泛应用。CNN的关键优势在于其卷积层能够自动提取数据的局部特征,并通过多层结构逐渐提取出更高层语义信息,其中卷积操作在整个神经网络的计算过程中约占 90% 的时间[3],因此加速卷积计算对提升深度神经网络的训练与推理效率至关重要。
为了应对CNN中日益庞大的卷积计算需求,越来越多的研究聚焦于各类硬件平台上优化卷积计算,如图形处理单元(graphicsprocessingunit,GPU)、中央处理单元(centralproces-singunit,CPU)[4]和现场可编程门阵列(fieldprogrammablegatearray,FPGA)[5~9]等,其中,GPU平台因其强大的并行处理能力,已成为加速卷积计算的主要平台之一。当前主流的卷积算法包括基于GEMM的卷积算法[10]、基于FFT的卷积算法[1]和基于Winograd的卷积算法[12]等,其中,基于Winograd的卷积算法因其能显著降低乘法操作次数被广泛使用,尤其是处理 3×3 卷积核时,Winograd卷积算法展现出更高的计算效率。
目前已有众多研究着眼于在GPU架构上实现Winograd卷积算法。Wei等人[13]针对Winograd非融合卷积的高效实现,提出了独立应用程序的分组生产者——消费者链以及一系列特定软件技术,包括提高内存访问效率的专用接口-内核数据格式、线程束特化和利用shuffle指令等优化方法。Jia等人[4]提出了一种基于MegaKernel的Winograd卷积算法的核融合技术,通过静态任务映射算法将任务分配到GPU线程块,并构建任务调度程序以维护正确的任务依赖关系。Yan等人[15]针对单精度 F(2×2,3×3) Winograd卷积算法在NVIDIAVolta和Turing架构GPU上的高效实现问题,通过构建SASS汇编器TuringAs进行汇编级别优化,并重新设计工作负载分区和数据布局等方法。……
