Est. 1998 Advanced

Spiral

A domain-specific language and program-generation system from Carnegie Mellon that expresses signal-processing transforms as mathematical formulas and automatically synthesizes high-performance, platform-tuned code.

Created by The SPIRAL project at Carnegie Mellon University (led by Markus Püschel and José M. F. Moura, with Jeremy Johnson, David Padua, Manuela Veloso, and later Franz Franchetti)

Paradigm Domain-specific; declarative, mathematical program generation (SPL and Operator Language)
Typing Declarative mathematical formula language (not a conventionally typed language)
First Appeared 1998
Latest Version SPIRAL 8.5.3 (2025)

Spiral (usually written SPIRAL) is a domain-specific language and program-generation system developed at Carnegie Mellon University for the performance-critical domain of digital signal processing (DSP) transforms. Rather than being a language programmers use to write applications, SPIRAL is a system in which an algorithm — such as the Fast Fourier Transform (FFT) — is expressed as a concise mathematical formula, and the system automatically searches for and generates highly optimized, platform-tuned C, Fortran, or vectorized code. It is one of the defining examples of autotuning: treating the production of fast code as a search-and-optimization problem rather than a hand-coding task.

History & Origins

SPIRAL began in mid-1998 at Carnegie Mellon as a DARPA-funded research effort. The founding group brought together signal-processing and computer-architecture expertise (José M. F. Moura), symbolic and algorithmic work on transforms (Jeremy Johnson and Robert W. Johnson), compiler and language expertise (David Padua), machine learning for search (Manuela Veloso), high-performance computing (Viktor Prasanna), and, centrally, Markus Püschel, who became one of the project’s principal architects. Franz Franchetti later drove much of the work on vectorization, parallelism, and the generalized framework.

The motivation was a persistent problem in numerical computing: libraries like the FFT must be re-tuned for every new processor, and hand-optimizing them is slow, error-prone, and quickly obsolete as hardware changes. A contemporary and independent project, FFTW (from MIT, also 1998), attacked the same problem for the FFT specifically. SPIRAL took a broader, more formal route grounded in the mathematics of the transforms themselves.

Although the metadata year for Spiral is sometimes given as 2005, that date reflects the project’s most-cited publication — the Proceedings of the IEEE survey “SPIRAL: Code Generation for DSP Transforms” (February 2005) — rather than its first appearance. The SPL language was published in 2001 and the project itself dates to 1998.

Design Philosophy

SPIRAL’s core idea is that a DSP transform is best described not as a program but as a mathematical object, and that many valid algorithms for computing that transform can be derived by rewriting its formula. From this, SPIRAL builds a pipeline:

  1. Specify the transform (e.g., a discrete Fourier transform of a given size) in a high-level, declarative form.
  2. Apply breakdown rules — algebraic identities, most famously the Kronecker (tensor) product decomposition underlying the Cooley–Tukey FFT — to expand the transform into a large space of equivalent formulas.
  3. Search that space, combined with implementation choices (loop structure, unrolling, vectorization), guided by feedback from actually measuring the generated code’s performance on the target machine.
  4. Emit optimized code in C or Fortran, optionally using SIMD instruction sets or targeting parallel and GPU backends.

This “formula → code” translation is what makes SPIRAL a language system rather than merely a library: the formulas are a real notation with a compiler.

Key Features

  • SPL (Signal Processing Language). The original SPIRAL language expresses transforms and their algorithms as formulas built from matrices, the Kronecker product, and composition. An SPL program is a declarative description of a computation, not a sequence of imperative statements. The SPL compiler translates these formulas into C or Fortran.
  • Σ-SPL. An intermediate layer that makes loops and index mappings explicit, enabling loop-level optimizations before final code generation.
  • Operator Language (OL). Introduced in 2009, OL generalizes SPL from linear transforms to a wider class of numerical kernels, describing computations as operators that can have multiple inputs and nonlinear behavior.
  • Feedback-driven search. SPIRAL treats tuning as an optimization problem, exploring the degrees of freedom in both the algorithm and the code, and using empirical timing (and, historically, machine-learning techniques) to converge on fast implementations.
  • Platform adaptation. Generated code can exploit vendor-specific vector instructions (for example, SSE-family instructions on x86 or AltiVec on PowerPC), and later work extended generation to multicore and CUDA GPU targets.

A simplified sense of the SPL style — expressing a transform via a tensor-product breakdown rather than as loops — looks conceptually like:

; A radix-based breakdown of a DFT of size n = k*m
DFT(n) -> (DFT(k) tensor I(m)) * T(n,m) * (I(k) tensor DFT(m)) * L(n,k)

Here the transform on the left is rewritten into a composition of smaller transforms, twiddle-factor and permutation matrices — an algebraic identity the system can apply recursively and then compile.

Evolution

SPIRAL’s trajectory tracks the broadening of its ambitions:

EraDevelopment
1998Project founded at CMU (DARPA-funded), focused on linear DSP transforms
2001SPL language and compiler formalized (PLDI)
2004–2005Comprehensive descriptions published; feedback-driven generation matured
~2009Operator Language (OL) generalizes the approach beyond linear transforms; commercial deployment via SpiralGen and Intel libraries
2018Recast as a framework for “extreme performance portability” across diverse hardware
2020sExascale work (FFTX), GPU code generation, and open-source releases

