betaFeedback

WorksComputer Science

Parallelizing Complex Matrix Multiplication: The 3M Solution

Abstract

We consider the problem of computing the product of two matrices with complex entries, a kernel used in quantum chemistry, electromagnetic simulation, quantum circuit simulation, and FFT-based methods. Standard practice already restructures the local computation using the classical 3M (Gauss/Karatsuba) identity, computing the product from three real matrix multiplications instead of four, dropping arithmetic by 25%25\% unconditionally but leaving communication unchanged. We show that whether 3M is worth doing at all, and whether it is additionally worth restructuring communication to get more of it by computing the three products in parallel on disjoint processor groups, are independent questions, and we answer each in closed form under a standard αα-ββ-γγ communication model. Under this model, for 2D layouts, in the large-PP limit, parallelizing the split reduces bandwidth by 13.4%13.4\% and latency by 1−1/3≈42.3%1-1/\sqrt3\approx42.3\%, the latter independent of the underlying algorithm's arithmetic exponent; neither reduction is achieved for 3D. For Strassen's algorithm the arithmetic picture reverses: restructuring locally is 7.1%7.1\% worse, not better. We further generalize to Toom-Cook-kk, giving a closed-form condition, increasing in kk, under which higher-order splits rescue 3D layouts entirely: for instance, k=3k=3 already makes 3D favorable for classical matrix multiplication, where the ordinary k=2k=2 split never does.

Introduction

Complex-valued matrix multiplication is a core kernel in quantum chemistry [49, 55], electromagnetic simulation [27, 50], quantum circuit simulation [37, 3], and any FFT-based method operating on complex data [19].

As matrix dimensions grow, computing such a product C=A×BC = A \times B requires distributing AA, BB, and CC across PP processors. This raises the general problem of parallel matrix multiplication, studied extensively over the past four decades [15, 56, 17, 12, 22, 1, 38, 47, 32, 2, 30, 54, 20, 6]: how the matrices should be laid out, and how the necessary arithmetic and data movement should be scheduled, to minimize total running time on a distributed-memory machine.

Three quantities govern this running time. The arithmetic cost is the number of scalar multiplications and additions each processor performs, as tallied for the dense matrix kernels underlying libraries such as the Level 3 BLAS [24]. The communication cost, or bandwidth, is the number of words each processor sends and receives. The latency is the number of messages exchanged, which matters independently of message size, since every message carries a fixed overhead regardless of how much data it holds. This distinction underlies cost models such as BSP [54] and LogP [20]. A parallel algorithm’s total running time is governed by all three simultaneously, and reducing one can come at the expense of another. For instance, replicating data across more processors can reduce communication at the cost of extra memory and redundant arithmetic. This paper studies how these three costs interact when a complex matrix product is computed in parallel.

Reducing communication is not a concern specific to matrix multiplication. It has been a central goal across numerical linear algebra for decades, with communication-optimal algorithms developed for QR and LU factorization [23, 26], eigenvalue and singular value problems [4], and Krylov subspace methods [29]. Matching communication lower bounds have been established across this body of work [6]. Toom-Cook [51, 18] (§ 2.4) generalizes Karatsuba to kk-way splitting. Nissim et al. gave Toom-Cook-kk algorithms that jointly optimize arithmetic and I/O [40]. Nissim and Spiizer later adapted this technique to inner-product Toom-Cook, obtaining a trade-off between arithmetic and communication costs [43]. Bilardi and De Stefani establish a tight lower bound for the I/O complexity of Toom-Cook integer multiplication [9], and De Stefani analyzes the I/O complexity of sequential and parallel hybrid integer multiplication algorithms [21], whose parallel setting has also been separately analyzed in the fault-tolerant Toom-Cook literature [42, 41].

Throughout, we compare three strategies for parallelizing the 3M identity, named once in full in §1.2 below and formally defined in §3: V1, our proposed split into concurrent processor groups; V2, an in-place restructuring that keeps the standard communication schedule; and V3, the standard four-multiplication approach. Table 1.1 previews the resulting comparison.

SettingV2 vs. V3 (arithmetic)V1:V2 bandwidth (P→∞P \to\infty)V1:V2 latency (P→∞P \to\infty)
Classical, 2D−25%-25\% [57]−13.4%-13.4\%−42.3%-42.3\%
Classical, 3D−25%-25\% [57]+4.0%+4.0\%≈0%\approx0\%
Strassen, 2D+7.1%+7.1\%−3.7%-3.7\%−42.3%-42.3\%
Strassen, 3D+7.1%+7.1\%+11.6%+11.6\%≈0%\approx0\%
Karatsuba split−25%-25\%−13.4%-13.4\%−42.3%-42.3\%

Table 1.1. Arithmetic (V2 vs. V3) and communication (V1 vs. V2).

Previous Work.

The common way to compute a complex product applies the trivial formula

(a+bi)(c+di)=(ac−bd)+(ad+bc)i(1)(a + bi)(c + di) = (ac - bd) + (ad + bc)i \tag*{(1)}

entry-by-entry, at a cost of four real multiplications and two real additions per entry. A classical alternative needs only three multiplications: Gauss’s identity for multiplying two Gaussian integers, the same identity underlying Karatsuba’s algorithm [33]. It generalizes directly from scalars to matrix blocks A0A_0, A1A_1, B0B_0, B1B_1, giving the 3M identity

Q1=A0B0,Q2=A1B1,Q3=(A0+A1)(B0+B1),\begin{aligned} Q_1 &= A_0B_0,\qquad Q_2 = A_1B_1,\\ Q_3 &= (A_0 + A_1)(B_0 + B_1), \end{aligned}
Re(C)=Q1−Q2,Im(C)=Q3−Q1−Q2,(2)\begin{aligned} \mathop{\mathrm{Re}}(C) &= Q_1 - Q_2,\\ \mathop{\mathrm{Im}}(C) &= Q_3 - Q_1 - Q_2, \tag*{(2)} \end{aligned}

at a cost of four real additions per entry instead. Entry-wise, 4M is therefore preferable, since it needs fewer total operations; 3M’s advantage only appears once Q1Q_1, Q2Q_2, Q3Q_3 are themselves large matrix products, where the multiplication it saves is a full O(n3)O(n^3) operation rather than a single scalar one.

This 3M/4M trade-off is well studied at the single-node level. Van Zee et al. build both into BLIS, restructuring only the local, in-place computation [57, 58]; Kouya extends this to arbitrary-precision arithmetic [35]; the identity’s mildly worse numerical stability has been separately characterized [28]. A structurally identical reduction appears in the Ozaki scheme for emulating FP64 (64-bit floating-point) matrix multiplication on low-precision (FP8, 8-bit floating-point; INT8, 8-bit integer) tensor-core hardware [45, 39], exposed through vendor libraries such as NVIDIA’s cuBLAS [44], where Uchino et al. recently proposed the same 4-to-3 reduction [52]. Neither line of work considers a distributed-memory setting.

On the distributed side, communication-avoiding matrix multiplication traces back to the I/O (input/output) lower bound of Hong and Kung [30], generalized to distributed memory by Aggarwal et al. [2] and Irony et al. [32] and surveyed by Ballard et al. (BDHS) [6]. The 2D, 2.5D, and 3D algorithms of §2.2 realize this bound at varying memory budgets [15, 56, 17, 12, 22, 1, 38, 47], alongside the BSP and LogP cost models [54, 20]. In practice, 2D is used when memory is limited, since it stores only one copy of each matrix per processor; 3D is used when memory is abundant, replicating the input P1/3P^{1/3}-fold to cut communication substantially, and 2.5D interpolates between the two whenever partial replication fits in the available memory. Strassen’s algorithm and its descendants have communication-optimal distributed implementations (CAPS, §2.5) [48, 59, 34, 8, 7, 36, 5].

The distinction we draw is between the inner real-matrix-multiplication primitive and the outer 3M (or Toom-Cook-kk) identity composed on top of it. The communication-avoiding and communication-optimal literature above [7, 36, 5, 6], including CAPS, optimizes the inner primitive itself, for real- or Strassen-valued inputs; it does not address what happens when that primitive is called three (or 2k−12k-1) times by an outer identity, since no complex/Gaussian composition is in view. The single-node literature on 3M/4M [57, 52] does consider the outer identity, but only ever restructures its local computation (V2 in our terms), implicitly assuming the inner primitive’s own communication schedule is fixed and shared; it does not consider restructuring communication around the outer identity itself, i.e., our V1. No prior work we are aware of analyzes this second, outer-level question, which is the gap this paper fills.

Our Contributions.

What we obtained.

Our main contribution is a closed-form decomposition of the three-way comparison among V1, V2, and V3 (§1) under the standard α\alpha-β\beta-γ\gamma communication model; all percentages below are predictions of that model, not measurements, and we return to what the model omits and what calibrating it would require in §9. For computing the product of two complex matrices in 2D matrix-multiplication settings compared to standard practice, the model predicts an asymptotic reduction of 13.4% in bandwidth and 42.3% in latency (Corollary 4.6). At any practically achievable scale, this extends up to a critical replication factor c∗=Plog⁡3(4/3)≈P0.262c^* = P_{\log_3(4/3)} \approx P^{0.262} (Corollary 4.8), roughly 79% of the way from 2D to full 3D replication, past which in-place restructuring (V2) becomes the better choice; at astronomically large, not practically achievable PP, splitting instead remains favorable throughout the entire 2.5D range short of full 3D replication itself (Corollary 4.9).

Our second result concerns Strassen’s algorithm. In 2D, splitting (V1) still reduces communication, but now at the cost of increased arithmetic: Strassen’s recombination phase is taxed three times under any 3-channel split, so in-place restructuring (V2) is 7.1% worse in arithmetic than standard (V3), a penalty V1 inherits. The communication saving still wins at scale: bandwidth drops by 3.7% and latency by the same 42.3% as classical, since the latency reduction does k=2k = 2, n=2000n = 2000. Negative = reduction, positive = increase. Bandwidth and latency are the asymptotic (P→∞P \to\infty) V1-vs-V2 ratios of each term, from Theorem 4.4 and Lemma 4.5. Preview: this decomposition, and the two theorems behind it, are derived in §4.

not depend on the arithmetic exponent, but Strassen’s window is narrower (critical replication factor P0.0857P^{0.0857}, about a third of classical’s); past that, and for 3D outright, standard (V3) is the best of all three strategies at every scale we evaluated.

We generalize our technique to multi-precision matrix multiplication: applied to Karatsuba’s high/low-digit split for emulating high precision on low-precision hardware, our theorems transfer unmodified, correctly predicting a classical-like (not Strassen-like) ranking. Generalizing further to kk-digit splits (Toom-Cook-kk), the same benefits grow with kk and, unlike the two-digit case, can rescue 3D layouts entirely.

Two further results round out the picture. Splitting into more pieces can rescue 3D layouts: Toom-Cook-3 suffices asymptotically for every arithmetic exponent, classical and Strassen alike, though Strassen’s crossover requires a larger PP since its bandwidth term alone still favors standard practice at k=3k = 3. The same threshold generalizes to any similar splitting technique, governed by memory rather than communication for size-reducing algorithms like Strassen’s own recursive step, which explains CAPS’s BFS/DFS choice. We also checked whether V2’s extra product forces it to use more local memory than V3: it does not. A careful choice of buffer reuse lets V2 match V3’s memory footprint exactly, using only ordinary calls to an existing real-matrix-multiplication routine. We explain how we obtained all of these results next.

How we obtained it.

Once A0A_0, A1A_1, B0B_0, B1B_1 are distributed across PP processors (2D, 2.5D, or 3D, §2.2), identity (1.2) admits more than one parallelization, and it is not obvious which is best. We propose parallelizing 3M by splitting processors into concurrent groups (V1 below), and compare this against the two existing alternatives (V2, V3). Three concrete strategies are possible:

