arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.00278cs.LGcs.AIcs.NE
收藏

在SIMD架构上使用三种张量布局的高性能Im2win与直接卷积

High Performance Im2win and Direct Convolutions using Three Tensor Layouts on SIMD Architectures

Nanchang Hangkong University(南昌航空大学);Microsoft(微软);University of Washington(华盛顿大学);Amazon Web Services(亚马逊网络服务)

Xiang Fu, Xinpeng Zhang, Jixiang Ma, Peng Zhao, Shuai Lu, Xu T. Liu

AI总结:

本文针对SIMD架构提出NHWC、CHWN和CHWN8三种新数据布局及通用优化技术,使im2win和直接卷积分别达到理论峰值性能的95%和94%,其中NHWC布局的im2win卷积较NCHW加速高达355%。

摘要:

卷积是深度神经网络中的核心组件,其计算密集且耗时。张量数据布局在内存访问和计算效率方面对卷积运算有显著影响。然而,在SIMD架构上,针对卷积方法的数据布局仍缺乏全面的性能表征。本文为im2win卷积提出了三种新颖的数据布局:NHWC、CHWN和CHWN8,并针对直接卷积和im2win卷积引入了一组通用优化技术。我们在SIMD机器上将优化后的im2win卷积与直接卷积以及PyTorch基于im2col的卷积在上述布局上进行了比较。实验表明,采用新NHWC布局的im2win卷积相比NCHW布局实现了高达355%的性能加速。我们的优化还显著提升了im2win卷积和直接卷积的性能。我们优化后的im2win卷积和直接卷积分别达到了机器理论峰值性能的95%和94%。

英文摘要:

Convolution is the core component within deep neural networks and it is computationally intensive and time consuming. Tensor data layouts significantly impact convolution operations in terms of memory access and computational efficiency. Yet, there is still a lack of comprehensive performance characterization on data layouts on SIMD architectures concerning convolution methods. This paper proposes three novel data layouts for im2win convolution: NHWC, CHWN, and CHWN8, and introduces a set of general optimization techniques for both direct and im2win convolutions. We compare the optimized im2win convolution with the direct convolution and PyTorch's im2col-based convolution across the aforementioned layouts on SIMD machines. The experiments demonstrated that the im2win convolution with the new NHWC layout achieved up to 355% performance speedup over NCHW layout. Our optimizations also significantly improve the performance of both im2win and direct convolutions. Our optimized im2win and direct convolutions achieved up to 95% and 94% of machine's theoretical peak performance, respectively.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