arXiv:2610.20981cs.DCOct 2026

Manuscript Offprint

arXiv:2610.20981

Cyclotron: A Recurrence Language for Expressing Interprocessor Communication

Shiv Sundram, Akhilesh Balasingam, Nathan Zhang, Kunle Olukotun, Fredrik Kjolstad

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Shiv Sundram

shiv1@stanford.edu

Stanford University

Stanford, California, USA

Akhilesh Balasingam

avb03@stanford.edu

Stanford University

Stanford, California, USA

Nathan Zhang

stanfurd@stanford.edu

Stanford University

Stanford, California, USA

Kunle Olukotun

kunle@stanford.edu

Stanford University

Stanford, California, USA

Abstract

We present Cyclotron, a compiler that expresses streaming dataflow algorithms using recurrence equations, which are then compiled to distributed topologies of interlinked processors. Our compiler lowers a language of recurrences over logical iteration spaces into per-processor programs of sends, receives, and computations. In these recurrences, data accesses are not limited to external accesses to memory; data can live separately on the iteration space itself, allowing internal points to communicate values directly with other points. Users specify this communication directly in the recurrence language, which allows them to express various communication patterns such as a nearest-neighbor systolic exchange, a one-to-all broadcast, a bidirectional split ring, or an asymmetric and piecewise broadcast pattern, which are often not supported by standard distributed linear algebra libraries. These recurrences describe the algorithm and communication independently of how they map onto the hardware. A programmer then chooses which dimensions execute across processors and which execute over time, without rewriting the entire program. Users only specify data dependencies across the iteration space, and the compiler safely generates a program, per process, with correct placement of both communication and computational operators according to the chosen space-time mapping. We evaluate distributed matrix multiplication, TRSM, Cholesky, and fused Cholesky–TRSM on up to 16 CPU nodes and 16 GPUs, comparing against ScaLAPACK, SLATE, and cuSolverMp. Cyclotron is competitive with and often outperforms these hand-optimized libraries; for Cholesky, the best communication strategy changes with problem size and architecture.

1 Introduction

Generations of architectural improvements have widened the gap between the cost of data movement and the cost of computation. Performance optimization is now dominated by minimizing memory traffic and network communication on distributed architectures. Extracting performance from such hardware is largely a matter of orchestrating how data

Fredrik Kjolstad

kjolstad@stanford.edu

Stanford University

Stanford, California, USA

moves through that fabric: laterally between PEs, and temporally as values are retained in fast memory across steps.

Yet the dominant abstractions for programming these machines do not represent data movement beyond memory loads/stores. In tensor algebra notation, loop-based IRs, and polyhedral representations, every data access is a tensor access—logical reads from or writes to memory locations. Such a program says what value each statement consumes, but not how or where that value travels between processors or across time. The movement is left implicit, to be recovered by dependence analysis and then realized by a lowering pass.

In computational problems where communication is a primary bottleneck, such as in distributed linear algebra (e.g., matrix multiplication), tensor algebra, and recurrences, the best communication policy can vary with input size, tile size, interconnect, and processor architecture. Yet standard distributed libraries like ScaLAPACK [7] or SLATE [10] either hard-code communication policies or expose only a small set of predefined options. Consequently, the best communication schedule for a particular problem and architecture may not be available to the programmer.

Compiler frameworks avoid pitfalls of writing distributed code by hand, which is error-prone and can lead to indefinite hangs from mismatched or incorrectly ordered communication, while also being difficult to optimize (e.g., overlapping communication with computation). Polyhedral frameworks have made important steps forward in modeling relationships between iteration spaces and memory accesses. Existing polyhedral frameworks, like AutoSA [37] for systolic-array synthesis and AlphaZ for distributed-memory code generation,[39] lower dependencies into nearest-neighbor transfers; both therefore effectively commit to a systolic realization of communication. As a result, alternative realizations of the same logical dependence, such as a one-to-all broadcast, a tree-broadcast, or heterogeneous combinations of broadcast and forwarding, are not supported.

This limitation stems from what the user program leaves unspecified. With polyhedral frameworks, users write equations or loops over array accesses, and the compiler analyses the program to identify where communication should occur.

