NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Streaming Tensor Programs: A Streaming Abstraction for Dynamic Parallelism

Gina Sohn, Genghan Zhang, Konstantin J. Hoßfeld, Jungwoo Kim, Nathan Sobotka, Nathan Zhang, Olivia Hsu, Kunle Olukotun

TL;DR

This paper introduces Streaming Tensor Programs (STeP), a novel programming abstraction for Spatial Dataflow Accelerators (SDAs) that effectively handles dynamic tensor shapes and control flow common in modern machine learning models. STeP enables significant performance improvements and resource savings by unlocking optimizations like dynamic tiling and parallelization, which were previously difficult or impossible to implement on SDAs.

What Problem Does This Paper Address?

Modern machine learning workloads, especially large language models (LLMs), are increasingly characterized by dynamic behaviors. This includes data-dependent tensor shapes (e.g., variable sequence lengths) and control flow (e.g., Mixture-of-Experts models where different parts of the model are activated based on input). Spatial Dataflow Accelerators (SDAs) are hardware architectures well-suited for these workloads due to their inherent parallelism and efficient data movement. However, existing programming abstractions for SDAs often struggle to express and optimize these dynamic behaviors, forcing them to be implemented statically or leading to suboptimal performance. This gap limits the full potential of SDAs for cutting-edge AI applications.

Methods

The core contribution is the Streaming Tensor Programs (STeP) abstraction. STeP treats data as streams and introduces several key features:

  • Explicit Memory Hierarchy: STeP provides explicit control over data movement between different memory tiers (off-chip, on-chip buffers), crucial for performance in memory-bound applications.
  • Symbolic-Shape Semantics: This allows for the representation and analysis of dynamically sized tensors and streams. It enables the abstraction to understand and reason about data shapes that change at runtime.
  • Flexible Routing and Merging Operators: These operators are designed to handle data-dependent control flow, enabling dynamic routing of data to different computational paths.
  • Dynamic Tiling: STeP allows tile sizes to be determined at runtime, adapting to varying data dimensions and breaking the static tiling trade-off between performance and on-chip memory usage.
  • Dynamic Parallelization: This optimization dispatches work to parallel execution units as soon as downstream pipelines are ready, improving load balancing for uneven workloads.
  • Configuration Time-Multiplexing: This technique allows sharing computational resources across different branches of a program (e.g., different experts in an MoE model) by time-multiplexing configurations, saving resources.

STeP is supported by a symbolic frontend for analysis and a cycle-approximate simulator for performance evaluation.

Datasets

The paper uses real-world datasets and traces for evaluation:

  • AzureLLMInferenceDataset [32]: Used for sampling KV cache lengths in attention computations.
  • hh-rlhf serving trace [10]: Used for expert routing data in Mixture-of-Experts (MoE) models.
  • Qwen3-30B-A3B [52] and Mixtral-8x7B [17] models: Representative LLM models used for experiments.

The authors also mention using synthetically generated tensors for some aspects.

Key Insights and Ideas

  • Dynamicism is Key: The paper strongly argues that effectively handling dynamic shapes and control flow is not just a feature but a necessity for accelerating modern ML workloads on SDAs.
  • Breaking the Pareto Frontier: STeP's optimizations, particularly dynamic tiling, demonstrably push beyond the performance/resource trade-offs achievable with static tiling on SDAs. This means achieving better performance and/or using fewer resources than previously possible.
  • Abstraction Matters for Performance: By exposing explicit memory hierarchy and symbolic shape semantics, STeP provides the necessary visibility for programmers and compilers to make informed optimization decisions, leading to significant performance gains.
  • SDAs are Ready for Dynamicism: The paper implies that the underlying hardware capabilities of SDAs are well-suited for dynamic parallelism, and STeP provides the programming model to unlock this potential.

Key Results

STeP and its associated optimizations achieve significant improvements:

  • Dynamic Tiling: Breaks the Pareto-optimal frontier, achieving speedups and/or reducing on-chip memory usage. For example, it achieved Pareto Improvement Distances (PID) of 1.33x-2.11x and 1.86x-1.87x on different models.
  • Dynamic Parallelization: Improves latency by up to 2.72x compared to static coarse-grained parallelization, especially in scenarios with high KV cache length variation.
  • Configuration Time-Multiplexing: Increases compute utilization by up to 2.64x (with static tiling) and 2.51x (with dynamic tiling), while freeing up significant on-chip compute and memory resources.
  • End-to-End Models (Qwen3-30B-A3B and Mixtral-8x7B): Achieved up to 1.27x speedup with comparable or fewer on-chip resources. Qwen3-30B-A3B saw a 69% reduction in on-chip memory and 54% fewer compute resources due to configuration time-multiplexing.

Limitations and Future Work

  • Limitations:
    • The paper acknowledges that the symbolic frontend introduces symbols for static ragged dimensions, which simplifies analysis but might not capture all nuances of dynamic raggedness.
  • While the simulator closely matches HDL simulations, it's still a simulation and not a direct hardware implementation.
  • Future Work:
    • Developing a high-level compiler that can automatically translate models from frameworks like PyTorch to STeP.
  • Designing optimal hardware architectures for SDAs that can efficiently support STeP's dynamic features.
  • Further exploration of toolchain customization and extending the simulator to model more complex hardware interactions like on-chip memory contention.

Summary updated

BibTeX
@inproceedings{sohn2026streaming,
  author = {Gina Sohn and Genghan Zhang and Konstantin J. Hoßfeld and Jungwoo Kim and Nathan Sobotka and Nathan Zhang and Olivia Hsu and Kunle Olukotun},
  title = {{Streaming Tensor Programs: A Streaming Abstraction for Dynamic Parallelism}},
  booktitle = {ASPLOS},
  year = {2026},
  doi = {10.1145/3779212.3790229},
}
Figure