arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2311.07602cs.PFcs.MS
收藏

Intel、AMD 和富士通处理器上批量、小型和矩形矩阵乘法的缓存优化与性能建模

Cache Optimization and Performance Modeling of Batched, Small, and Rectangular Matrix Multiplication on Intel, AMD, and Fujitsu Processors

Sameer Deshmukh, Rio Yokota, George Bosilca

AI总结:

通过缓存优化、SIMD寄存器累加和实现重设计,提出批量低秩矩阵乘法新方法,在Intel、AMD和富士通CPU上吞吐量超过厂商库两倍。

摘要:

稠密矩阵和张量的分解与乘法是科学计算工具箱中至关重要但代价极高的组成部分。谨慎使用低秩近似可以大幅降低这些操作的计算和内存需求。除了降低算术复杂度外,此类方法在结构上还能被设计为高效利用现代硬件架构。现有的大多数工作依赖于批量BLAS库来处理许多小型稠密矩阵的计算。我们表明,通过对缓存利用的细致分析、使用SIMD寄存器的寄存器累加以及实现的重设计,可以在广泛的块大小和批量大小范围内,为这类批量低秩矩阵实现显著更高的吞吐量。我们在使用不同ISA的3种CPU上测试了我们的算法——使用ARM SVE的富士通A64FX、使用AVX-512的Intel Xeon 6148和使用AVX-2的AMD EPYC 7502,并表明我们的新批处理方法在所有CPU架构和问题规模下,都能获得超过供应商优化库两倍的吞吐量。

英文摘要:

Factorization and multiplication of dense matrices and tensors are critical, yet extremely expensive pieces of the scientific toolbox. Careful use of low rank approximation can drastically reduce the computation and memory requirements of these operations. In addition to a lower arithmetic complexity, such methods can, by their structure, be designed to efficiently exploit modern hardware architectures. The majority of existing work relies on batched BLAS libraries to handle the computation of many small dense matrices. We show that through careful analysis of the cache utilization, register accumulation using SIMD registers and a redesign of the implementation, one can achieve significantly higher throughput for these types of batched low-rank matrices across a large range of block and batch sizes. We test our algorithm on 3 CPUs using diverse ISAs -- the Fujitsu A64FX using ARM SVE, the Intel Xeon 6148 using AVX-512 and AMD EPYC 7502 using AVX-2, and show that our new batching methodology is able to obtain more than twice the throughput of vendor optimized libraries for all CPU architectures and problem sizes.

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

↑