[Paper Review] A matrix math facility for Power ISA(TM) processors
This paper introduces the Matrix-Multiply Assist (MMA) facility in Power ISA™ Version 3.1, a new set of instructions for accelerating matrix computations in IBM's POWER10 processor. By using 512-bit accumulator registers to perform rank-k updates on small matrices with 32-bit, 64-bit, and bfloat16 precision, the MMA facility achieves 4× higher performance per core in matrix multiplication compared to POWER9, with only 8% more power draw, enabling significant energy efficiency gains.
Power ISA(TM) Version 3.1 has introduced a new family of matrix math instructions, collectively known as the Matrix-Multiply Assist (MMA) facility. The instructions in this facility implement numerical linear algebra operations on small matrices and are meant to accelerate computation-intensive kernels, such as matrix multiplication, convolution and discrete Fourier transform. These instructions have led to a power- and area-efficient implementation of a high throughput math engine in the future POWER10 processor. Performance per core is 4 times better, at constant frequency, than the previous generation POWER9 processor. We also advocate the use of compiler built-ins as the preferred way of leveraging these instructions, which we illustrate through case studies covering matrix multiplication and convolution.
Motivation & Objective
- To address the performance gap in BLAS3 workloads on POWER10, especially for business analytics and machine learning workloads requiring high-throughput dense linear algebra.
- To design a hardware-software co-designed solution that accelerates matrix multiplication, convolution, and other kernels without expanding architected register file or requiring new compilation toolchains.
- To enable efficient use of the new MMA instructions via compiler built-ins, ensuring backward compatibility and maintainability while achieving high performance.
- To demonstrate that the MMA facility delivers substantial performance and energy efficiency improvements over POWER9 and prior vector-only instruction sets.
Proposed method
- The MMA facility introduces 8 new 512-bit accumulator registers to store intermediate results of rank-k matrix updates, decoupled from the 64×128-bit vector-scalar registers used for inputs.
- The Matrix Math Engine (MME) functional unit executes MMA instructions in parallel with other Power ISA instructions, enabling full overlap with general computation.
- The MMA instructions operate on small matrices (e.g., 4×4 of 32-bit floats), using vector registers for inputs and accumulators for outputs, enabling efficient computation of GEMM and convolution kernels.
- The design uses a power-gated MME unit and keeps accumulators non-architected initially, allowing future promotion to full architected state in a backward-compatible way.
- Compiler built-ins are introduced in GCC and LLVM to allow high-level code generation with fine-grained control, avoiding hand-written assembly while maintaining performance.
- The implementation is validated through simulation using a pre-silicon core model, measuring performance and power draw across DGEMM and HPL workloads.
Experimental results
Research questions
- RQ1How can a new instruction set extension improve performance for dense linear algebra kernels in a power-constrained, legacy ISA environment?
- RQ2To what extent can a dedicated matrix math engine improve performance for machine learning and analytics workloads without expanding register file or requiring new compilation technology?
- RQ3What is the performance and power efficiency gain of using MMA instructions over traditional vector-only approaches in a real processor core?
- RQ4Can compiler built-ins effectively expose the MMA facility’s capabilities while maintaining code maintainability and performance?
- RQ5How does the MMA facility scale across different precision formats (32-bit, 64-bit, bfloat16) in production workloads?
Key findings
- The POWER10 processor achieves 4× higher performance per core in matrix multiplication kernels compared to POWER9, at the same clock frequency.
- The MMA facility delivers 2.5× higher performance than VSX-only code on POWER10, with only 8% more power draw, indicating strong energy efficiency.
- When compared to POWER9, the MMA-enabled POWER10 core achieves 5× better performance at 24% less power, resulting in nearly 7× reduction in energy per computation.
- The MMA instructions are already integrated into OpenBLAS and Eigen, with support for double, single, and bfloat16 precision, enabling immediate use in high-performance linear algebra libraries.
- The use of compiler built-ins enables efficient code generation with minimal overhead, offering a maintainable alternative to hand-written assembly.
- The MMA facility enables efficient implementation of convolution and discrete Fourier transform kernels, with potential for broader use in stencil and signal processing workloads.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.