---
title: 'FFTMatvec: Split FFT for Toeplitz Matvec'
url: https://www.emergentmind.com/topics/fftmatvec
type: topic
---

# FFTMatvec: Split FFT for Toeplitz Matvec

FFTMatvec denotes a split Fast Fourier Transform algorithm for matrix-vector multiplication with block Toeplitz structure, introduced for settings in which multilevel circulant embedding is effective but overly expansive in memory and work. In numeric modeling of electromagnetics and acoustics, where block Toeplitz operators arise naturally and may not be highly sparse, the standard FFT route embeds each Toeplitz level into a circulant one, performs FFTs and diagonal multiplication, and thereby accelerates the product relative to naive multiplication. FFTMatvec modifies that paradigm through a “lazy embedding, eager projection” strategy that interleaves embedding and projection rather than materializing the full circulant extension, with asymptotic savings in both operation count and peak memory, and with a recursive branch structure that exposes straightforward parallelism [2406.17981].

## 1. Mathematical setting and target operator

The algorithm is formulated for a $d$-dimensional vector $v\in\mathbb C^{n^d}$ reshaped on an $n\times n\times\cdots\times n$ grid. The associated matrix $T$ is block Toeplitz in the sense that its entries depend only on relative grid offsets along each dimension; equivalently, $T$ is a $d$-level Toeplitz operator with generating “bands” $t[i_1,\ldots,i_d]$, each of size $n^d$. The computational objective is to evaluate $y=T\,v$ without explicitly forming $T$, since explicit storage and naive multiplication both scale as $O(n^{2d})$ [2406.17981].

This problem class is especially relevant when the Toeplitz structure originates from translationally invariant kernels sampled on regular grids. The motivating example given for the non-sparse regime is the electromagnetic Green function in a spatial basis. In such cases, FFT-based acceleration is already standard, but the standard route incurs a systematic overhead because the embedding step introduces coefficients that are not needed for the final projected output.

## 2. Classical circulant embedding and its overheads

The conventional multilevel method doubles the length in each of the $d$ dimensions, embedding the Toeplitz structure into a circulant structure. After all $d$ embeddings, the vector length grows from $n^d$ to $(2n)^d=2^d n^d$. The computation then proceeds by FFTs along each dimension, diagonal multiplication by the embedded spectrum, and inverse FFTs. In the notation of the paper, with $s=n^d$, the total cost is approximated by
$$
C_{\rm embed}\simeq 2^{d+1}s\,\log_2(2^d s)+2^d s,
$$
and the peak memory requirement for vectors and data is
$$
M_{\rm embed}=2^{d+1}s.
$$
These formulas make explicit that the acceleration is obtained by paying for a full $2^d$ expansion of the problem representation [2406.17981].

The practical consequence is that the FFT-based method is often much faster than naive multiplication but not information-theoretically economical. The full embedded representation contains padding and coefficients that are subsequently discarded by projection back to the physical domain. FFTMatvec is designed precisely to remove that avoidable surplus while retaining the FFT-based computational structure.

## 3. Split-FFT construction: lazy embedding and eager projection

The central device is an even-odd frequency splitting induced by a phase shift. In one dimension, for $v\in\mathbb C^n$, define the zero-padded vector $\tilde v=[v;0]\in\mathbb C^{2n}$ and the diagonal phase matrix
$$
P=\operatorname{diag}(1,e^{i\pi/n},\ldots,-1).
$$
Then $\operatorname{FFT}(\tilde v)$ separates into two interleaved spectra: the even-index spectrum is $\operatorname{FFT}(v)$, and the odd-index spectrum is $\operatorname{FFT}(Pv)$. Conversely, if $f_{\rm even}$ and $f_{\rm odd}$ are the two length-$n$ spectra, the inverse reconstruction is
$$
\tilde v=\operatorname{iFFT}\Bigl(\tfrac12\bigl[f_{\rm even}+\overline P\,f_{\rm odd}\bigr]\Bigr).
$$
This identity is the basis for splitting an embedded transform into branches that never require the full padded vector to be stored [2406.17981].