V1 3M-split (our proposal). Partition the PP processors into three groups of P/3P/3; each group computes one of Q1,Q2,Q3Q_1,Q_2,Q_3 concurrently.

V2 In-place 3M. Keep the standard communication schedule; apply the 3M decomposition only to the local, in-place computation (as in BLIS’s 3m kernel [57]).

V3 Standard. The common approach above: the same schedule as V2, with local computation done via the direct 4-multiplication formula.

All five results above follow from decomposing the three-way comparison into two independent sub-questions, each answered by a single theorem. V2 vs. V3 is a pure arithmetic question, since in-place restructuring (V2) and standard (V3) share, by construction, an identical communication schedule (Proposition 4.1), so their comparison reduces to comparing two leading coefficients, c1T(k)=2k−1c_1^{\mathrm{T}}(k)=2k-1 against c2(k)=k2c_2(k)=k^2 (§2.3 and §2.4), independent of nn, PP, or the communication model. V1 vs. V2 is a communication question, since splitting into 2k−12k-1 concurrent processor groups (V1) and in-place restructuring (V2) share, by a flop-time-invariance argument (Theorem 4.3), an identical compute time, so their comparison reduces to how bandwidth and latency scale under processor-splitting. θ∗(k)\theta^*(k) governs the bandwidth term alone, and hence how quickly V1 catches up to V2 as PP grows; the eventual winner, as P→∞P \to\infty, is decided by latency, which for 2D gives a universal, algorithm-independent advantage to V1 regardless of θ∗(k)\theta^*(k) (Corollary 4.6). Table 1.1 makes the two decomposed questions concrete: is 3M worth doing at all (already answered by existing practice), and is it additionally worth splitting into groups (the question this paper answers). This analysis is model-based; we also provide a consistency-check simulator as supplementary material1, which cross-checks our closed-form predictions against an independent, discrete accounting of each layout’s communication pattern under the same cost model, catching algebraic or off-by-constant errors in the closed forms; it does not substitute for measurement on a real distributed implementation (§6, §9).

Preliminaries

Notation and Model.

An algorithm has arithmetic exponent ω\omega if its multiplication and addition counts satisfy M(n),A(n)=Θ(nω)M(n), A(n) = \Theta(n^\omega), with leading coefficients cM,cAc_M, c_A; we call the pair (M,A)(M, A) its arithmetic profile. Every algorithm here has ω=3\omega= 3 (classical), ω0=log⁡27≈2.8074\omega_0 = \log_2 7 \approx2.8074 (Strassen), or a kk-dependent exponent (Toom-Cook-kk). On the communication side, BW(n,P)=n2/PθBW(n, P) = n^2/P^\theta (bandwidth, words/processor) and S(n,P)S(n, P) (latency, messages/processor), up to lower-order terms.

We model the machine as PP identical processors, connected by a peer-to-peer communication network, the standard distributed-memory model [25, 54, 20, 15, 56, 17, 12, 22, 1, 38, 47, 32, 2, 30, 42, 41]. We adopt the bilinear-algorithm formalism used throughout the communication-avoiding literature [30, 32, 7, 6, 40]. C=A×BC = A \times B is computed as vec⁡(C)=W((UTvec⁡(A))⊙(VTvec⁡(B)))\operatorname{vec}(C) = W((U^\mathsf{T}\operatorname{vec}(A)) \odot(V^\mathsf{T}\operatorname{vec}(B))) for encoding matrices UU, VV and decoding matrix WW [34, 40], applied to sub-blocks (Strassen) or evaluation points (Toom-Cook). Time is T=γ(M+A)+βBW+αST = \gamma(M + A) + \beta BW + \alpha S for machine constants γ,β,α\gamma, \beta, \alpha. Our aim is to reduce the leading coefficients cM,cAc_M, c_A and the bandwidth/latency coefficients, not merely the exponents. These exponents are fixed once the algorithm and layout are chosen [13, 34, 8, 40].

Substituting a layout’s memory bound into the BDHS bound [7],

BW(n,P,M)=Θ(nωPMω/2−1)(3)BW(n, P, M) = \Theta\left(\frac{n^\omega}{P M^{\omega/2-1}}\right) \tag*{(3)}

gives every bandwidth exponent θ(ω)\theta(\omega) used throughout this paper.

2D, 2.5D, and 3D Matrix Multiplication.

All three layouts perform the same total work n3n^3, differing only in memory budget MM and hence communication. They span two extremes and everything in between. 2D (Cannon [15], SUMMA [56, 17, 12]) is the limited-memory extreme: PP processors in a P×P\sqrt{P} \times\sqrt{P} grid, minimal memory M=Θ(n2/P)M = \Theta(n^2/P), P\sqrt{P} rounds of local multiply-accumulate and shift/broadcast. 3D (Dekel et al. [22], refined by [1, 38, 47]) is the unlimited-memory extreme: P1/3P^{1/3}-fold replication, maximal memory M=Θ(n2/P2/3)M = \Theta(n^2/P^{2/3}), local 2D multiply on each of P2/3P^{2/3} layers plus a final reduction. These give θ2D(3)=12\theta_{2D}(3) = \frac{1}{2}, θ3D(3)=23\theta_{3D}(3) = \frac{2}{3} from the BDHS bound, matching the known communication-optimal results [32, 47]. 2.5D [47] interpolates via replication factor c∈[1,P1/3]c \in[1, P^{1/3}], M=Θ(cn2/P)M = \Theta(cn^2/P), representing whatever memory is available between the two extremes; c=1c = 1 and c=P1/3c = P^{1/3} recover 2D and 3D exactly. Substituting this MM into the BDHS bound (2.1) gives BW(n,P,c)=Θ(n2/cP)BW(n, P, c) = \Theta(n^2/\sqrt{cP}) for classical matrix multiplication, which correctly recovers both endpoints: n2/Pn^2/\sqrt{P} at c=1c = 1 and n2/P2/3n^2/P^{2/3} at c=P1/3c = P^{1/3}. Table 2.1 gives all three leading coefficients; replication changes only communication, never cM,cAc_M, c_A.

LayoutBW(n,P)BW(n, P)S(n,P)S(n, P)
2D (limited MM)n2/Pn^2/\sqrt{P}Θ(P)\Theta(\sqrt{P})
2.5D (cc)Θ(n2/cP)\Theta(n^2/\sqrt{cP})Θ(P/c3+log⁡c)\Theta(\sqrt{P/c^3} + \log c)
3D (unlimited MM)n2/P2/3n^2/P^{2/3}Θ(log⁡P)\Theta(\log P)

Table 2.1. Communication profiles, classical matrix multiplication. ω=3\omega= 3; cM=cA=1c_M = c_A = 1 throughout, only BW,SBW, S vary. Established results [15, 56, 22, 1, 47], re-derived here from the BDHS bound (2.1) for consistency.

4M and 3M Gaussian Product.

For real A0,A1,B0,B1A_0, A_1, B_0, B_1, the Gaussian product C=(A0+iA1)(B0+iB1)C = (A_0 + iA_1)(B_0 + iB_1) has two forms. 4M: the common approach (Eq. (1.1)), applying the trivial complex-multiplication formula entry-by-entry within a single matrix-multiplication pass. Each of the n3n^3 scalar multiply-accumulate steps forms one complex product (4 real multiplications, 2 real additions) and accumulates it into the running complex sum (2 more real additions): 4 multiplications and 4 additions per step, giving M4M(n)=A4M(n)=4n3+O(n2)M_{4M}(n) = A_{4M}(n) = 4n^3 + O(n^2), i.e. cM=cA=4c_M = c_A = 4.

3M (Gauss/Karatsuba): for scalars a,b,c,da,b,c,d, the same product can instead be computed as q1=acq_1 = ac, q2=bdq_2 = bd, q3=(a+b)(c+d)q_3 = (a+b)(c+d), giving R=q1−q2\mathfrak{R} = q_1-q_2 and S=q3−q1−q2\mathfrak{S} = q_3-q_1-q_2, using only three real multiplications instead of four. The same distributive expansion holds whether a,b,c,da,b,c,d are scalars or matrix blocks, so this identity generalizes directly to A0,A1,B0,B1A_0,A_1,B_0,B_1 (Eq. (1.2)): three products plus O(n2)O(n^2) overhead, giving M3M(n)=A3M(n)=3n3+O(n2)M_{3M}(n) = A_{3M}(n) = 3n^3 + O(n^2), i.e. cM=cA=3c_M = c_A = 3.

Toom-Cook-kk.

Toom-Cook-kk [51, 18] generalizes Karatsuba (k=2k = 2) to kk-way splitting, originally for multiplying long integers: write each input as a degree-(k−1)(k-1) polynomial over kk digit blocks, A′(x)=∑i=0k−1A(i)xiA'(x) = \sum_{i=0}^{k-1} A^{(i)}x^i; the exact product is a length-(2k−1)(2k-1) convolution. The schoolbook algorithm multiplies two kk-digit integers entry-wise, at a cost of Θ(k2)\Theta(k^2) single-digit multiplications (compared to only Θ(k)\Theta(k) operations to add two kk-digit integers). Toom-Cook instead evaluates both inputs at 2k−12k-1 points, multiplies pointwise (2k−1)(2k-1) products of the reduced-size evaluations, and interpolates, using O(k2)O(k^2) additions for the evaluation and interpolation steps combined. Karatsuba is k=2k = 2 (3 products instead of 4); Toom-3 is k=3k = 3 (5 instead of 9); Toom-4 is k=4k = 4 (7 instead of 16).

Strassen and CAPS.

Strassen [48] multiplies 2×22 \times2 block matrices with 7 recursive multiplications instead of 8, at qq matrix additions per level (encoding + decoding), giving M(n)=7M(n/2)M(n) = 7M(n/2), A(n)=7A(n/2)+q4n2A(n) = 7A(n/2) + \frac{q}{4}n^2. Solving (verified via recursive simulation in §5) gives ω0=log⁡27\omega_0 = \log_2 7, cM=1c_M = 1, cA=q/3c_A = q/3. Three

Algorithm 3.1 V1: 3M-Split

Require: A0A_0, A1A_1, B0B_0, B1B_1 distributed over PP processors; group id g∈{1,2,3}g \in\{1,2,3\}

  1. Partition the PP processors into 3 disjoint groups of size P/3P/3

  2. Scatter (A0,B0)(A_0,B_0) to group 1, (A1,B1)(A_1,B_1) to group 2, (A0+A1,B0+B1)(A_0+A_1,B_0+B_1) to group 3

  3. concurrently: each group gg computes Qg←RealMatMul⁡(⋅,⋅)Q_g \leftarrow\operatorname{RealMatMul}(\cdot,\cdot) using its P/3P/3 processors

  4. Gather Q1,Q2,Q3Q_1,Q_2,Q_3; combine ℜ(C)=Q1−Q2\Re(C)=Q_1-Q_2, ℑ(C)=Q3−Q1−Q2\Im(C)=Q_3-Q_1-Q_2

Algorithm 3.2 V2: In-place 3M

Require: Local blocks A0A_0, A1A_1, B0B_0, B1B_1, resident identically on every one of the PP processors (no scatter or gather needed)

Ensure: Local blocks ℜ(C)\Re(C), ℑ(C)\Im(C)

  1. Q1←RealMatMul⁡(A0,B0)Q_1 \leftarrow\operatorname{RealMatMul}(A_0,B_0) ▷ 1st of 3 real matrix products

  2. Q2←RealMatMul⁡(A1,B1)Q_2 \leftarrow\operatorname{RealMatMul}(A_1,B_1) ▷ 2nd of 3 real matrix products

  3. Q3←RealMatMul⁡(A0+A1,B0+B1)Q_3 \leftarrow\operatorname{RealMatMul}(A_0+A_1,B_0+B_1) ▷ 3rd, on the two summed operands

  4. ℜ(C)←Q1−Q2\Re(C)\leftarrow Q_1-Q_2 ▷ combine via the 3M identity (1.2)

  5. ℑ(C)←Q3−Q1−Q2\Im(C)\leftarrow Q_3-Q_1-Q_2

