FuseFlow: A Fusion-Centric Compilation Framework for Sparse Deep Learning on Streaming Dataflow

Rubens Lacouture, Nathan Zhang, Ritvik Sharma, Marco Siracusa, Fredrik Kjolstad, Kunle Olukotun, Olivia Hsu · DOI

TL;DR

FuseFlow is the first compilation framework to enable general cross-expression (inter-kernel) fusion for sparse deep learning models targeting reconfigurable dataflow architectures. By introducing a novel tabular intermediate representation and a factored iteration strategy, it automatically optimizes complex sparse pipelines to achieve up to a 2.7× speedup on models like GPT-3 with block-sparse attention.

What Problem Does This Paper Address?

While deep learning models continue to scale exponentially, exploiting sparsity (zeros in weights, activations, or inputs) has emerged as a critical path to computational efficiency. However, running sparse models on traditional hardware like GPUs often results in severe underutilization due to irregular memory access patterns. For instance, a standard 3-layer Graph Convolutional Network (GCN) inference on an NVIDIA RTX 5090 yields an average compute utilization of just 16.7% and a meager 1% memory utilization.

Figure 1. Log plot of SM and DRAM utilization (%) for PyG GCN inference on an RTX 5090 across five datasets.

To solve this, researchers are designing specialized Reconfigurable Dataflow Architectures (RDAs). While frameworks like the Sparse Abstract Machine (SAM) provide hardware-independent dataflow primitives, existing sparse compilers suffer from a major limitation: they can only fuse operations within a single mathematical expression (intra-expression fusion). They cannot automatically fuse operations across different kernels or expressions (inter-expression fusion) in an end-to-end machine learning pipeline. This forces compilers to materialize intermediate sparse tensors back to memory, destroying the streaming advantages of dataflow hardware.

Methods

FuseFlow bridges this gap by compiling standard PyTorch models with sparse annotations into fully optimized, fused dataflow graphs. Its core technical contributions include:

  1. Cross-Expression Fusion Algorithm: FuseFlow automatically inlines producer expressions into consumers across kernel boundaries. To prevent invalid or highly inefficient memory traversals (discordant iteration), it tracks index order constraints using a directed Partial Order Graph (POG).
  2. Factored Iteration Space Lowering: Prior sparse dataflow compilers default to a "globally fused" iteration space, which causes a "coordinate explosion" (dimensionality explosion) when scaling to multiple expressions. FuseFlow instead lowers computations into a factored iteration space, executing pairwise co-iteration over tensors interleaved directly with computation.
  3. Fusion Tables IR: To manage the immense complexity of tracking intermediate data streams before they are physically instantiated, the authors introduced a new two-dimensional tabular intermediate representation. Rows represent the fused iteration order (control), while columns represent tensor expressions (data). This allows the compiler to flexibly rearrange and rewire dataflow subgraphs on the fly.
Overview of the FuseFlow compilation pipeline from PyTorch to a fused dataflow graph.

The framework also incorporates advanced hardware-level optimizations, including stream-based parallelization, sparsity blocking (mapping dense blocks to vectorized ALUs), and an analytical heuristic model to quickly prune suboptimal fusion schedules without running full cycle-accurate simulations.

Datasets

The authors evaluated FuseFlow across four distinct model classes using a variety of real-world datasets exhibiting both lossy and lossless sparsity:

  • Graph Convolutional Networks (GCN) & GraphSAGE: Evaluated on the Cora, Cora_ML, DBLP, OGB-Collab, and OGB-MAG datasets (sparsity ranging from 99.6% to 99.9%).
  • Sparse Autoencoder (SAE): Evaluated using image data from ImageNet, NIH-CXR, and LUNA16 (structured weight sparsity fixed at 50%).
  • GPT-3 Small (125M parameters): Combined with BigBird block-sparse attention and evaluated on the IMDB dataset (attention mask sparsity ranging from 53.9% to 86.5%).

Key Insights and Ideas

  • Full Fusion is Not a Silver Bullet: In dense compilation, fusing as many layers as possible is almost always optimal. FuseFlow reveals that for sparse dataflow, "full fusion" can actually degrade performance. In graph models (GCN/GraphSAGE), full fusion introduces massive recomputation overhead due to nested matrix multiplications. Finding the right granularity (e.g., layer-by-layer partial fusion) is essential.
  • The Power of Factored Lowering: Interleaving loops and computations spatially across the dataflow fabric prevents the coordinate processing bottlenecks that plague global iteration spaces, making end-to-end sparse pipeline compilation scalable.
Figure 4. Comparing fusion coverage and performance.

Key Results

The authors verified FuseFlow's performance using a cycle-accurate dataflow simulator (validated against post-synthesis RTL on a Xilinx VU9P FPGA):

  • GPT-3 with BigBird Attention: Achieved a 2.7× speedup using full fusion over an unfused baseline.
  • Graph Models: Partial fusion delivered up to a 2.6× speedup for GCN (on OGB-Collab) and a 3.9× speedup for GraphSAGE (on OGB-mag).
  • Comparison to Prior Art: FuseFlow achieved a 1.33× speedup over the state-of-the-art sparse dataflow compilers (Custard + Stardust) on GCN, while entirely eliminating the need for tedious, manual expression rewrites.

Limitations and Future Work

While FuseFlow represents a massive leap forward for sparse compilation, a few limitations remain:

  • Autoscheduling: Currently, users must provide explicit scheduling hints or rely on basic autotuning sweeps to find the optimal fusion boundaries and dataflow orderings. The authors note that integrating LLM-guided or algorithmic autoschedulers is an active next step.
  • Physical Hardware Mapping: The current backend targets cycle-accurate simulation and FPGA synthesis. Directly compiling to emerging physical sparse CGRAs (Coarse-Grained Reconfigurable Arrays), such as the recently proposed Opal architecture, is left for future work.

Summary updated

BibTeX
@misc{lacouture2025fuseflow,
  author = {Rubens Lacouture and Nathan Zhang and Ritvik Sharma and Marco Siracusa and Fredrik Kjolstad and Kunle Olukotun and Olivia Hsu},
  title = {{FuseFlow: A Fusion-Centric Compilation Framework for Sparse Deep Learning on Streaming Dataflow}},
  year = {2025},
  eprint = {2511.04768},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.04768},
}
Figure