The multidimensional algorithm is described recursively by a routine $\texttt{toeMulBranch}(T,d,bId,v)$. At level $d>0$, the routine applies an FFT along dimension $d$. If $d<d_{\max}$, it creates a phase-shifted child branch, recurses on the original and shifted branches, and then merges them. At the leaves, it performs diagonal multiplication with the corresponding local Toeplitz data block $T[bId]$. If $d>0$, it ends by applying an inverse FFT along dimension $d$. In the pseudocode nomenclature of the paper, the branch split is denoted $\texttt{sptBrn}(v)$, merging is $\texttt{mrgBrn}(v_{\rm even},v_{\rm odd})$, and the leaf action is $\texttt{mulBrn}(v)$. The key structural fact is that no full $2^d$ padding is ever materialized; each branch operates on the original size $s=n^d$ vector [2406.17981].

This mechanism can be viewed as replacing one monolithic embedded FFT by a tree of smaller FFT tasks and branch-local diagonal multiplications. A plausible implication is that the algorithm gains not only from reduced asymptotic counts but also from improved locality and finer-grained scheduling.

## 4. Asymptotic savings and measured behavior

For the split method, the paper gives
$$
C_{\rm split}
=
2\sum_{l=1}^d 2^l s\,\log_2(n)+2^d s+2\sum_{l=0}^{d-1}2^l s
=
2(2^d-1)s\,(2\log_2 n+1)+2^d s.
$$
Defining $R_c=C_{\rm embed}/C_{\rm split}$, one obtains
$$
R_c
=
\frac{d\log_2(2n)+1}{(1-2^{-d})(2\log_2 n+1)+1}
\;\xrightarrow[n\to\infty]{}\;
\frac{d}{2-2^{-d+1}}.
$$
For memory, the split method stores at most $(d+1)$ vector copies of size $s$ together with $2^d$ Toeplitz data blocks of size $s$, so
$$
M_{\rm split}=(d+1)s+2^d s,
$$
and
$$
R_m=\frac{M_{\rm embed}}{M_{\rm split}}
=
\frac{2}{(d+1)2^{-d}+1}.
$$
For fully symmetric or skew-symmetric systems, the data storage can be reduced from $2^d s$ to $s$, yielding
$$
R_{m,\rm sym}=\frac{2^d+1}{d+2}.
$$
These are the defining quantitative results of FFTMatvec [2406.17981].

For dimensions $d=2,\ldots,6$, the asymptotic ratios reported are:

| $d$ | $R_c$ | $R_m$ | $R_{m,\rm sym}$ |
|---|---:|---:|---:|
| 2 | 1.33 | 1.14 | 1.25 |
| 3 | 1.71 | 1.33 | 1.80 |
| 4 | 2.13 | 1.52 | 2.83 |
| 5 | 2.58 | 1.68 | 4.71 |
| 6 | 3.05 | 1.80 | 8.13 |

In three dimensions, the general-case memory comparison is stated explicitly as $16s$ for embedding versus $(3+1+8)s=12s$ for split-FFT, i.e. a $4/3$ reduction. In the symmetric three-dimensional case, the comparison is $16s$ versus $(3+1+1)s=5s$, i.e. $16/5\approx 3.2\times$. For a three-dimensional simulation of Green’s function, the measured split-FFT time is reported as approximately $1.8\times$ faster, with memory approximately $1.33\times$ smaller. The paper also notes that, for moderate dimensions $d=2,3,4$ and large $n$, measured wall-clock speedups often exceed the theoretical $R_c$ values because smaller FFT sizes can interact more favorably with FFT libraries [2406.17981].

A recurrent point of clarification is that FFTMatvec does not remove FFTs; it removes the need to realize the full multilevel embedding explicitly. The computational kernel remains FFT plus diagonal multiplication, but reorganized so that projection is performed as early as possible.

## 5. Parallel structure, implementations, and GPU-oriented extensions