variants of qq are used throughout (Table 5.1): classical, q=18q=18 [48]; Winograd, q=15q=15 [59]; Karstadt-Schwartz, q=12q=12 [34], split as 6+6 encoding/decoding. This gives θ2D(ω0)≈0.5963\theta_{2D}(\omega_0)\approx0.5963, θ3D(ω0)≈0.7309\theta_{3D}(\omega_0)\approx0.7309, both larger than classical’s, since ω0<3\omega_0<3 pushes θ\theta toward the θ→1\theta\to1 limit at ω→2\omega\to2.

CAPS [36, 5] realizes Strassen in distributed memory by nesting its 7-way split inside a 2.5D-style layout: as many Strassen levels as memory MM allows, replicating across processors, before falling back to classical 2.5D. Its arithmetic profile is exactly cM=1c_M=1, cA=q/3c_A=q/3 regardless of PP or replication (only communication changes, as in §2.2); it is proven communication-optimal, achieving the BDHS bound at ω=ω0\omega=\omega_0 across the same θ2D(ω0)\theta_{2D}(\omega_0)-to-θ3D(ω0)\theta_{3D}(\omega_0) family as 2.5D. We use this θ(ω0)\theta(\omega_0) family directly in §5, rather than re-deriving CAPS’s internal engineering constants.

Algorithms

We now formally define V1, V2, V3 (introduced in §1) and prove that each correctly computes C=A×BC=A\times B. §4 analyzes their arithmetic cost, communication cost, and memory footprint.

V1: 3M-Split (our proposal).

Algorithm 3.1 partitions the PP processors into three disjoint groups of P/3P/3; each group computes one of Q1Q_1, Q2Q_2, Q3Q_3 concurrently using the real algorithm at reduced processor count.

Lemma 3.1 (V1 is correct). Algorithm 3.1 computes C=A×BC=A\times B exactly.

Proof. By construction, group 1 computes Q1=A0B0Q_1=A_0B_0, group 2 computes Q2=A1B1Q_2=A_1B_1, and group 3 computes Q3=(A0+A1)(B0+B1)Q_3=(A_0+A_1)(B_0+B_1), each using only the operand blocks scattered to it. Expanding Q3−Q1−Q2=(A0+A1)(B0+B1)−A0B0−A1B1=A0B1+A1B0Q_3-Q_1-Q_2=(A_0+A_1)(B_0+B_1)-A_0B_0-A_1B_1=A_0B_1+A_1B_0 shows ℜ(C)=Q1−Q2=A0B0−A1B1\Re(C)=Q_1-Q_2=A_0B_0-A_1B_1 and ℑ(C)=Q3−Q1−Q2=A0B1+A1B0\Im(C)=Q_3-Q_1-Q_2=A_0B_1+A_1B_0 match the direct definition of complex multiplication exactly. Partitioning processors into disjoint groups does not affect this identity, since each QgQ_g depends only on its own two operand blocks, which are fully available to group gg after the scatter step.

V2: In-place 3M.

Algorithm 3.2 performs a single pass of the real algorithm’s communication schedule, moving complex-valued (twice the bytes of real-valued) data, with the local, in-place computation restructured to use the 3M identity (1.2) instead of the direct 4-multiplication formula: every processor locally forms Q1,Q2,Q3Q_1,Q_2,Q_3 from its resident blocks of A0,A1,B0,B1A_0,A_1,B_0,B_1 and combines them as ℜ(C)=Q1−Q2\Re(C)=Q_1-Q_2, ℑ(C)=Q3−Q1−Q2\Im(C)=Q_3-Q_1-Q_2.

Lemma 3.2 (V2 is correct). Algorithm 3.2 computes C=A×BC=A\times B exactly.

Proof. Identical to Lemma 3.1’s algebraic argument: V2 forms the same three products Q1,Q2,Q3Q_1,Q_2,Q_3 and combines them the same way, the only difference being that all three are computed locally on each processor’s already-resident data instead of being distributed across three disjoint groups. The combination step is unchanged, so correctness follows from the same expansion of Q3−Q1−Q2Q_3-Q_1-Q_2.

V3: Standard.

Algorithm 3.3 uses the identical communication schedule as V2 (no change to what data moves, when, or in what quantity), with local blocks combined via the direct 4-multiplication formula, instead: every processor forms ℜ(C)=A0B0−A1B1\Re(C)=A_0B_0-A_1B_1 and ℑ(C)=A0B1+A1B0\Im(C)=A_0B_1+A_1B_0 entry-by-entry from its resident blocks, within a single pass (§1).

Lemma 3.3 (V3 is correct). Algorithm 3.3 computes C=A×BC=A\times B exactly.

Proof. Immediate from the definition of complex multiplication: expanding (A0+iA1)(B0+iB1)(A_0+iA_1)(B_0+iB_1) gives ℜ(C)=A0B0−A1B1\Re(C)=A_0B_0-A_1B_1 and ℑ(C)=A0B1+A1B0\Im(C)=A_0B_1+A_1B_0 directly, with no intermediate identity to verify.

Analysis

We now give closed-form cost expressions for V1, V2, V3 (§3), using the arithmetic and

Algorithm 3.3 V3: Standard

Require: Local blocks A0,A1,B0,B1A_0,A_1,B_0,B_1 (real, imaginary parts of A,BA,B), resident identically on every one of the PP processors (same layout as V2, Algorithm 3.2; no scatter or gather needed)

Ensure: Local blocks R(C),I(C)\mathfrak{R}(C),\mathfrak{I}(C)

  1. R(C),I(C)←0\mathfrak{R}(C),\mathfrak{I}(C) \leftarrow0 ▷ initialize local output blocks

  2. for each local output entry (i,j)(i,j) do

  3. for each contraction index ℓ\ell do ▷ accumulate over ℓ\ell: the real algorithm’s own schedule (§1), one matrix multiplication, not 3 or 4 separate ones

  4. a,b←(A0)iℓ,(A1)iℓa,b \leftarrow(A_0)_{i\ell},(A_1)_{i\ell} ▷ real, imaginary parts of AiℓA_{i\ell}

  5. c,d←(B0)ℓj,(B1)ℓjc,d \leftarrow(B_0)_{\ell j},(B_1)_{\ell j} ▷ real, imaginary parts of BℓjB_{\ell j}

  6. R(C)ij←R(C)ij+ac−bd\mathfrak{R}(C)_{ij} \leftarrow\mathfrak{R}(C)_{ij}+ac-bd ▷ trivial complex-multiply formula, 4 real mults

  7. I(C)ij←I(C)ij+ad+bc\mathfrak{I}(C)_{ij} \leftarrow\mathfrak{I}(C)_{ij}+ad+bc

  8. end for

  9. end for

communication leading coefficients of §2. For a real-matrix-multiplication primitive of arithmetic exponent ω\omega, write F(n,P)=nω/PF(n,P)=n^\omega/P for the per-processor multiplication count (§2.1). Write c1c_1 for the leading coefficient of one real product’s combined arithmetic (c1=2c_1=2 for classical, by §2.2; c1=1+q/3c_1=1+q/3 for Strassen, by §2.5). Write c2c_2 for the corresponding coefficient of the direct 4M (or k2k^2-product) formula applied via the standard single-pass schedule, and c1TCc_1^{\mathrm{TC}} for the 3M/Toom-Cook-kk analogue.

TV1(n,P)=c1γF(n,P/3)+βBW(n,P/3)+αS(n,P/3)+Tredist,(4)T_{V1}(n,P)=c_1\gamma F(n,P/3)+\beta BW(n,P/3) +\alpha S(n,P/3)+T_{\mathrm{redist}}, \tag*{(4)}

where c1c_1 here denotes the combined (mult+add) coefficient of one real product (c1=2c_1=2 classical, §2.2).

Tredist=2βn2P/3+2αT_{\mathrm{redist}}=2\beta\frac{n^2}{P/3}+2\alpha approximates the one-time cost of scattering A0,A1,B0,B1A_0,A_1,B_0,B_1 into their respective groups. It also covers gathering and combining Q1,Q2,Q3Q_1,Q_2,Q_3 at the end, via a direct peer-to-peer exchange between corresponding processors in the three groups.

TV2(n,P)=c13MγF(n,P)+2βBW(n,P)+αS(n,P),(5)T_{V2}(n,P)=c_1^{3\mathrm{M}}\gamma F(n,P) +2\beta BW(n,P)+\alpha S(n,P), \tag*{(5)}

where c13Mc_1^{3\mathrm{M}} is the local-arithmetic (combined mult+add) coefficient of the 3M-decomposed computation. For classical matrix multiplication, c13M=3+3=6c_1^{3\mathrm{M}}=3+3=6 (§2.3). For Strassen, c13Mc_1^{3\mathrm{M}} is the fused-leaf coefficient derived in §5, which is not simply 3c13c_1.

TV3(n,P)=c2γF(n,P)+2βBW(n,P)+αS(n,P).(6)T_{V3}(n,P)=c_2\gamma F(n,P) +2\beta BW(n,P)+\alpha S(n,P). \tag*{(6)}

For classical matrix multiplication, c2=4c_2=4 (§2.3). F(n,P)=n3/PF(n,P)=n^3/P carries both the multiplication and addition leading coefficients equally (§2.2), so the total arithmetic coefficient in (4.3) is c2M+c2A=4+4=8c_2^{M}+c_2^{A}=4+4=8. We write this as c2=8c_2=8 throughout when referring to the combined (mult+add) leading coefficient, consistent with §2.3.

Proposition 4.1 (V2 and V3 share bandwidth and latency). TV2(n,P)−TV3(n,P)=(c13M−c2)γF(n,P)T_{V2}(n,P)-T_{V3}(n,P)=(c_1^{3\mathrm{M}}-c_2)\gamma F(n,P), a pure arithmetic difference with no bandwidth or latency term.

Proof. Immediate from (4.2) and (4.3): both use the identical 2βBW(n,P)+αS(n,P)2\beta BW(n,P)+\alpha S(n,P) communication term, since the local restructuring from 4M to 3M changes only which arithmetic is performed on already-resident data, not what is communicated or when.

Communication and arithmetic are not the only place one might expect V2 and V3 to differ. V2’s identity (1.2) introduces a third product, Q3=(A0+A1)(B0+B1)Q_3=(A_0+A_1)(B_0+B_1), whose operands are not among the original four input blocks. A naive implementation that materializes both sums as brand-new temporaries before calling an existing real-matrix-multiplication routine three times needs 8 blocks of size n2/Pn^2/P at peak (the 4 inputs, 2 outputs, and 2 sum temporaries, all simultaneously resident at the moment Q3Q_3 is computed), a 33% increase over V3’s 6. This naive ordering is not forced, however.

Proposition 4.2 (V2’s memory footprint need not exceed V3’s). V2 admits an implementation with the same peak local memory footprint as V3: 6 blocks of size n2/Pn^2/P (the four input blocks A0,A1,B0,B1A_0,A_1,B_0,B_1 and the two output blocks R(C),I(C)\mathfrak{R}(C),\mathfrak{I}(C)), using only calls to an existing real-matrix-multiplication routine and no additional temporary storage.

