Skip to main content
QUICK REVIEW

[Paper Review] The MOMMS Family of Matrix Multiplication Algorithms

Tyler Smith, Robert A. Geijn|arXiv (Cornell University)|Apr 11, 2019
Parallel Computing and Optimization TechniquesComputer Science22 references8 citations
TL;DR

This paper introduces the MOMMS family of matrix multiplication algorithms, a novel family of cache-optimized algorithms designed to outperform Goto’s algorithm under increasingly memory-bandwidth-limited architectures. By strategically reorganizing data access patterns across multiple cache levels—particularly L3—MOMMS algorithms reduce I/O costs and improve performance on low-bandwidth systems, with empirical results showing up to 2× performance gains over Goto’s algorithm in memory-bound scenarios.

ABSTRACT

As the ratio between the rate of computation and rate with which data can be retrieved from various layers of memory continues to deteriorate, a question arises: Will the current best algorithms for computing matrix-matrix multiplication on future CPUs continue to be (near) optimal? This paper provides compelling analytical and empirical evidence that the answer is "no". The analytical results guide us to a new family of algorithms of which the current state-of-the-art "Goto's algorithm" is but one member. The empirical results, on architectures that were custom built to reduce the amount of bandwidth to main memory, show that under different circumstances, different and particular members of the family become more superior. Thus, this family will likely start playing a prominent role going forward.

Motivation & Objective

  • To address the growing performance gap between computational speed and memory bandwidth in modern CPUs.
  • To develop a new family of matrix multiplication algorithms that outperform existing state-of-the-art methods like Goto’s algorithm under memory-bound conditions.
  • To analyze and optimize trade-offs in data movement across multiple cache levels (L1, L2, L3) in hierarchical memory systems.
  • To empirically validate that different MOMMS variants outperform Goto’s algorithm depending on matrix shape and memory bandwidth.
  • To lay the foundation for future high-performance linear algebra libraries by enabling I/O-optimal algorithms in multi-level cache environments.

Proposed method

  • Proposes the MOMMS family as a generalization of Goto’s algorithm, incorporating multiple levels of loop tiling and data blocking across L1, L2, and L3 caches.
  • Uses a theoretical I/O lower bound model (2mnk/√M) to guide algorithm design, ensuring near-optimality in data movement.
  • Designs three core MOMMS variants—A3B2C0, B3A2C0, and C3A2C0—each optimized for different matrix dimension regimes by aligning computation with the most effective cache level.
  • Employs hierarchical matrix storage and avoids data packing to reduce memory footprint and TLB pressure.
  • Employs a two-loop structure at each cache level to maximize data reuse and minimize redundant memory transfers.
  • Validates performance on custom hardware with tunable memory bandwidth, isolating the impact of memory I/O on algorithmic performance.

Experimental results

Research questions

  • RQ1Under what conditions does Goto’s algorithm become suboptimal due to worsening memory bandwidth-to-compute ratios?
  • RQ2How can matrix multiplication algorithms be restructured to optimally utilize multiple levels of cache (L1, L2, L3) simultaneously?
  • RQ3Which MOMMS variant (A3B2C0, B3A2C0, C3A2C0) achieves optimal performance for different matrix shapes and cache configurations?
  • RQ4To what extent can I/O-optimized algorithms reduce energy consumption in matrix multiplication?
  • RQ5Can the MOMMS framework be extended to out-of-core computation and other dense linear algebra operations?

Key findings

  • On a low-bandwidth custom architecture, the MOMMS C3A2C0 variant outperformed Goto’s algorithm by up to 2× in GFLOPS, demonstrating significant I/O cost reduction.
  • When the matrix dimension matching the L3 cache size (≈√M³) was large, the corresponding MOMMS variant (e.g., C3A2C0 for m ≈ n ≈ √M³) achieved peak performance.
  • Even when suboptimal for a given matrix shape, MOMMS algorithms incurred only 50% higher I/O cost than the optimal algorithm, whereas Goto’s algorithm suffered approximately 2× higher I/O cost.
  • The performance gap between Goto’s algorithm and MOMMS variants widened with increasing problem size under memory-bound conditions.
  • The MOMMS family maintains high performance across diverse matrix shapes, indicating robustness when two dimensions are at least √M³ and the third is large.
  • The results suggest that future linear algebra libraries should adopt MOMMS-style algorithms to delay the onset of memory-bound performance bottlenecks.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.