The recursive split exposes $2^d$ leaf branches, each of which performs FFTs, inverse FFTs, and diagonal multiplications independently. The paper identifies two parallelization strategies: “communicate-and-merge,” in which branches are forked only up to a mid-level and partially merged before continuing serially, and “fully distributed leaves,” in which each leaf is sent to a separate accelerator and results are merged at the root. Because FFT sizes remain $n$ rather than $2n$ at each level, performance is described as more consistent on highly tuned libraries such as FFTW and MKL; the lower memory footprint is also stated to reduce cache misses and paging. A Julia implementation at `https://github.com/alsirc/SplitFFT_lazyEmbed` uses multi-threading and task scheduling, and analogous C/C++/Python implementations are described as straightforward using FFTW or cuFFT together with BLAS/TBB for parallel forking. The stated limitation is that, for very small $d$ or very small $n$, recursive and threading overheads may offset the gains, so a cutoff $d_0$ below which standard circulant embedding is simpler is recommended [2406.17981].

A subsequent FFTMatvec HPC application addresses block-triangular Toeplitz matrices and emphasizes performance portability and mixed precision on GPUs. In that formulation, a lower-triangular block-Toeplitz matrix with $k$ block rows and columns is embedded into block-circulant form so that the matvec becomes a convolution,
$$
y=\mathcal F^{-1}\bigl(\mathcal F(c)\odot \mathcal F(x)\bigr),
$$
reducing the cost from $O(k^2 n^2)$ to $O(k\,n\log(kn))$. The original code was written in CUDA + cuFFT + cuBLAS; at build time, `hipify-perl` rewrites CUDA runtime and cuBLAS calls to HIP, after which the build links against HIP, rocFFT, and rocBLAS. No edits to the application source code were needed, because GPU-vendor specialization was pushed into rocBLAS. The mixed-precision workflow assigns each of $m$ kernels a precision template $p=(p_1,\ldots,p_m)$ with $p_j\in\{\texttt{fp64},\texttt{fp32}\}$, measures
$$
\operatorname{err}(p)=\|y(p)-y(\texttt{fp64})\|/\|y(\texttt{fp64})\|,
$$
and selects a configuration from the Pareto front for a prescribed tolerance. Reported single-GPU performance for a block-triangular problem of size approximately $2.6$M$\times 2.6$M is approximately $1.1$, $1.3$, and $1.4$ TFLOP/s in double precision on MI250X, MI300X, and MI355X, respectively, and approximately $2.6$, $3.1$, and $3.6$ TFLOP/s in a mixed configuration with fp32 FFTs and fp64 pointwise operations, corresponding to speedups of $2.4\times$, $2.4\times$, and $2.6\times$. The implementation is reported to scale to $2{,}048$ GPUs on Frontier, with weak-scaling efficiency above $90\%$ and strong-scaling efficiency of about $85\%$ from $64$ to $512$ GPUs, falling to about $60\%$ from $512$ to $2{,}048$ GPUs because of MPI all-reduce overhead [2508.10202].

## 6. Position within the structured-matrix literature

FFTMatvec belongs to a broader family of fast structured-matrix matvec methods in which Toeplitz, Hankel, or circulant structure is converted into convolution-like operations. Earlier work on Hankel matrix-vector multiplication in multiprecision arithmetic is directly relevant because the paper states that its algorithms are applicable to Toeplitz matrices and to circulant matrices as well. That work distinguishes a direct FFT approach from two alternatives: an FFT-based decomposition method that rewrites multiprecision numbers into standard-precision limbs and performs one enlarged standard-precision convolution, and a Karatsuba-inspired recursive method with complexity $\Theta(n^{\log 3})$. It also reports that, in very high precision, direct multiprecision FFT can be slower than schoolbook multiplication for matrix sizes up to $n=8000$, while the recursive method can outperform FFT-based alternatives for moderate $n$ because it avoids the large overhead of multiprecision FFTs [1402.5287].

This broader context clarifies the scope of the 2024 split-FFT contribution. FFTMatvec is not merely an assertion that Toeplitz matvec can be accelerated by FFTs; that fact is classical. Its specific contribution is to reorganize the multilevel embedding itself so that the block Toeplitz structure is exploited with less auxiliary expansion, and to do so in a way that is immediately compatible with branch-level parallelization. The subsequent GPU work suggests that the term “FFTMatvec” now functions not only as the name of a particular split-FFT algorithm, but also as a label for a software lineage of FFT-based structured matvec implementations across Toeplitz variants and heterogeneous HPC platforms.

Source: https://www.emergentmind.com/topics/fftmatvec