Proof. The following order computes C=A×BC=A\times B using only the six buffers A0,A1,B0,B1,R(C),I(C)A_0,A_1,B_0,B_1,\mathfrak{R}(C),\mathfrak{I}(C), reusing each as its original value becomes unneeded, and no others:

  1. R(C)←RealMatMul⁡(A0,B0)\mathfrak{R}(C)\leftarrow\operatorname{RealMatMul}(A_0,B_0), giving Q1Q_1, written directly into the output buffer.

  1. I(C)←RealMatMul⁡(A1,B1)\mathfrak{I}(C)\leftarrow\operatorname{RealMatMul}(A_1,B_1), giving Q2Q_2, written directly into the output buffer.

  1. A0←A0+A1A_0\leftarrow A_0+A_1 in place: A0A_0’s original value is no longer needed, since step 1 already consumed it.

  1. B0←B0+B1B_0\leftarrow B_0+B_1 in place: B0B_0’s original value is no longer needed, since step 1 already consumed it.

  1. A1←RealMatMul⁡(A0,B0)A_1\leftarrow\operatorname{RealMatMul}(A_0,B_0), giving Q3=(A0+A1)(B0+B1)Q_3=(A_0+A_1)(B_0+B_1) from the now-overwritten sum buffers, written into the now-free A1A_1 buffer; B0,B1B_0,B_1 are not needed again.

  1. R(C)←R(C)−I(C)\mathfrak{R}(C) \leftarrow\mathfrak{R}(C)-\mathfrak{I}(C), giving Q1−Q2Q_1-Q_2, the correct R(C)\mathfrak{R}(C).

  1. I(C)←A1−R(C)−2I(C)\mathfrak{I}(C) \leftarrow A_1-\mathfrak{R}(C)-2\mathfrak{I}(C): since A1=Q3A_1=Q_3 and, at this point, R(C)=Q1−Q2\mathfrak{R}(C)=Q_1-Q_2 (from step 6) while I(C)\mathfrak{I}(C) still holds Q2Q_2 (unchanged by step 6), this computes Q3−(Q1−Q2)−2Q2=Q3−Q1−Q2Q_3-(Q_1-Q_2)-2Q_2=Q_3-Q_1-Q_2, the correct I(C)\mathfrak{I}(C).

No seventh buffer is used at any point, and each of the three real-matrix-multiplication calls (steps 1, 2, 5) is an ordinary call to an unmodified existing routine.

The naive 8-block ordering is therefore an implementation choice, not a consequence of the 3M identity itself or of reusing an existing real-matrix-multiplication routine: the reordering above achieves V3’s footprint exactly, using nothing beyond ordinary buffer management in the calling code.

This decomposes the three-way comparison cleanly: V2 vs. V3 is a comparison of the constants c13Mc_1^{\mathrm{3M}} and c2c_2 alone (§4.1), while V1 vs. V2 is governed entirely by how communication scales under processor-splitting (§4.2). Both share the same compute time, by Theorem 4.3.

Theorem 4.3 (Flop-time invariance). TV1T_{V1} and TV2T_{V2} have identical compute-time terms whenever c13M=3c1c_1^{\mathrm{3M}}=3c_1 (true for classical matrix multiplication; see §5 for the Strassen case, where it does not hold):

3c1γF(n,P)=c1γF(n,P/3).3c_1\gamma F(n,P)=c_1\gamma F(n,P/3).

Proof. F(n,P/3)=nω/(P/3)=3F(n,P)F(n,P/3)=n^\omega/(P/3)=3F(n,P), so c1γF(n,P/3)=3c1γF(n,P)c_1\gamma F(n,P/3)=3c_1\gamma F(n,P).

For classical matrix multiplication, Theorem 4.3 isolates the V1-vs-V2 comparison to communication alone. Partitioning PP processors into three concurrent groups of P/3P/3 costs exactly as much total processor-time as applying the 3M-restructured local computation to the entire problem at full PP.

V2 vs. V3: is 3M worth doing at all?

For classical matrix multiplication, c13M=6<c2=8c_1^{\mathrm{3M}}=6<c_2=8 (§2.3), so by Proposition 4.1, TV2<TV3T_{V2}<T_{V3} unconditionally. The margin is a fixed absolute quantity, 2γF(n,P)2\gamma F(n,P), that becomes a vanishing fraction of total time as P→∞P\to\infty, since the identical communication term comes to dominate, but it never reverses. This matches BLIS’s real-world design choice [57]. Restructuring the local kernel is free with respect to communication, so there is no reason not to do it.

For Strassen, this conclusion reverses (§5): the fused-leaf coefficient c13Mc_1^{\mathrm{3M}} exceeds c2c_2, so TV2>TV3T_{V2}>T_{V3} unconditionally; in-place 3M is strictly worse than standard, for any PP.

V1 vs. V2: is splitting worth it?

Theorem 4.4 (Bandwidth crossover). Comparing bandwidth terms alone, V1’s is smaller than V2’s iff the bandwidth-coefficient ratio 3θ(ω)3^{\theta(\omega)} (V1, from BW(n,P/3)=3θ(ω)BW(n,P)BW(n,P/3)=3^{\theta(\omega)}BW(n,P)) is less than 22 (V2, from the complex-data doubling):

3θ(ω)<2⟺θ(ω)<θ∗=log⁡32≈0.6309.3^{\theta(\omega)}<2 \Longleftrightarrow\theta(\omega)<\theta^*=\log_3 2\approx0.6309.

Proof. By Theorem 4.3 (when it applies) the compute terms of TV1T_{V1} and TV2T_{V2} are equal, so comparing bandwidth terms in isolation, 3βBW(n,P/3)3\beta BW(n,P/3) against 2βBW(n,P)2\beta BW(n,P), and solving 3θ=23^\theta=2 for θ\theta gives the stated threshold.

This threshold governs the bandwidth terms alone, deliberately set aside from latency. It does not, by itself, determine the eventual winner: bandwidth shrinks with PP while latency grows, so for PP large enough latency dominates absolutely in both layouts, regardless of ω\omega, and the true P→∞P\to\infty limit is decided by latency, not bandwidth.

Lemma 4.5 (Latency dominance). Suppose V1 splits PP processors into mm groups (so each computes at P/mP/m processors), with a fixed redistribution overhead whose latency contribution is 2α2\alpha. As P→∞P\to\infty, for any layout with bandwidth BW(n,P)=Θ(n2/Pθ(ω))→0BW(n,P)=\Theta(n^2/P^{\theta(\omega)})\to0:

  1. If S(n,P)=Θ(Pρ)S(n,P)=\Theta(P^\rho) for some ρ>0\rho>0 (polynomial growth), latency eventually dominates bandwidth in both TV1T_{V1} and TV2T_{V2}, giving TV1/TV2→m−ρ<1T_{V1}/T_{V2}\to m^{-\rho}<1: V1 wins, by a margin independent of ω\omega.

  1. If S(n,P)=Θ(log⁡P)S(n,P)=\Theta(\log P) (logarithmic growth), latency again eventually dominates, but the finite absolute gap S(n,P)−S(n,P/m)=log⁡2mS(n,P)-S(n,P/m)=\log_2 m now competes against the redistribution overhead’s fixed cost 2α2\alpha: TV1/TV2→1T_{V1}/T_{V2}\to1, with V1 ahead iff log⁡2m>2\log_2m>2.

Proof. In case 1, BW(n,P)→0BW(n,P)\to0 while S(n,P)→∞S(n,P)\to\infty, so for PP large enough αS(n,P)\alpha S(n,P) dominates 2βBW(n,P)2\beta BW(n,P) in TV2T_{V2}, and likewise for TV1T_{V1}; the ratio of latency terms is S(n,P/m)/S(n,P)=(P/m)ρ/Pρ=m−ρS(n,P/m)/S(n,P)=(P/m)^\rho/P^\rho=m^{-\rho}, giving the stated limit. In case 2, the same domination holds, but S(n,P)−S(n,P/m)=log⁡2P−log⁡2(P/m)=log⁡2mS(n,P)-S(n,P/m)=\log_2P-\log_2(P/m)=\log_2m exactly, a constant; dividing TV1−TV2→(log⁡2m−2)αT_{V1}-T_{V2}\to(\log_2m-2)\alpha by TV2→∞T_{V2}\to\infty gives TV1/TV2→1T_{V1}/T_{V2}\to1, from below when log⁡2m>2\log_2m>2 and from above otherwise.

Corollary 4.6 (True asymptotic winner). As P→∞P\to\infty, TV1/TV2→13≈0.5774T_{V1}/T_{V2}\to\frac{1}{\sqrt{3}}\approx0.5774 for 2D, and →1\to1 for 3D, in both cases independent of ω\omega. V1 therefore wins asymptotically in 2D for every arithmetic exponent, by exactly 1−13≈42.3%1-\frac{1}{\sqrt{3}}\approx42.3\%; V2 remains at least as good asymptotically in 3D for every ω≤3\omega\le3, the gap vanishing as a fraction of total time but never reversing.

Proof. Lemma 4.5 with m=3m=3: for 2D, S(n,P)=Θ(P)S(n,P)=\Theta(\sqrt{P}) is case 1 with ρ=12\rho=\frac12, giving TV1/TV2→3−1/2T_{V1}/T_{V2}\to3^{-1/2};

for 3D, S(n,P)=Θ(log⁡P)S(n,P)=\Theta(\log P) is case 2, and log⁡23≈1.585<2\log_{2}3 \approx1.585 < 2, so V2 remains ahead. This holds even when θ(ω)>θ∗\theta(\omega)>\theta^{*}, where Theorem 4.4’s bandwidth comparison alone would favor V2: bandwidth only delays the point at which V1 begins to win in 2D, since it is eventually dominated by latency regardless of its own sign.

Classical 2D favors V1 at scale, converging to the universal 1−1/3≈42.3%1-1/\sqrt{3}\approx42.3\% reduction of Corollary 4.6 regardless of ω\omega; classical 3D never favors V1, converging instead to a vanishing gap in V2’s favor. Theorem 4.4’s bandwidth threshold still matters in both layouts, not for the sign of the eventual winner in 2D, which is unconditional, but for how large PP must be before that winner is realized: an algorithm with θ(ω)<θ∗\theta(\omega)<\theta^{*} (classical, Strassen) reaches the 2D asymptote at smaller PP than one with θ(ω)>θ∗\theta(\omega)>\theta^{*} would, though both converge to the same limit.

Lemma 4.7 (V1 dominates 3M-sequential). A strategy that runs the three products sequentially on all PP processors, Tseq(n,P)=3(c1γF(n,P)+βBW(n,P)+αS(n,P))T_{\mathrm{seq}}(n,P)=3(c_{1}\gamma F(n,P)+\beta BW(n,P)+\alpha S(n,P)), is dominated by V1 at every P≥3P\geq3: TV1≤TseqT_{\mathrm{V1}}\leq T_{\mathrm{seq}}, since the compute terms are equal (Theorem 4.3) while 3θ(ω)≤33^{\theta(\omega)}\leq3 and the latency ratios above are both <1<1. We therefore omit 3M-sequential from the main comparison.

The full 2.5D range: a critical replication factor.

Theorem 4.4 compares only the two endpoints, c=1c=1 and c=P1/3c=P^{1/3}. The same bandwidth-only argument extends to every intermediate cc, giving a single number that separates "split" from "don’t split" for a fixed, moderate PP; as in §4.2, the true P→∞P\to\infty limit is a separate question, taken up below.

Corollary 4.8 (Critical replication factor, bandwidth-only). Write c=Psc=P^{s} for s∈[0,13]s\in[0,\frac{1}{3}], so s=0s=0 is 2D and s=13s=\frac{1}{3} is 3D. Substituting M=Θ(cn2/P)M=\Theta(cn^{2}/P) into the BDHS bound (3) gives a bandwidth exponent linear in ss,

θ(s;ω)=(2−ω2)+s(ω2−1),\theta(s;\omega)=\left(2-\frac{\omega}{2}\right)+s\left(\frac{\omega}{2}-1\right),

which recovers θ2D(ω)\theta_{2D}(\omega) at s=0s=0 and θ3D(ω)\theta_{3D}(\omega) at s=13s=\frac{1}{3}. Comparing bandwidth terms alone, V1 beats V2 exactly when c<c∗c<c^{*}, where

