Skip to main content
QUICK REVIEW

[Paper Review] Pathways: Asynchronous Distributed Dataflow for ML

Paul Barham, Aakanksha Chowdhery|arXiv (Cornell University)|Mar 23, 2022
Parallel Computing and Optimization TechniquesComputer Science37 citations
TL;DR

Pathways presents a single-controller, asynchronous distributed dataflow system that achieves high accelerator utilization and supports heterogeneous, MPMD patterns across thousands of accelerators through a sharded dataflow graph and centralized scheduling.

ABSTRACT

We present the design of a new large scale orchestration layer for accelerators. Our system, Pathways, is explicitly designed to enable exploration of new systems and ML research ideas, while retaining state of the art performance for current models. Pathways uses a sharded dataflow graph of asynchronous operators that consume and produce futures, and efficiently gang-schedules heterogeneous parallel computations on thousands of accelerators while coordinating data transfers over their dedicated interconnects. Pathways makes use of a novel asynchronous distributed dataflow design that lets the control plane execute in parallel despite dependencies in the data plane. This design, with careful engineering, allows Pathways to adopt a single-controller model that makes it easier to express complex new parallelism patterns. We demonstrate that Pathways can achieve performance parity (~100% accelerator utilization) with state-of-the-art systems when running SPMD computations over 2048 TPUs, while also delivering throughput comparable to the SPMD case for Transformer models that are pipelined across 16 stages, or sharded across two islands of accelerators connected over a data center network.

Motivation & Objective

  • Motivate the need for a programmable, scalable ML system that supports heterogeneous and sparse workloads beyond traditional SPMD MPI-style models.
  • Propose a single-controller architecture with sharded dataflow and asynchronous dispatch to match multi-controller performance.
  • Enable centralized resource management and gang scheduling to improve utilization and support novel parallelism patterns.
  • Provide a programming model that accommodates non-SPMD computations and supports easy integration with existing frameworks like JAX/TensorFlow.

Proposed method

  • Introduce a sharded dataflow graph where each node represents a compiled function and edges express data transfers.
  • Implement a centralized resource manager that allocates virtual device slices over accelerator islands and maps them to physical devices.
  • Use Plaque-based cross-host coordination to form a low-level dataflow program from the Pathways IR, enabling sparse, high-throughput DCN communication.
  • Incorporate parallel asynchronous dispatch to overlap host-side work with scheduling and data transfers for regular (predictable) computations.
  • Employ a central scheduler per island to order executions and enable gang-scheduling of SPMD computations across many shards.
  • Maintain a sharded object store to manage buffers across CPU, GPU, and accelerator memories, with back-pressure and GC.

Experimental results

Research questions

  • RQ1Can a single-controller, asynchronous dataflow system match the performance of multi-controller ML systems on large-scale accelerators?
  • RQ2How can centralized resource management and gang scheduling enable efficient MPMD and heterogeneous workloads across thousands of accelerators?
  • RQ3What programming model and IR design enable support for non-SPMD workloads while preserving performance?
  • RQ4What are the data movement and coordination mechanisms required to achieve high utilization across IPIs, DCN, and interconnects?
  • RQ5How does Pathways perform in micro-benchmarks and end-to-end ML workloads compared to JAX, TF, and Ray across various configurations?

Key findings

  • Pathways achieves approximately 100% accelerator utilization when running SPMD computations across 2048 TPUs.
  • Pathways delivers throughput comparable to SPMD baselines for Transformer models pipelined across 16 stages or sharded across two accelerator islands connected over a data center network.
  • Parallel asynchronous dispatch reduces host-side bottlenecks and yields better throughput than sequential dispatch, especially as pipeline stages increase.
  • Pathways matches JAX throughput for sufficiently large computations and scales to thousands of accelerators, outperforming some single-controller frameworks on micro-benchmarks.
  • The system supports multi-tenancy, enabling concurrent program execution with high aggregated throughput and efficient resource sharing.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.