Arm SME架构上低成本且高性能的稀疏矩阵-矩阵乘法
LOw-cOst yet High-Performant Sparse Matrix-Matrix Multiplication on Arm SME Architectures
AI总结:
针对Armv9架构中SME和SIMD资源难以协同利用于非结构化稀疏工作负载的问题,提出混合执行框架LOOPS,结合CSR和BCSR布局,协同使用NEON和SME资源,在多精度SpMM上实现了远超基线和GPU方法的加速比与能效。
摘要:
稀疏矩阵-稠密矩阵乘法(SpMM)是科学计算和新兴图学习工作负载中的关键内核。最新的Armv9架构引入了可扩展矩阵扩展(SME),支持高吞吐量的基于分块的矩阵运算。然而,针对非结构化稀疏工作负载有效利用SME和传统SIMD资源仍是一个开放挑战。为此,我们提出LOOPS,一个混合执行框架,结合按行的CSR部分和按向量的BCSR部分布局,实现向量指令(NEON)和可扩展矩阵扩展(SME)资源的协同利用。LOOPS通过轻量级性能模型引导的自适应两级并行化方案,支持FP64、FP32和FP16的多精度SpMM。在Apple M4Pro CPU上对整个SuiteSparse的实验结果显示,LOOPS相比CPU基线TACO实现了平均9.93×(FP32)/14.4×(FP64)的加速,相比Armadillo实现了71.3×(FP32)/54.8×(FP64)的加速。在同一CPU上运行的LOOPS与在NVIDIA A100 GPU上执行的两种GPU方法(cuSPARSE、Magicube)相比,LOOPS根据精度不同实现了19.8×到33.5×的平均加速。值得注意的是,LOOPS比A100 GPU上的GPU代码具有显著更好的能效。
英文摘要:
Sparse matrix-dense matrix multiplication (SpMM) is a critical kernel in both scientific computing and emerging graph learning workloads. The recent Armv9 architecture introduces Scalable Matrix Extension (SME), enabling tile-based matrix operations with high throughput. However, effectively exploiting both SME and traditional SIMD resources for unstructured sparse workloads remains an open challenge. To address this, we propose LOOPS, a hybrid execution framework that combines row-wise CSR-part with vector-wise BCSR-part layout, enabling cooperative utilization of vector instructions (NEON) and Scalable Matrix Extension (SME) resources. LOOPS supports multi-precision SpMM across FP64, FP32, and FP16 via an adaptive two-level parallelization scheme guided by a lightweight performance model. Experimental results on the entire SuiteSparse on an Apple's M4Pro CPU show that LOOPS achieves average speedups of 9.93$\times$ (FP32)/14.4$\times$ (FP64) against the CPU baseline TACO and 71.3$\times$ (FP32)/54.8$\times$ (FP64) with respect to Armadillo. A comparison of LOOPS running on the same CPU with two GPU methods (cuSPARSE, Magicube) executed on an NVIDIA A100 GPU show average speedups for LOOPS between 19.8$\times$ and 33.5$\times$, depending on the precision. Notably, LOOPS delivers significantly better energy efficiency than the GPU codes on the A100 GPU.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。