c∗=Ps∗(ω),s∗(ω)=θ∗−(2−ω2)ω2−1.c^{*}=P^{s^{*}(\omega)},\qquad s^{*}(\omega)=\frac{\theta^{*}-\left(2-\frac{\omega}{2}\right)}{\frac{\omega}{2}-1}.

Proof. Solve θ(s;ω)=θ∗\theta(s;\omega)=\theta^{*} for ss, using the linear form above.

For classical matrix multiplication (ω=3\omega=3), this simplifies to s∗=log⁡3(4/3)≈0.262s^{*}=\log_{3}(4/3)\approx0.262, so c∗=Plog⁡3(4/3)c^{*}=P^{\log_{3}(4/3)}: splitting (V1) beats in-place restructuring (V2), comparing bandwidth alone, for any replication up to roughly 79% of the way, in log⁡c\log c, from 2D to full 3D replication.

Corollary 4.9 (True asymptotic winner, general cc). As P→∞P\to\infty with s∈[0,13)s\in[0,\frac{1}{3}) fixed, TV1/TV2→3(3s−1)/2T_{\mathrm{V1}}/T_{\mathrm{V2}}\to3^{(3s-1)/2}, independent of ω\omega: V1 wins for every s<13s<\frac{1}{3}, by a margin shrinking continuously to 0 as s→13s\to\frac{1}{3}. Only at the exact endpoint s=13s=\frac{1}{3} does this reverse, per Corollary 4.6: there V2 remains asymptotically ahead by a vanishing margin. The bandwidth-only threshold c∗c^{*} of Corollary 4.8 is therefore not the true asymptotic crossover point; there is none in the interior of [0,13)[0,\frac{1}{3}), since V1 wins throughout it. c∗c^{*} instead marks, at finite PP, where the bandwidth term’s own sign changes, and remains the practically relevant threshold, since the PP required to observe the true asymptote grows unboundedly as s→13s\to\frac{1}{3}: at s=0.3s=0.3, for instance, this requires PP beyond 105010^{50}, far past any physical system, whereas c∗c^{*} correctly predicts the finite-PP sign already at P=318P=3^{18}.

Proof. For s<13s<\frac{1}{3}, S(n,P,c)=Θ(P/c3)=Θ(P(1−3s)/2)S(n,P,c)=\Theta(\sqrt{P/c^{3}})=\Theta(P^{(1-3s)/2}): Lemma 4.5’s case 1 with m=3m=3, ρ=(1−3s)/2>0\rho=(1-3s)/2>0, giving TV1/TV2→3−(1−3s)/2=3(3s−1)/2T_{\mathrm{V1}}/T_{\mathrm{V2}}\to3^{-(1-3s)/2}=3^{(3s-1)/2}, strictly less than 1. As s→13s\to\frac{1}{3}, ρ→0\rho\to0, so the PP at which this term overtakes bandwidth and TredistT_{\mathrm{redist}} grows without bound, diverging exactly at s=13s=\frac{1}{3}, where S=Θ(log⁡P)S=\Theta(\log P) instead and Corollary 4.6’s case 2 takes over.

Extension to Fast Matrix Multiplication

Applying (3) with ω=ω0=log⁡27≈2.8074\omega=\omega_{0}=\log_{2}7\approx2.8074 gives θ2D(ω0)≈0.5963<θ∗\theta_{2D}(\omega_{0})\approx0.5963<\theta^{*} and θ3D(ω0)≈0.7309>θ∗\theta_{3D}(\omega_{0})\approx0.7309>\theta^{*}, the same qualitative split as classical, with a larger margin on the unfavorable 3D side (0.10 vs. classical’s 0.036).

Corollary 4.8’s critical replication factor makes this margin concrete. Instantiating s∗(ω)s^{*}(\omega) at ω=ω0\omega=\omega_{0} gives s∗(ω0)≈0.0857s^{*}(\omega_{0})\approx0.0857, so c∗=P0.0857c^{*}=P^{0.0857}, compared to classical’s P0.262P^{0.262}: Strassen’s favorable window closes after only about 26% of the way (in log⁡c\log c) from 2D to full 3D replication, versus classical’s 79%. This is the limited-memory case sharpened: on any 2.5D layout with even modest replication, splitting for Strassen stops paying off far sooner than it does for classical matrix multiplication, since Strassen’s larger θ3D(ω0)\theta_{3D}(\omega_{0}) leaves much less room in ss before crossing θ∗\theta^{*}. As Corollary 4.9 shows, this narrower window is a finite-PP, bandwidth-only statement: at astronomically large PP, splitting remains favorable for Strassen too, throughout the entire interior of the 2.5D range, the same as classical.

The arithmetic constants require more care. Recall from §2.5 that qq is the number of matrix additions per Strassen recursion level, split as q=qenc+qdecq=q_{\mathrm{enc}}+q_{\mathrm{dec}}: encoding forms the 7 operand pairs from AA and BB’s quadrants, and decoding recombines the 7 products into CC’s quadrants. Solving the standard recursions gives

c1=1+q3,c2=6+2q3,c_{1}=1+\frac{q}{3},\qquad c_{2}=6+\frac{2q}{3},

for one real Strassen product and for direct-complex n→∞n \to\infty. The qq (enc/dec) split for each variant is an established result, cited per row. V1’s coefficient is c1c_1 itself, since each of its three groups computes only one real product; its comparison against V2/V3 depends on PP and layout, reported in Table 6.2.

LayoutPPV2:V3BWLatency
2D8.1×1018.1 \times10^{1}+7.1%+7.1\%−3.7%-3.7\%−42.3%-42.3\%
2D5.9×1045.9 \times10^{4}+2.2%+2.2\%−3.7%-3.7\%−42.3%-42.3\%
2D4.3×1074.3 \times10^{7}+0.00%+0.00\%−3.7%-3.7\%−42.3%-42.3\%
3D8.1×1018.1 \times10^{1}+7.1%+7.1\%+11.6%+11.6\%−25.0%-25.0\%
3D5.9×1045.9 \times10^{4}+6.2%+6.2\%+11.6%+11.6\%−10.0%-10.0\%
3D4.3×1074.3 \times10^{7}+0.04%+0.04\%+11.6%+11.6\%−6.3%-6.3\%

Table 6.2. Strassen algorithm: arithmetic (V2:V3), communication (V1:V2 BW, latency).

Strassen, respectively. The latter treats each of the qq additions per level as a complex operation, a factor-2 cost. Direct-complex Strassen is the natural realization of V3 for a recursive algorithm: it applies Strassen’s own recursion directly to complex-typed data, with a naive complex leaf. Now consider c13Mc_1^{\mathrm{3M}}, the coefficient for in-place 3M, or fused-leaf Strassen. This carries two real channels through Strassen’s recursive splitting, applies the Gaussian trick only at the scalar base case, and recombines three channels at every level. The encoding phase is paid twice (once per channel) and the decoding phase three times (once per output channel). This gives the per-level recursion

c13M(n)=7c13M(n/2)+[2qenc+3qdec](n/2)2,c_1^{\mathrm{3M}}(n)=7c_1^{\mathrm{3M}}(n/2)+[2q_{\mathrm{enc}}+3q_{\mathrm{dec}}](n/2)^2,

with leaf value 5 (the Gaussian trick’s 3 multiplies + 2 adds). Solving:

c13M=5+2qenc+3qdec3.c_1^{\mathrm{3M}}=5+\frac{2q_{\mathrm{enc}}+3q_{\mathrm{dec}}}{3}.

Table 5.1 instantiates c1c_1, c2c_2, and c13Mc_1^{\mathrm{3M}} for the three Strassen variants introduced in §2.5: classical, Winograd, and Karstadt-Schwartz. It uses the classical split qenc=10q_{\mathrm{enc}}=10, qdec=8q_{\mathrm{dec}}=8 and the Karstadt-Schwartz split qenc=6q_{\mathrm{enc}}=6, qdec=6q_{\mathrm{dec}}=6. In both cases c13M>c2c_1^{\mathrm{3M}}>c_2: in-place 3M is worse than standard. The decoding phase’s 3× tax outweighs the multiplication savings, regardless of which variant’s absolute addition count is used.

Variantqq (enc/dec)c1c_1 (V1)c2c_2c13Mc_1^{\mathrm{3M}} (V2)V2 vs. V3
Classical [48]18 (10/8)71819.67+9.3% worse
Winograd [59]15 (8/7)61617.33+8.3% worse
Karstadt-Schwartz [34]12 (6/6)51415.00+7.1% worse

Table 5.1. Strassen arithmetic coefficients, three variants.

Using the literature-verified q=12q=12 split [34], c1=5c_1=5, c2=14c_2=14, c13M=15c_1^{\mathrm{3M}}=15: V2 (in-place 3M) is 7.1% worse than V3 (standard) unconditionally, at any PP, for any layout. This is the opposite ranking from classical matrix multiplication, and it holds regardless of which Strassen variant supplies the addition count; using the correct (rather than the commonly-assumed classical) constants roughly halves the size of the reversal but does not change its direction. CAPS (§2.5) realizes V1’s split-groups strategy at Strassen’s arithmetic exponent, giving communication terms BW(n,P/3)BW(n,P/3), S(n,P/3)S(n,P/3) governed by the same θ2D(ω0)\theta_{2D}(\omega_0), θ3D(ω0)\theta_{3D}(\omega_0) derived above.

Numerical Results

Throughout this section, all values use γ=β=2.5×10−10 s\gamma=\beta=2.5\times10^{-10}\,\mathrm{s}, α=10−6 s\alpha=10^{-6}\,\mathrm{s}, n=2000n=2000. Each table reports both memory regimes of §2.2: 2D (limited memory) and 3D (unlimited memory). A negative value denotes a cost reduction (the left-hand strategy is cheaper); a positive value denotes a cost increase. We report V2-vs-V3 (arithmetic) and V1-vs-V2 (communication) as two separate, independent comparisons throughout, never combined into a single figure: a reduction in one is not a reduction in the other, and the two do not add. All values below were cross-checked against a consistency-check simulator provided as supplementary material: it independently derives per-processor flop counts, bytes moved, message counts, and peak memory footprint from each layout’s literal communication pattern, under the same α\alpha-β\beta-γ\gamma model, and checks these against the closed-form model used throughout this paper. This confirms the closed forms are algebraically consistent with the model’s own assumptions; it is not a check of those assumptions against a real distributed implementation (§9).

n=2000n=2000. From §2.3, Theorem 4.4, Lemma 4.5, and Corollary 4.6.

Classical matrix multiplication.

