[Paper Review] Communication-Optimal Parallel Algorithm for Strassen's Matrix Multiplication
This paper presents CAPS (Communication-Optimal Parallel Strassen), a novel parallel algorithm for Strassen's matrix multiplication that achieves communication-optimality by matching theoretical lower bounds on bandwidth and latency. It uses a BFS-based traversal of the Strassen recursion tree with a specialized data layout to minimize inter-processor communication, outperforming classical and existing Strassen-based algorithms by 24% to 184% on a Cray XT4 for n=94080.
Parallel matrix multiplication is one of the most studied fundamental problems in distributed and high performance computing. We obtain a new parallel algorithm that is based on Strassen's fast matrix multiplication and minimizes communication. The algorithm outperforms all known parallel matrix multiplication algorithms, classical and Strassen-based, both asymptotically and in practice. A critical bottleneck in parallelizing Strassen's algorithm is the communication between the processors. Ballard, Demmel, Holtz, and Schwartz (SPAA'11) prove lower bounds on these communication costs, using expansion properties of the underlying computation graph. Our algorithm matches these lower bounds, and so is communication-optimal. It exhibits perfect strong scaling within the maximum possible range. Benchmarking our implementation on a Cray XT4, we obtain speedups over classical and Strassen-based algorithms ranging from 24% to 184% for a fixed matrix dimension n=94080, where the number of nodes ranges from 49 to 7203. Our parallelization approach generalizes to other fast matrix multiplication algorithms.
Motivation & Objective
- To address the communication bottleneck in parallelizing Strassen’s fast matrix multiplication, which has historically limited performance gains despite reduced computational complexity.
- To close the gap between theoretical communication lower bounds and practical parallel implementations of fast matrix multiplication algorithms.
- To design a parallel algorithm that minimizes both bandwidth and latency costs in distributed-memory systems, achieving optimal communication complexity.
- To generalize the approach to other fast matrix multiplication algorithms beyond Strassen, ensuring communication-optimality across a broader class of methods.
Proposed method
- Proposes a BFS-based parallel execution of Strassen’s algorithm to enable fine-grained load balancing and minimize communication by organizing computation in levels of the recursion tree.
- Employs a recursive data layout strategy that partitions matrices into blocks and distributes them evenly across P processors, where P is a power of seven (q=7 for Strassen).
- Uses a block-cyclic data distribution to ensure load balance and minimize redundant communication, aligning with the communication lower bounds derived from expansion properties of the computation graph.
- Applies a modified Strassen-Winograd variant (with 7 multiplications) and optimizes memory access patterns to reduce data movement across processors.
- Generalizes the approach to any fast matrix multiplication algorithm based on bilinear forms, where q multiplications are used to compute n₀×n₀ matrices, with P required to be a power of q.
- Analyzes communication costs using a distributed-memory model, deriving bandwidth and latency bounds that are matched by the algorithm’s performance.
Experimental results
Research questions
- RQ1Can a parallel Strassen-based matrix multiplication algorithm be designed to match the theoretical communication lower bounds for bandwidth and latency?
- RQ2What is the impact of processor count and memory size on communication costs in parallel fast matrix multiplication, and can these be minimized across all configurations?
- RQ3How does the communication cost of CAPS compare to existing classical and Strassen-based algorithms in practice, especially under varying numbers of processors?
- RQ4Can the communication-avoiding strategy used in CAPS be generalized to other fast matrix multiplication algorithms with different exponents ω₀?
- RQ5What are the practical performance limits of communication-optimized Strassen algorithms, and how close do they come to peak hardware performance?
Key findings
- CAPS achieves communication-optimality by matching the theoretical lower bounds for both bandwidth and latency in Strassen’s matrix multiplication, with bandwidth cost Ω((n/M¹ᐟ²)^ω₀ · M/P) and latency cost Ω((n/M¹ᐟ²)^ω₀ · 1/P), where ω₀=log₂7.
- On a Cray XT4, CAPS achieves speedups of 24% to 184% over classical and Strassen-based algorithms for n=94080, with processor counts ranging from 49 to 7203.
- The algorithm exhibits perfect strong scaling within the maximum possible range, indicating efficient load balancing and minimal communication overhead as the number of processors increases.
- CAPS outperforms existing parallel Strassen implementations, which often reduce computation cost at the expense of higher communication, by maintaining optimal communication while achieving high performance.
- The algorithm generalizes to other fast matrix multiplication algorithms based on bilinear forms, with the same communication complexity, provided P is a power of q (the number of multiplications used).
- While CAPS matches communication lower bounds up to a constant factor in bandwidth and up to a log P factor in latency, the exact optimal constant in the lower bound remains an open question, as does achieving exact computation lower bounds for arbitrary P.
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.