Abstract
As deep learning models scale to hundreds of billions of parameters, the demand for specialized tiled and wafer-scale accelerators has surged. However, the complexity of mapping massive models across thousands of interconnected cores makes performance optimization a significant challenge. This paper introduces PALM, a high-efficiency performance simulator designed to model large-scale training workloads. By utilizing a novel "Virtual Tile Aggregation" technique and a detailed bandwidth model, PALM provides accurate performance predictions with an average error of less than 17% compared to real-world hardware, enabling rapid exploration of parallelism strategies without the prohibitive costs of physical experimentation.
Introduction
The rise of Large Language Models (LLMs) like GPT-3 has necessitated hardware architectures that go beyond traditional GPUs. Tiled accelerators—composed of thousands of small, interconnected processing "tiles"—offer a promising solution. Yet, programming these systems is fraught with difficulty. Developers must navigate a complex design space of hybrid parallelism (Data, Tensor, and Pipeline parallelism) and physical mapping.
Existing simulation tools often fall into two extremes: cycle-accurate models that are too slow for large-scale training, or simple analytical models that fail to capture critical network-on-chip (NoC) and memory (DRAM) contention. PALM addresses this gap by providing an event-driven simulation framework that balances speed and accuracy.
The PALM Framework
PALM is built on the SimPy framework and introduces three primary innovations to streamline the simulation of massive model training:
- Virtual Tile Aggregation: To avoid the $O(N^2)$ complexity of simulating every individual tile, PALM groups tiles performing identical tasks into "virtual tiles." This reduces complexity to $O(M)$, where $M$ is the number of model layers, significantly accelerating simulation time.
- Adaptive Parallelism Interface: This flexible interface allows users to define complex hybrid parallelism strategies and bind them to specific physical tile coordinates, facilitating the study of spatial mapping effects.
- Detailed Bandwidth Model: PALM explicitly models contention between on-chip SRAM, the NoC, and off-chip DRAM. By accounting for the physical distance (hops) and topology, it provides a realistic estimate of communication overhead.
Parallelism Mapping and Hardware Interaction
A key insight from PALM is that physical layout is as critical as the parallelism strategy itself. For instance, mapping a model's pipeline in an "S-shape" across the tile grid can reduce data travel distance compared to a linear mapping, potentially doubling performance. PALM allows researchers to visualize how different collective communication patterns (e.g., All-reduce, All-to-all) interact with the hardware's specific bandwidth constraints.
Validation and Results
The researchers validated PALM against a diverse set of benchmarks, including ResNet50, BERT-base, and LLMs ranging from 18B to 530B parameters. Comparisons were made against established hardware baselines such as Nvidia V100/H100 GPUs, the Tenstorrent Grayskull accelerator, and the Cerebras Wafer-Scale Engine (WSE).
Key findings include:
- High Accuracy: Average prediction error remained below 17% across all tested scenarios.
- Communication Precision: Ring-topology all-reduce tasks were modeled with less than 5% error.
- Scalability: PALM successfully simulated large-scale LLM training scenarios with less than 15% error compared to Megatron-LM empirical data.
Conclusion and Future Work
PALM provides a vital tool for the co-design of large-scale AI models and tiled hardware. By accurately modeling the trade-offs between on-chip SRAM and off-chip DRAM access, and the impact of spatial mapping on NoC contention, it empowers developers to optimize throughput before committing to expensive hardware runs. Future iterations of PALM will incorporate power and energy modeling and aim to automate the discovery of optimal mapping configurations through advanced search algorithms.
Summary updated