Figure

Figure 1. Three spatial matrix multiplies. Left: each point reads operands AikA_{ik} and BkjB_{kj} directly from memory. Middle: each operand is loaded once at a boundary face, and interior points receive A and B systolically from neighbors. Right: each point receives its data directly from boundaries.

There are typically many ways to realize data movement, but without user input the compiler must choose among them. For example, AutoSA and AlphaZ only generate code where communication is limited to between neighboring PEs. This can leave performance on the table when a different communication strategy better matches the problem size or target architecture. Stellar [12], a framework for spatial accelerator design, allows users to specify dataflow and lets iteration-space points receive data from neighbors, supporting systolic patterns, but does not generalize beyond them.

This paper presents the Cyclotron compiler that makes the communication schedule a first-class part of the input program. The program can express many different communication patterns as recurrence equations. These include systolic exchanges, one-to-all broadcast, tree-broadcast, bidirectional split rings, or asymmetric, piecewise combination of communication policies, in which different subdomains of a program and processor grid carry different communication policies. A user can specify that a data tile travel via nearest-neighbor hops in one part of the processor grid, via a tree broadcast in other parts, and bidirectionally in another.

In Cyclotron, the programmer writes computation as a system of recurrences that can index into tensors that live on the iteration space in addition to tensors that live in memory, thus controlling data movement. Figure 1 illustrates the 3D iteration space of a matrix multiply, contrasting a program where data is accessed exclusively from tensors with two different programs where data is also obtained from points in the iteration space. What differs is how each value is obtained: directly from the tensor, from a neighboring iteration-space point, or from a boundary point via broadcasts. In Cyclotron, a value on the iteration space is named not only by which tensor element it is (e.g., AijA_{ij}) but by the point in the iteration space at which it lives, written (i,j,k)A(i, j, k)_A. Movement, like the systolic transfer (i,j,k)A←(i,j−1,k)A(i, j, k)_A \leftarrow (i, j-1, k)_A, is expressed in the same coordinate system as computation: a recurrence relating a value at one point to another point is a data movement. A separate per-dimension annotation declares whether each dimension is spatial (movement between PEs) or temporal (retention across steps). Data movement is not limited to nearest neighbors, and because the recurrence is written independently of this annotation, the same program can be used to generate different spatial mappings.

The user’s input recurrences are unordered. The ordering of compute and communication operations depends on which dimensions are mapped in space and time. Cyclotron’s dependency algorithm uses this mapping to derive correct orderings, relieving users of the need to manually sequence such operations and avoiding indefinite waits caused by incorrect communication ordering.

These recurrences are compiled to distributed code through a fixed pipeline: a space-time mapping folds the iteration space and inserts a temporal loop. Our dependency-management algorithm resolves data dependencies into coupled sends and receives. Synchronization-aware control flow is inserted according to the target protocol. A final pass can apply a block-cyclic decomposition and deduplicate communication.

Cyclotron lets programmers explore communication strategies with minimal program changes. The resulting code is competitive with, and often outperforms, expert-tuned libraries. We make the following contributions:

  • A recurrence-based programming model where communication is a first-class programmable concern, separate from computation and space-time mapping, enabling programmers to express and compose systolic, broadcast, ring, tree, and heterogeneous piecewise communication strategies.

  • A dependency-management algorithm that uses the chosen space-time mapping to order computation and communication from unordered recurrences

  • A complete compilation pipeline integrating the dependency algorithm with transformations that handle synchronization, block-cyclic decomposition and communication deduplication, generating efficient distributed programs.

By exploring different communication schedules, we demonstrate 1.7–1.8× over ScaLAPACK for matrix multiply. For Cholesky on up to 16 CPU nodes, we observe 1.34–1.68× speedup over ScaLAPACK on CPUs and 1.01–1.24× speedup over SLATE on GPUs (which uses CPU-side communication), and 1.12–1.28× speedup over cuSolverMp, Nvidia's optimized multi-GPU vendor library, when only using direct GPU-GPU communication. We demonstrate benefits of simultaneously composing different space-time mappings and how Cyclotron natively fuses kernels.