# WaferTetris: Efficient Freeform Mapping on Wafer-Scale Accelerators

arXiv: https://arxiv.org/abs/2611.18527 · HTML: https://mlsanity.com/paper/2611.18527/

## Key facts

- No citing papers in the map yet (data through 24 Nov 2026).
- Builds on 9 of its 33 references that are in the map.
- Submitted 13 Nov 2026.

## Builds on (most cited first, 9 of 9)

- [Cerebras-GPT: Open Compute-Optimal Language Models Trained on the Cerebras Wafer-Scale Cluster](https://mlsanity.com/paper/2304.03208/) (2023)
- [ScaleHLS: A New Scalable High-Level Synthesis Framework on Multi-Level Intermediate Representation](https://mlsanity.com/paper/2107.11673/) (2021)
- [Allo: A Programming Model for Composable Accelerator Design](https://mlsanity.com/paper/2404.04815/) (2024)
- [WaferLLM: Large Language Model Inference at Wafer Scale](https://mlsanity.com/paper/2502.04563/) (2025)
- [TAPA: A Scalable Task-Parallel Dataflow Programming Framework for Modern FPGAs with Co-Optimization of HLS and Physical Design](https://mlsanity.com/paper/2209.02663/) (2022)
- [Yosys+nextpnr: an Open Source Framework from Verilog to Bitstream for Commercial FPGAs](https://mlsanity.com/paper/1903.10407/) (2019)
- [StreamTensor: Make Tensors Stream in Dataflow Accelerators for LLMs](https://mlsanity.com/paper/2509.13694/) (2025)
- [TEMP: A Memory Efficient Physical-aware Tensor Partition-Mapping Framework on Wafer-scale Chips](https://mlsanity.com/paper/2512.14256/) (2025)
- [An MLIR Lowering Pipeline for Stencils at Wafer-Scale](https://mlsanity.com/paper/2601.17754/) (2026)

## Abstract (arXiv)

Wafer-scale accelerators offer massive compute capacity through hundreds of thousands of processing elements (PEs) interconnected across a single wafer, but realizing this potential requires efficient application mapping. Their scale makes programming these systems and mapping applications onto them challenging. Existing approaches rely on template-based mappings to maintain productivity, but these templates restrict the mapping design space. In particular, they impose fixed geometric layouts over the PE grid, often leaving compute and memory resources underutilized. In this work, we present WaferTetris, a system that removes these geometric restrictions through freeform mapping. Its Tetris-like strategy flexibly packs computation across the wafer, improving PE utilization and usable memory capacity while preserving PE-task code. We develop a recurrence-based throughput model that captures branch-and-join dependencies to guide spatial parallelism, and an architecture model with per-color gates that enable existing FPGA place-and-route algorithms to enforce WSE routing constraints. We evaluate WaferTetris on Cerebras WSE-3 using LLM decoding and scientific stencil benchmarks. For LLM decoding, it achieves up to 4.42× the system throughput of a template-based automatic mapping baseline on the same fabric size. Compared with the manually optimized WaferLLM, WaferTetris supports 1.8× the context length for LLaMA3.1-8B (80k versus 44k), while delivering equal or higher per-user throughput at matched context lengths, up to 1.10×.