Over this span SPIRAL moved from a specialized FFT/DSP generator toward a general program-generation framework, while spinning off the company SpiralGen Inc. to bring the technology into commercial libraries.

Current Relevance

SPIRAL remains actively developed. The open-source spiral-software project on GitHub is distributed under a BSD-style license, is documented as building on Windows, Linux, and macOS, and supports CUDA GPU code generation; its version 8.5.3 was released in November 2025. Perhaps its most consequential modern role is as the code-generation engine behind FFTX, the exascale-oriented successor to FFTW developed under the U.S. Department of Energy’s Exascale Computing Project in collaboration with Lawrence Berkeley National Laboratory and CMU.

SPIRAL-generated code has also had quiet but enormous reach: kernels produced by the system shipped inside Intel’s IPP and MKL libraries and Mercury’s SAL, meaning code written by SPIRAL ran on a vast number of machines even though most users never heard the name.

Why It Matters

SPIRAL is a foundational example of a powerful idea: that for well-structured mathematical domains, the compiler can out-engineer the human. By encoding the algebraic structure of signal transforms as a language and searching the space of algorithms and implementations against real hardware measurements, it produced code competitive with expert hand-tuning — and, crucially, code that could be regenerated automatically as processors evolved. Alongside FFTW and ATLAS, it helped establish autotuning and generative programming as serious approaches to high-performance computing, and its formula-rewriting philosophy continues to influence domain-specific languages and compilers for numerical computing today.

Timeline

1998
The SPIRAL project begins in mid-1998 at Carnegie Mellon University as a DARPA-funded effort to automatically generate fast, platform-adapted implementations of digital signal processing (DSP) transforms. The initial team includes José M. F. Moura, Markus Püschel, Jeremy Johnson, Robert W. Johnson, David Padua, Viktor Prasanna, and Manuela Veloso.
2001
SPL — the Signal Processing Language — is formalized in the paper "SPL: A Language and Compiler for DSP Algorithms" (Xiong, Johnson, Padua) at the ACM SIGPLAN PLDI conference. SPL uses the Kronecker (tensor) product to express transform algorithms as mathematical formulas that compile to C or Fortran.
2004
The system is described in "Spiral: A Generator for Platform-Adapted Libraries of Signal Processing Algorithms" in the International Journal of High Performance Computing Applications (Vol. 18, No. 1), presenting the feedback-driven search over algorithmic and implementation choices.
2005
The landmark survey "SPIRAL: Code Generation for DSP Transforms" appears in the Proceedings of the IEEE (Vol. 93, No. 2, February 2005), consolidating the SPIRAL approach and giving the project its most widely cited reference.
2009
The Operator Language (OL) is introduced in "Operator Language: A Program Generation Framework for Fast Kernels" (Franchetti, de Mesmay, McFarlin, Püschel), generalizing SPL beyond linear transforms to a broader class of numerical kernels.
2009
SPIRAL-generated kernels reach commercial software: the ippGen function domain in Intel Integrated Performance Primitives (IPP) 6.0 comprises thousands of computer-generated C functions attributed to SpiralGen Inc., the CMU spin-off founded to commercialize the technology. Generated code also appears in Intel MKL and Mercury Computer Systems' SAL.
2018
"SPIRAL: Extreme Performance Portability" is published in the Proceedings of the IEEE (Vol. 106, No. 11, November 2018), recasting SPIRAL as a general framework for portable performance across CPUs, GPUs, and other targets.
2020
FFTX, an exascale-oriented follow-on to the FFTW library built on the SPIRAL back end, is developed (with initial results reported around 2018) as a collaboration between Lawrence Berkeley National Laboratory, Carnegie Mellon University, and SpiralGen under the U.S. Department of Energy's Exascale Computing Project.
2025
SPIRAL 8.5.3 is released (November 2025) through the open-source spiral-software project on GitHub, which is distributed under a BSD-style license and documented as building on Windows, Linux, and macOS with support for CUDA GPU code generation.

Notable Uses & Legacy

Intel Integrated Performance Primitives (IPP)

The ippGen domain of Intel IPP shipped thousands of transform functions (DFT, DCT, DHT, Walsh–Hadamard and related kernels) generated by SPIRAL/SpiralGen. The generated-code domain was later deprecated beginning with Intel IPP 9.0.

Intel Math Kernel Library (MKL)

SPIRAL-generated FFT and transform kernels were incorporated into Intel MKL, one of the most widely deployed numerical libraries for x86 platforms.

FFTX and the DOE Exascale Computing Project

FFTX, the exascale successor to FFTW, uses the SPIRAL engine as its code-generation back end for FFT-based computations on leadership-class supercomputers, developed by Lawrence Berkeley National Laboratory, CMU, and SpiralGen.

Mercury Computer Systems SAL

SPIRAL-generated signal-processing routines were used in Mercury's Scientific Algorithm Library (SAL), targeting embedded and high-performance DSP workloads.

Academic autotuning and program-generation research

SPIRAL is a canonical reference in the autotuning and generative-programming literature, frequently studied alongside FFTW and ATLAS as a foundational example of search-driven, domain-specific code generation.

Language Influence

Influenced

FFTX

Running Today

Run examples using the official Docker image:

docker pull
Last updated: