Optimizing Full-Spectrum Matrix Multiplications on ARMv8 Multi-Core CPUs
- 10 January 2024
- journal article
- research article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Parallel and Distributed Systems
- Vol. 35 (3) , 439-454
Abstract
General Matrix Multiplication (GEMM) is a key subroutine in high-performance computing. While the mainstream Basic Linear Algebra Subprograms (BLAS) libraries can deliver good performance on large and regular-shaped GEMMs, they are inadequate for optimizing small and irregular-shaped GEMMs, which are commonly seen in emerging HPC applications. Recent research has focused on improving GEMM performance on GPUs, but there is still significant room for improvement on emerging HPC hardware based on multi-core CPUs. We present LibShalom2 , an open-source library to optimize full-spectrum GEMMs, taking small, irregular-shaped, and large-scale regular-shaped matrices. LibShalom2 explicitly targets the ARMv8 architecture, which is becoming common in HPC systems. LibShalom2 is designed to minimize the expensive memory accessing overhead for data packing and processing small matrices. It uses analytic methods to determine GEMM kernel optimization parameters, enhancing the computation and parallelization efficiency of the GEMM kernels. We evaluate LibShalom2 by applying it to three ARMv8 multi-core architectures and comparing it against five mainstream linear algebra libraries. Experimental results show that LibShalom2 consistently outperforms existing solutions across full-spectrum GEMM workloads and hardware architectures. We also show that LibShalom2 delivers an average speedup of 2.2x for real-life neural network workloads.Keywords
Funding Information
- National Key R&D Program of China (2022YFB4501702)
- Excellent Youth Foundation of Hunan Province (2021JJ10050)
- National Natural Science Foundation of China (61972408, 61872294)
This publication has 35 references indexed in Scilit:
- Optimizing Sparse Matrix Multiplications for Graph Neural Networks2022
- TSM2X: High-performance tall-and-skinny matrix–matrix multiplication on GPUsJournal of Parallel and Distributed Computing, 2021
- Performance Evaluation of Memory-Centric ARMv8 Many-Core Architectures: A Case Study with Phytium 2000+Journal of Computer Science and Technology, 2021
- Performance and energy consumption of HPC workloads on a cluster based on Arm ThunderX2 CPUFuture Generation Computer Systems, 2020
- SIGMA: A Sparse and Irregular GEMM Accelerator with Flexible Interconnects for DNN Training2020
- On the behavior of Lagrange multipliers in convex and nonconvex infeasible interior point methodsMathematical Programming, 2019
- Algorithms and optimization techniques for high-performance matrix-matrix multiplications of very small matricesParallel Computing, 2019
- YOLO9000: Better, Faster, Stronger2017
- ARMv8-A next-generation vector architecture for HPC2016
- Deep Residual Learning for Image Recognition2016