Table 6.1 confirms the predicted decomposition. V2-vs-V3 holds at exactly its 25% reduction (=(k−1)2/k2=(k-1)^2/k^2 at k=2k=2, §2.3) at small-to-moderate PP for both layouts, decaying toward 0% only once communication dominates, slowly for 3D, quickly for 2D. Bandwidth is a fixed −13.4% for 2D and +4.0% for 3D at every PP (Theorem 4.4}); latency is a fixed −42.3% for 2D but shrinks toward 0% for 3D as $P$ grows (Corollary 4.6`). Since latency dominates as P→∞P\to\infty, it decides the eventual winner: split into groups on top of V2 for 2D at scale, never for 3D.

LayoutPPV2 [57]:V3BWLatency
2D8.1×1018.1\times10^1−25.0%−13.4%−42.3%
2D5.9×1045.9\times10^4−13.0%−13.4%−42.3%
2D4.8×1064.8\times10^6−0.04%−13.4%−42.3%
3D8.1×1018.1\times10^1−25.0%+4.0%−25.0%
3D5.9×1045.9\times10^4−23.5%+4.0%−10.0%
3D4.8×1064.8\times10^6−3.3%+4.0%−7.1%

Table 6.1. Classical matmul: arithmetic (V2:V3), communication (V1:V2 BW, latency).

Strassen (Karstadt-Schwartz split).

Table 6.2 shows the consequence of §5’s reversal: V2-vs-V3 is positive everywhere, so naively adopting in-place 3M is worse than doing nothing; a Strassen implementation built on the classical assumption needs correcting, not merely extending. Bandwidth is a fixed −3.7% n=2000n = 2000. From Table 5.1 and Corollary 4.8.

2D and +11.6%+11.6\% for 3D at every PP, larger in magnitude than classical’s since Strassen’s θ(ω0)\theta(\omega_0) sits further from θ∗\theta^* in both layouts; latency, however, is exactly the same as classical’s in both layouts, ω\omega-independent (Corollary 4.6): standard (V3) is the best strategy of the three for 3D-Strassen, at every scale we evaluated. Throughout, "Strassen" refers specifically to the Karstadt-Schwartz alternative-basis technique [34], the provably addition-optimal variant instantiated in Table 5.1.

Strassen (Karstadt-Schwartz split).

Generalizing to Multi-Digit Splits: Toom-Cook-kk and Precision Emulation

Gauss’s identity (§ 2.3) and Karatsuba’s precision split (below) are both the k=2k = 2 case of Toom-Cook-kk (§ 2.4). We derive the general V2-vs-V3 and V1-vs-V2 conditions once, as a function of kk, and instantiate both.

General coefficients and theorems.

Writing c1c_1 for one real product’s combined (mult+add) arithmetic, c2(k)=k2c1c_2(k) = k^2c_1 and c1TC(k)=(2k−1)c1c_1^{\mathrm{TC}}(k) = (2k-1)c_1 (§ 2.4).

Theorem 7.1 (V2 beats V3 for every k≥2k \ge2). For any k≥2k \ge2 and any base algorithm with no deep recursive recombination, c1TC(k)<c2(k)c_1^{\mathrm{TC}}(k) < c_2(k), with relative saving (k2−(2k−1))/k2=(k−1)2/k2(k^2 - (2k - 1))/k^2 = (k - 1)^2/k^2.

Proof. k2−(2k−1)=(k−1)2>0k^2 - (2k - 1) = (k - 1)^2 > 0 for integer k≥2k \ge2.

This generalizes the 25% saving already seen at k=2k = 2 (§ 2.3, and Karatsuba’s precision split below); the saving grows with kk: 44% at k=3k = 3, 56% at k=4k = 4, 64% at k=5k = 5, for any algorithm without Strassen-style recursive structure (Strassen is excluded since its own c1c_1 depends on how it is split, § 5).

Theorem 7.2 (Bandwidth crossover, general kk). Comparing bandwidth terms alone, V1’s is smaller than V2’s iff (2k−1)θ(ω)<k(2k-1)^{\theta(\omega)} < k, i.e., θ(ω)<θ∗(k):=log⁡2k−1k\theta(\omega) < \theta^*(k) := \log_{2k-1} k.

Proof. V2 moves kk digit matrices (bandwidth coefficient kk, from the complex-data-style channel doubling generalized to kk channels); V1 uses P/(2k−1)P/(2k-1) processors per group (bandwidth coefficient (2k−1)θ(ω)(2k - 1)^{\theta(\omega)}). Solve (2k−1)θ=k(2k - 1)^\theta= k for θ\theta. (V2 and V3 share bandwidth and latency, Proposition 4.1, so this is equally a comparison against standard, V3.)

θ∗(k)=ln⁡k/ln⁡(2k−1)\theta^*(k) = \ln k/\ln(2k - 1) is strictly increasing, θ∗(2)=log⁡32≈0.631\theta^*(2) = \log_3 2 \approx0.631, θ∗(k)→1\theta^*(k) \to1 as k→∞k \to\infty (confirmed numerically: 0.631, 0.683, 0.712, 0.733, 0.747 for k=2,…,6k = 2,\ldots,6), since higher-order splits push the outer exponent toward the ω→2\omega\to2 floor. As in §4.2, this threshold governs the bandwidth terms alone: it does not by itself decide the eventual winner, since bandwidth shrinks with PP while latency grows, so latency eventually dominates absolutely, regardless of ω\omega.

Corollary 7.3 (True asymptotic winner, general kk). As P→∞P \to\infty, TV1/TV2→12k−1T_{\mathrm{V1}}/T_{\mathrm{V2}} \to\frac{1}{\sqrt{2k-1}} for 2D, independent of ω\omega, for every kk (a reduction of 1−12k−11 - \frac{1}{\sqrt{2k-1}}). For 3D, TV1/TV2→1T_{\mathrm{V1}}/T_{\mathrm{V2}} \to1, with the sign of the vanishing gap governed by log⁡2(2k−1)\log_2(2k - 1) against 2, also independent of ω\omega. V1 remains asymptotically ahead only at k=2k = 2 (log⁡23≈1.585<2\log_2 3 \approx1.585 < 2); for every k≥3k \ge3 (log⁡25≈2.322>2\log_2 5 \approx2.322 > 2), V1 is asymptotically ahead instead, however small the margin.

Proof. Lemma 4.5 with m=2k−1m = 2k - 1 replacing 3: for 2D, ρ=12\rho= \frac{1}{2}, giving TV1/TV2→(2k−1)−1/2T_{\mathrm{V1}}/T_{\mathrm{V2}} \to(2k-1)^{-1/2}; for 3D, V1 is ahead iff log⁡2(2k−1)>2⟺2k−1>4⟺k≥3\log_2(2k-1) > 2 \Longleftrightarrow2k-1 > 4 \Longleftrightarrow k \ge3.

Corollary 7.4 (Higher-order splits rescue 3D). For every arithmetic exponent ω\omega, including both classical matrix multiplication and Karstadt-Schwartz Strassen, k=2k = 2 is asymptotically unfavorable for 3D and k=3k = 3 is the first to flip it favorable, by Corollary 7.3. This is ω\omega-independent: it is governed by log⁡2(2k−1)\log_2(2k - 1) against 2, not by θ∗(k)\theta^*(k) against θ3D(ω)\theta_{3D}(\omega). The bandwidth-based threshold of Theorem 7.2 still matters for how large PP must be before this asymptotic winner is realized, and there it does depend on ω\omega: for classical, θ∗(3)=0.683\theta^*(3) = 0.683 already exceeds θ3D=2/3≈0.667\theta_{3D} = 2/3 \approx0.667, so k=3k = 3’s bandwidth term alone favors V1; for Karstadt-Schwartz Strassen, θ∗(3)=0.683<θ3D(ω0)≈0.731\theta^*(3) = 0.683 < \theta_{3D}(\omega_0) \approx0.731, so k=3k = 3’s bandwidth term alone still favors V2, and only latency’s asymptotic dominance brings V1 ahead, meaning Strassen’s crossover in kk happens at a larger PP than classical’s, even though both eventually cross at the same k=3k = 3.

Combining both theorems into one finite-PP condition (V1 superior to standard iff positive):

save⁡(n,P,k)=N(n,P,k)k2+kx+y,where\operatorname{save}(n,P,k) = \frac{N(n,P,k)}{k^2 + kx + y}, \qquad\text{where}
N(n,P,k)=[k2−(2k−1)]+[kx−(2k−1)θx′]+[y−y′],N(n,P,k) = [k^2 - (2k - 1)] + [kx - (2k - 1)^\theta x'] + [y - y'],

with x=βBW(n,P)/(γc1F(n,P))x = \beta BW(n,P)/(\gamma c_1F(n,P)), y=αS(n,P)/(γc1F(n,P))y = \alpha S(n,P)/(\gamma c_1F(n,P)), and x′,y′x',y' the same ratios at P/(2k−1)P/(2k-1) processors. At finite PP the sign is governed jointly by the arithmetic term (k−1)2(k - 1)^2 (always helps) and the communication term (helps iff θ(ω)<θ∗(k)\theta(\omega) < \theta^*(k)); at asymptotically large PP, latency, not bandwidth, decides the outcome (Corollary 7.3).

kkP=102P = 10^{2}P=105P = 10^{5}P=108P = 10^{8}
2−13.4/−42.3−13.4/−42.3−13.4/−42.3
3−25.5/−55.3−25.5/−55.3−25.5/−55.3
4−33.9/−62.2−33.9/−62.2−33.9/−62.2
5−40.0/−66.7−40.0/−66.7−40.0/−66.7
6−44.7/−69.8−44.7/−69.8−44.7/−69.8

Table 7.2. V1:V2 bandwidth/latency, classical, 2D layout, per kk and PP. n=2000n = 2000. Each cell: bandwidth/latency change, in %. Negative = reduction, positive = increase. From Theorem 7.2 and Corollary 7.3. Unlike 3D, both columns are constant across PP here, since the 2D bandwidth and latency ratios do not depend on PP (Theorem 7.2, Lemma 4.5).

Table 7.1 confirms Corollary 7.4 directly, showing bandwidth and latency separately: bandwidth is negative (favorable) from k=3k = 3 onward and grows more favorable with kk, while k=2k = 2 stays positive (unfavorable); latency is favorable throughout, for every kk, but shrinks toward 0% as PP grows. For classical matrix multiplication specifically, θ∗(k)\theta^*(k) crossing θ3D\theta_{3D} already happens at k=3k = 3, so the bandwidth-only and true asymptotic crossovers coincide here; for algorithms where they do not (Strassen, §5), the asymptotic crossover in kk still occurs at k=3k = 3, but only at a larger PP than the bandwidth-only threshold alone would suggest.

kkP=102P = 10^{2}P=105P = 10^{5}P=108P = 10^{8}
2+4.0/−23.9+4.0/−9.5+4.0/−6.0
3−2.5/−35.0−2.5/−14.0−2.5/−8.7
4−8.5/−42.3−8.5/−16.9−8.5/−10.6
5−13.5/−47.7−13.5/−19.1−13.5/−11.9
6−17.6/−52.1−17.6/−20.8−17.6/−13.0

Table 7.1. V1:V2 bandwidth/latency, classical, 3D layout, per kk and PP. n=2000n = 2000. Each cell: bandwidth/latency change, in %. Negative = reduction, positive = increase. From Theorem 7.2 and Corollary 7.3.

The Karatsuba precision-emulation instance.

This framework applies unmodified to an unrelated setting: emulating a high-precision (FP64) matrix product from cheap low-precision (FP8/INT8) matrix multiplications, 100 to 500× faster per operation on recent accelerators [52]. Writing A′=sA(1)+A(2)A' = sA^{(1)} + A^{(2)}, B′=sB(1)+B(2)B' = sB^{(1)} + B^{(2)} for a base-ss, two-digit split, Uchino et al. [52] reduce the naive four-product formula to three, exactly the k=2k = 2 Toom-Cook shape with the complex (1,i)(1, i) basis replaced by a base-ss one: A′B′=s2C(1)+C(2)+s(C(3)−C(1)−C(2))A'B' = s^2 C^{(1)} + C^{(2)} + s(C^{(3)} - C^{(1)} - C^{(2)}) for C(x):=A(x)B(x)C^{(x)} := A^{(x)}B^{(x)}.

Theorems 7.1 and 7.2 transfer without modification: c1=2c_1 = 2, c1′=6c'_1 = 6, c2=8c_2 = 8, and splitting is worthwhile at scale for 2D, essentially never for 3D, at the same θ∗=log⁡32\theta^* = \log_3 2.

Two caveats apply here: our evaluation uses one shared γ\gamma, though the identity’s actual purpose is accessing a smaller low-precision γ\gamma, so the true crossover P∗P^* likely sits smaller than our numbers suggest; and the recombination carries the same cancellation risk Higham [28] documents for the Gaussian case, not yet checked independently for this instance, though a general error analysis of the broader Ozaki-II scheme has recently appeared [53].

General BFS Placement for Composed Bilinear Algorithms

The V1-vs-V2 question of §4.2 and its Toom-Cook-kk generalization are instances of a more general one: given two composed bilinear algorithms, an outer one calling an inner one, at which level should the single available processor split (a BFS step, in CAPS’s [36, 5] terminology) be placed? The answer is a closed-form threshold when the outer algorithm is size-preserving, as 3M and Toom-Cook-kk are, and a different, memory-driven criterion when it is size-reducing, as Strassen is; this is why CAPS’s own BFS/DFS choice is not an instance of our Theorem 7.2, despite the similarity.

Let A\mathcal{A} compute one product via mAm_A auxiliary bilinear products (its arity), each formed from fixed linear combinations of rAr_A channel blocks of the original operands, recombined in O(N2)O(N^2): Toom-Cook-kk splits into rA=kr_A = k channels and mA=2k−1m_A = 2k - 1 products, with Gauss’s identity the k=2k = 2 case (rA=2r_A = 2, mA=3m_A = 3). Let B\mathcal{B} realize each auxiliary product, with bandwidth exponent θB\theta_B on PP processors. BFS-A\mathcal{A} partitions PP into mAm_A groups of P/mAP/m_A, each computing one product via B\mathcal{B} concurrently (exactly V1 for Toom-Cook-kk); Fuse-into-B\mathcal{B} keeps all PP processors together, realizing B\mathcal{B}’s schedule once and moving all rAr_A channels together (exactly V2).

Theorem 8.1 (General BFS placement, size-preserving A\mathcal{A}). For size-preserving A\mathcal{A} of arity mAm_A, channel count rAr_A, composed with any B\mathcal{B} of communication exponent θB\theta_B, BFS-A\mathcal{A} communicates less than Fuse-into-B\mathcal{B} iff θB<θA∗:=log⁡mA(rA)\theta_B < \theta_A^* := \log_{m_A}(r_A).

Proof. As in Theorem 4.3, both strategies perform identical total arithmetic, so the comparison is bandwidth-only. Fuse-into-B\mathcal{B} moves rAr_A channels in one pass (coefficient rAr_A); BFS-A\mathcal{A} uses P/mAP/m_A processors per group (coefficient mAθBm_A^{\theta_B}). Solving mAθA=rAm_A^{\theta_A} = r_A gives θ=log⁡mArA\theta= \log_{m_A} r_A. □

This recovers Theorem 7.2 (mA=2k−1m_A = 2k - 1, rA=kr_A = k) and Theorem 4.4 (k=2k = 2) as special cases, and, instantiated at mA=3m_A = 3, rA=2r_A = 2, reproduces Table 6.1’s V1-vs-V2 savings exactly.

Theorem 8.1 assumes AA is size-preserving. Strassen’s recursive step is not: it reduces a size-NN product to mA=7m_A = 7 size-(N/2)(N/2) products, so the relevant comparison is BFS (7 concurrent groups of P/7P/7) versus DFS (the 7 subproblems sequentially on the full PP). An analogous calculation shows BFS’s bandwidth is θAθB−1\theta_A^{\theta_B-1} times DFS’s, so BFS communicates no more whenever θB<1\theta_B < 1, true for every algorithm here. This explains CAPS’s own BFS/DFS choice [36, 5]: BFS is communication-favorable essentially unconditionally for a size-reducing outer algorithm, so what CAPS trades off is memory, using BFS whenever the budget allows mAm_A-fold memory and DFS only when memory-constrained, a criterion orthogonal to Theorem 8.1’s.

Combining both cases: place BFS at AA if it is size-preserving and θB<θA∗\theta_B < \theta_A^*; otherwise fuse AA and ask the identical question one level deeper, of BB itself. Our outer algorithm (3M or Toom-Cook-kk) is always size-preserving, composed with an inner one (classical or Strassen) that need not be, so this recursion terminates in one step: the BFS step belongs before the matrix multiplication, not inside it, even when the inner algorithm is Strassen, since §5’s θ2D(ω0)\theta_{2D}(\omega_0), θ3D(ω0)\theta_{3D}(\omega_0) are exactly the θB\theta_B that Theorem 8.1 takes as input.

Discussion

We decompose the question of how to parallelize the 3M complex-matrix-multiplication trick into two independent sub-questions: is 3M worth doing at all (V2 vs. V3, purely arithmetic, since both share an identical communication schedule), and is it worth restructuring communication to get more of it (V1 vs. V2, purely communication, since both share an identical compute time). For classical matrix multiplication, 3M is unconditionally worth doing locally, by a 25% arithmetic margin matching BLIS’s design, and additionally worth splitting into concurrent processor groups for 2D layouts at scale, but never for 3D. This 2D-vs-3D split, however, is governed not by the bandwidth-based critical exponent θ∗=log⁡32\theta^* = \log_3 2 that first appears to decide it, but by which term, bandwidth or latency, dominates as P→∞P \to\infty: bandwidth shrinks with PP while latency grows, in both layouts, so latency eventually dominates absolutely, regardless of ω\omega. For 2D, this gives V1 a universal 1−1/3≈42.3%1 - 1/\sqrt{3} \approx42.3\% latency advantage for every arithmetic exponent (versus a merely 13.4% bandwidth advantage for classical specifically, which does depend on ω\omega and is not universal), not just those with θ(ω)<θ∗\theta(\omega) < \theta^*; θ∗\theta^* instead governs how large PP must be before this advantage appears. For 3D, the same latency-growth argument applies, but the fixed cost of V1’s redistribution step narrowly outweighs latency’s fixed advantage there, so V2 remains asymptotically at least as good, for every ω≤3\omega\le3, the gap vanishing as P→∞P \to\infty rather than reversing. The same mechanism generalizes: for Toom-Cook-kk (Corollary 7.3), the 2D result generalizes exactly (1−1/2k−1(1 - 1/\sqrt{2k-1}, ω\omega-independent), and the true 3D crossover moves from k=2k = 2 to k=3k = 3, also ω\omega-independent; for general replica-tion cc (Corollary 4.9), the true asymptotic winner is V1 throughout the entire interior of the 2.5D range, not just up to c∗c^*, though the PP required to observe this grows unboundedly as c→P1/3c \to P^{1/3}, so c∗c^* remains the practically relevant threshold at any finite scale.

This analysis is entirely model-based, and we have not validated it against a real distributed implementation. The α\alpha-β\beta-γ\gamma model itself omits effects of the same order of magnitude as the percentages we report: contention among V1’s three concurrent groups sharing one interconnect; load imbalance; the gap between α,β,γ\alpha,\beta,\gamma as idealized constants and a real collective-communication implementation (scatter, gather, broadcast-reduce); and the O(n2)O(n^2) lower-order terms dropped throughout, not separately confirmed to remain lower-order at our crossover scales. TredistT_{\mathrm{redist}} in particular is a coarse estimate, not derived from a concrete collective schedule. An MPI-based implementation on an existing 2D/2.5D/3D library, or on CAPS directly, would calibrate these terms and validate the crossover points ((7.1)) against measurement; we leave this to future work. Short of that, our consistency-check simulator (supplementary material, §6) verifies the closed forms are algebraically consistent with an independent, discrete accounting of the same model, which is necessary but not sufficient for the model to be accurate, and does not address the omissions above.

The two kinds of claim this paper makes carry different dependence on γ,β,α\gamma,\beta,\alpha. The structural claims, including the sign of every asymptotic crossover (V1 beats V2 in 2D, loses in 3D, for every arithmetic exponent; k=3k = 3 rescues 3D for Toom-Cook-kk), are P→∞P \to\infty limits of latency-term ratios alone (Lemma 4.5), and γ,β,α\gamma,\beta,\alpha cancel out entirely, not appearing in the stated ratios (1/3,log⁡23(1/\sqrt{3},\log_2 3 vs. 2) at all; these are robust to the choice of machine constants. What does depend on γ,β,α\gamma,\beta,\alpha, via TredistT_{\mathrm{redist}} and the bandwidth term, is where the crossover occurs: the finite-PP threshold c∗c^* (Corollary 4.8) and the exact percentages in Table 1.1 and §6, computed at one representative setting and shifting under another. Treat the asymptotic direction of each crossover as the robust contribution, the percentages as illustrations at one operating point.

Proposition 4.2’s 6-vs-8-block memory comparison is a distributed-memory accounting and does not transfer to BLIS’s single-node implementation [57]: BLIS packs operands into small, cache-blocked workspace buffers rather than holding each as one persistent block, so whatever extra workspace its 3M3\mathrm{M} method needs is transient and cache-block-sized, not a full extra block.

For Strassen’s algorithm, using the Karstadt-Schwartz addition count, this picture inverts: in-place 3M3\mathrm{M} is strictly worse than standard, since its recombination phase cannot be shared across channels the way evaluation can, making standard 4M4\mathrm{M} best for 3D3\mathrm{D}-Strassen at every scale we evaluated. Two assumptions bear on this: the latency exponent for Strassen- and CAPS-based layouts is assumed identical to classical, and 3M3\mathrm{M}’s known numerical-stability disadvantage [28] is not in the cost model, which may affect V1/V2’s viability for ill-conditioned inputs; error bounds for alternative-basis Strassen [46] could sharpen this. Whether other fast algorithms (Pan-, Schönhage-type) show the same V2-vs-V3 reversal is also worth checking.

The framework generalizes beyond Gauss’s identity: applied to Karatsuba’s high/low-digit split for FP64-via-low-precision emulation, the identical two theorems govern the same comparison, correctly predicting a classical-like ranking, since that identity has no deep recursive recombination. The same stability caveat applies here too, more acutely: this recombination has not, to our knowledge, been separately checked for stability.

Generalizing to Toom-Cook-kk yields one closed-form superiority condition, combining the arithmetic saving (k−1)2/k2(k-1)^2/k^2 with the critical exponent θ∗(k)=log⁡2k−1k\theta^*(k)=\log_{2k-1}k, both increasing in kk: where k=2k=2 leaves 3D3\mathrm{D} on the wrong side, k=3k=3 flips it favorable for every arithmetic exponent asymptotically, though for Strassen, where θ∗(3)\theta^*(3) still falls short of θ3D(ω0)\theta_{3\mathrm{D}}(\omega_0), this only appears at larger PP than the bandwidth-only threshold suggests (§4.2). A further direction, suggested by Nissim et al.’s alternative-basis and Toom-Graph techniques [40], is optimizing the O(n2)O(n^2) lower-order terms suppressed throughout, instead of treating them as negligible.

A separate open direction is fault tolerance: how can a fault-tolerant complex matrix multiplication be built on V1, V2, or V3? Fault-tolerant matrix multiplication was already established [31, 14, 16, 11, 10], and fault-tolerant recursive Toom-Cook likewise [42, 41], but neither addresses this composition. Adapting either would mean deciding whether the fault-tolerance layer sits on the outer 3M3\mathrm{M} split, the inner algorithm, or both, and whether V1’s already-disjoint groups can double as the needed redundancy structure.

Acknowledgments

This project has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No 818252, 101113120, 101138056). Research was supported by grant No. 1354/23 of the Israel Science Foundation (founded by the Israel Academy of Sciences and Humanities). This research has been supported by the Science Accelerator and by the Frontiers in Science initiative of the Ministry of Innovation, Science and Technology.

References

  1. [1]R. C. Agarwal, S. M. Balle, F. G. Gustavson, M. Joshi, and P. Palakkar. A three-dimensional approach to parallel matrix multiplication, IBM J. Res. Dev., 39 (1995), pp. 575–582.DOI
  2. [2]A. Aggarwal, A. K. Chandra, and M. Snir, Communication complexity of PRAMs, Theoretical Computer Science, 71 (1990), pp. 3–28.
  3. [3]F. Arute, K. Arya, R. Babbush, et al., Quantum supremacy using a programmable superconducting processor, Nature, 574 (2019), pp. 505–510.DOI
  4. [4]G. Ballard, J. Demmel, and I. Dumitriu, Communication-optimal parallel and sequential eigenvalue and singular value algorithms, arXiv:1011.3077, (2011).
  5. [5]G. Ballard, J. Demmel, O. Holtz, B. Lipshitz, and O. Schwartz, Communication-optimal parallel algorithm for Strassen’s matrix multiplication, in Proc. 25th ACM Symp. Parallelism in Algorithms and Architectures (SPAA), 2013.arxiv.org/abs/1202.3173
  6. [6]G. Ballard, J. Demmel, O. Holtz, and O. Schwartz, Minimizing communication in numerical linear algebra, SIAM J. Matrix Anal. Appl., 32 (2011), pp. 866–901.DOI
  7. [7]G. Ballard, J. Demmel, O. Holtz, and O. Schwartz, Graph expansion and communication costs of fast matrix multiplication, J. ACM, 59 (2012). article 32.
  8. [8]G. Beniamini and O. Schwartz, Faster matrix multiplication via sparse decomposition, in Proc. 31st ACM Symp. Parallelism in Algorithms and Architectures (SPAA), 2019.DOI
  9. [9]G. Bilardi and L. De Stefani, The I/O complexity of Toom-Cook integer multiplication, in Proc. 30th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), 2019, pp. 2034–2052.DOI
  10. [10]N. Birnbaum, R. Nissim, and O. Schwartz, Fault tolerance with high performance for fast matrix multiplication, in Proc. SIAM Workshop on Combinatorial Scientific Computing (CSC), 2020, pp. 106–117.
  11. [11]N. Birnbaum and O. Schwartz, Fault tolerant resource efficient matrix multiplication, in Proc. 8th SIAM Workshop on Combinatorial Scientific Computing (CSC), 2018, pp. 23–34.
  12. [12]L. S. Blackford, J. Choi, A. Cleary, E. D’Azevedo, J. Demmel, I. Dhillon, J. Dongarra, S. Hammarling, G. Henry, A. Petitet, K. Stanley, D. Walker, and R. C. Whaley, ScaLAPACK Users’ Guide, SIAM, Philadelphia, PA, 1997.DOI
  13. [13]M. Bodrato and A. Zanoni, What about Toom-Cook matrices optimality, tech. report, Centro “Vito Volterra”, Università di Roma Tor Vergata, 2006.
  14. [14]G. Bosilca, R. Delmas, J. Dongarra, and J. Langou, Algorithm-based fault tolerance applied to high performance computing, J. Parallel Distrib. Comput., 69 (2009), pp. 410–416.DOI
  15. [15]L. E. Cannon, A cellular computer to implement the Kalman filter algorithm, PhD thesis, Montana State University, 1969.
  16. [16]Z. Chen and J. Dongarra, Algorithm-based fault tolerance for fail-stop failures, IEEE Trans. Parallel Distrib. Syst., 19 (2008), pp. 1628–1641.DOI
  17. [17]J. Choi, J. J. Dongarra, R. Pozo, and D. W. Walker, ScaLAPACK: A scalable linear algebra library for distributed memory concurrent computers, in Proc. 4th Symp. Frontiers of Massively Parallel Computation, 1992.
  18. [18]S. A. Cook, On the Minimum Computation Time of Functions, PhD thesis, Harvard University, 1966.
  19. [19]J. W. Cooley and J. W. Tukey, An algorithm for the machine calculation of complex fourier series, Mathematics of Computation, 19 (1965), pp. 297–301.DOI
  20. [20]D. E. Culler, R. M. Karp, D. A. Patterson, A. Sahai, K. E. Schauser, E. Santos, R. Subramonian, and T. von Eicken, LogP: Towards a realistic model of parallel computation, in Proc. 4th ACM SIGPLAN Symp. Principles and Practice of Parallel Programming (PPoPP), 1993, pp. 1–12.
  21. [21]L. De Stefani, Brief announcement: On the I/O complexity of sequential and parallel hybrid integer multiplication algorithms, in Proc. 34th ACM Symposium on Parallelism in Algorithms and Architectures (SPAA), 2022.DOI
  22. [22]E. Dekel, D. Nassimi, and S. Sahni, Parallel matrix and graph algorithms, SIAM J. Comput., 10 (1981), pp. 657–675.DOI
  23. [23]J. Demmel, L. Grigori, M. Hoemmen, and J. Langou, Communication-optimal parallel and sequential QR and LU factorizations, SIAM J. Sci. Comput., 34 (2012), pp. A206–A239.
  24. [24]J. J. Dongarra, J. D. Croz, I. S. Duff, and S. Hammarling, A set of level 3 basic linear algebra subprograms, ACM Trans. Math. Softw., 16 (1990), pp. 1–17.
  25. [25]A. Grama, A. Gupta, G. Karypis, and V. Kumar, Introduction to Parallel Computing, Addison-Wesley, Boston, 2nd ed., 2003.
  26. [26]L. Grigori, J. W. Demmel, and H. Xiang, CALU: A communication optimal LU factorization algorithm, SIAM J. Matrix Anal. Appl., 32 (2011), pp. 1317–1350.
  27. [27]R. F. Harrington, Field Computation by Moment Methods, MacMillan, New York, 1968.
  28. [28]N. J. Higham et al., Stability of a method for multiplying complex matrices with three real matrix multiplications, SIAM J. Matrix Anal. Appl., 13 (1992), pp. 681–687.DOI
  29. [29]M. Hoemmen, Communication-Avoiding Krylov Subspace Methods, PhD thesis, University of California, Berkeley, 2010.
  30. [30]J.-W. Hong and H. T. Kung, I/O complexity: The red-blue pebble game, in Proc. 13th ACM Symp. Theory of Computing (STOC), 1981, pp. 326–333.DOI
  31. [31]K.-H. Huang and J. A. Abraham, Algorithm-based fault tolerance for matrix operations, IEEE Trans. Computers, C-33 (1984), pp. 518–528.DOI
  32. [32]D. Irony, S. Toledo, and A. Tiskin, Communication lower bounds for distributed-memory matrix multiplication, J. Parallel Distrib. Comput., 64 (2004), pp. 1017–1026.DOI
  33. [33]A. Karatsuba and Y. Ofman, Multiplication of multidigit numbers on automata, Soviet Physics Doklady, 7 (1963), pp. 595–596.
  34. [34]E. Karstadt and O. Schwartz, Matrix multiplication, a little faster, J. ACM, 67 (2020). article 1.
  35. [35]T. Kouya, Acceleration of complex matrix multiplication using arbitrary precision floating-point arithmetic, arXiv:2307.06072, (2023).arxiv.org/abs/2307.06072
  36. [36]B. Lipshitz, G. Ballard, J. Demmel, and O. Schwartz, Communication-avoiding parallel Strassen: Implementation and performance, in Proc. SC12, 2012.
  37. [37]I. L. Markov and Y. Shi, Simulating quantum computation by contracting tensor networks, SIAM J. Comput., 38 (2008), pp. 963–981.DOI
  38. [38]W. F. McColl and A. Tiskin, Memory-efficient matrix multiplication in the BSP model, Algorithmica, 24 (1999), pp. 287–297.DOI
  39. [39]D. Mukunoki, T. Ogita, and K. Ozaki, Accurate and reproducible BLAS routines with Ozaki scheme for many-core architectures, in Proc. Parallel Processing and Applied Mathematics (PPAM), 2020.DOI
  40. [40]R. Nissim, O. Schwartz, and Y. Spizer, Minimizing I/O in Toom-Cook algorithms, in Euro-Par 2024: Parallel Processing, vol. 14803 of LNCS, Springer, 2024.DOI
  41. [41]R. Nissim, O. Schwartz, and Y. Spizer, Minimizing processor count for fault tolerant Toom-Cook algorithms, in Proc. 37th ACM Symposium on Parallelism in Algorithms and Architectures (SPAA), 2025, pp. 514–524.DOI
  42. [42]R. Nissim, O. Schwartz, Y. Spizer, K. Agrawal, and E. Petrank, Fault-tolerant parallel integer multiplication, in Proc. 36th ACM Symposium on Parallelism in Algorithms and Architectures (SPAA), 2024, pp. 207–218.DOI
  43. [43]R. Nissim and Y. Spizer, Minimizing communication costs in inner product Toom-Cook algorithms, in Euro-Par 2026: Parallel Processing, vol. 16782 of LNCS, Springer, 2027.DOI
  44. [44]NVIDIA Corporation, cuBLAS library. NVIDIA CUDA Toolkit Documentation. Available: https://docs.nvidia.com/cuda/cublas/.
  45. [45]K. Ozaki, T. Ogita, S. Oishi, and S. M. Rump, Error-free transformations of matrix multiplication by using fast routines of matrix multiplication and its applications, Numer. Algorithms, 59 (2012), pp. 95–118.DOI
  46. [46]O. Schwartz, S. Toledo, N. Vaknin, and G. Wiernik, Alternative basis matrix multiplication is fast and stable, in Proc. IPDPS, 2024, pp. 38–51.
  47. [47]E. Solomonik and J. Demmel, Communication-optimal parallel 2.5D matrix multiplication and LU factorization algorithms, in Euro-Par 2011, vol. 6853 of LNCS, Springer, 2011, pp. 90–109.DOI
  48. [48]V. Strassen, Gaussian elimination is not optimal, Numer. Math., 13 (1969), pp. 354–356.DOI
  49. [49]A. Szabo and N. S. Ostlund, Modern Quantum Chemistry: Introduction to Advanced Electronic Structure Theory, McGraw-Hill, New York, 1989.
  50. [50]A. Taflove and S. C. Hagness, Computational Electrodynamics: The Finite-Difference Time-Domain Method, Artech House, Norwood, MA, 3rd ed., 2005.
  51. [51]A. L. Toom, The complexity of a scheme of functional elements realizing the multiplication of integers, Soviet Mathematics Doklady, 3 (1963), pp. 714–716.
  52. [52]Y. Uchino, K. Ozaki, and T. Imamura, Double-precision matrix multiplication emulation via Ozaki-II scheme with FP8 quantization, arXiv:2603.10634, (2026).arxiv.org/abs/2603.10634
  53. [53]Y. Uchino, K. Ozaki, and T. Imamura, Error analysis of matrix multiplication emulation using Ozaki-II scheme, arXiv:2602.02549, (2026).arxiv.org/abs/2602.02549
  54. [54]L. G. Valiant, A bridging model for parallel computation, Commun. ACM, 33 (1990), pp. 103–111.DOI
  55. [55]M. Valiev, E. J. Bylaska, N. Govind, K. Kowalski, T. P. Straatsma, H. J. J. Van Dam, D. Wang, J. Nieplocha, E. Apra, T. L. Windus, and W. A. de Jong, NWChem: A comprehensive and scalable open-source solution for large scale molecular simulations, Comput. Phys. Commun., 181 (2010), pp. 1477–1489.DOI
  56. [56]R. A. van de Geijn and J. Watts, SUMMA: Scalable universal matrix multiplication algorithm, Concurrency: Practice and Experience, 9 (1997), pp. 255–274.
  57. [57]F. G. Van Zee, T. Smith, F. D. Igual, M. Smelyanskiy, X. Zhang, M. Kistler, V. Austel, J. Gunnels, T. M. Low, B. Marker, L. Killough, and R. A. Van de Geijn, Implementing high-performance complex matrix multiplication via the 3m and 4m methods, ACM Trans. Math. Softw., 44 (2017). article 7.
  58. [58]F. G. Van Zee and R. A. Van de Geijn, BLIS: A framework for rapidly instantiating BLAS functionality, ACM Trans. Math. Softw., 41 (2015). article 14.
  59. [59]S. Winograd, On multiplication of 2 × 2 matrices, Linear Algebra Appl., 4 (1971), pp. 381–388.DOI

Paper details

vlnc:W_x26f89zp
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 8

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents