Demystifying ARM SME to Optimize General Matrix Multiplications

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Deng, Chencheng, Yang, Weiling, Fang, Jianbin, Dong, Dezun
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909975806214144
author Deng, Chencheng
Yang, Weiling
Fang, Jianbin
Dong, Dezun
author_facet Deng, Chencheng
Yang, Weiling
Fang, Jianbin
Dong, Dezun
contents General Matrix Multiplication (GEMM) is a critical kernel in high-performance computing and deep learning. While modern architectures like ARM's Scalable Matrix Extension (SME) introduce dedicated hardware for matrix operations, existing linear algebra libraries fail to fully exploit its potential, particularly for large matrices. This paper presents MpGEMM, an open-source library that leverages key architectural features of SME to optimize GEMM across multiple precisions. Through a systematic characterization of SME, we derive optimization guidelines that inform our design. MpGEMM employs cache-aware partitioning, efficient data packing with on-the-fly transposition, and specialized micro-kernels that utilize multi-vector loads and all available tile registers. Evaluated on an Apple M4 Pro with real-world workloads from DeepSeek and LLaMA, MpGEMM achieves an average speedup of 1.23x over the vendor-optimized Apple Accelerate library and significantly outperforms other open-source alternatives.
format Preprint
id arxiv_https___arxiv_org_abs_2512_21473
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Demystifying ARM SME to Optimize General Matrix Multiplications
Deng, Chencheng
Yang, Weiling
Fang, Jianbin
Dong, Dezun
Distributed, Parallel, and Cluster Computing
General Matrix Multiplication (GEMM) is a critical kernel in high-performance computing and deep learning. While modern architectures like ARM's Scalable Matrix Extension (SME) introduce dedicated hardware for matrix operations, existing linear algebra libraries fail to fully exploit its potential, particularly for large matrices. This paper presents MpGEMM, an open-source library that leverages key architectural features of SME to optimize GEMM across multiple precisions. Through a systematic characterization of SME, we derive optimization guidelines that inform our design. MpGEMM employs cache-aware partitioning, efficient data packing with on-the-fly transposition, and specialized micro-kernels that utilize multi-vector loads and all available tile registers. Evaluated on an Apple M4 Pro with real-world workloads from DeepSeek and LLaMA, MpGEMM achieves an average speedup of 1.23x over the vendor-optimized Apple Accelerate library and significantly outperforms other open-source alternatives.
title Demystifying ARM SME to Optimize General Matrix Multiplications
topic Distributed, Parallel, and Cluster Computing
url https://arxiv.org/abs/2512.21473