Table of Contents
Fetching ...

Swing: Short-cutting Rings for Higher Bandwidth Allreduce

Daniele De Sensi, Tommaso Bonato, David Saam, Torsten Hoefler

TL;DR

Swing, a new algorithm that keeps a low distance between communicating nodes by swinging between torus directions, is introduced, which outperforms by up to 3x existing allreduce algorithms for vectors ranging from 32B to 128MiB, on different types of torus and torus-like topologies, regardless of their shape and size.

Abstract

The allreduce collective operation accounts for a significant fraction of the runtime of workloads running on distributed systems. One factor determining its performance is the distance between communicating nodes, especially on networks like torus, where a higher distance implies multiple messages being forwarded on the same link, thus reducing the allreduce bandwidth. Torus networks are widely used on systems optimized for machine learning workloads (e.g., Google TPUs and Amazon Trainium devices), as well as on some of the Top500 supercomputers. To improve allreduce performance on torus networks we introduce Swing, a new algorithm that keeps a low distance between communicating nodes by swinging between torus directions. Our analysis and experimental evaluation show that Swing outperforms by up to 3x existing allreduce algorithms for vectors ranging from 32B to 128MiB, on different types of torus and torus-like topologies, regardless of their shape and size.

Swing: Short-cutting Rings for Higher Bandwidth Allreduce

TL;DR

Swing, a new algorithm that keeps a low distance between communicating nodes by swinging between torus directions, is introduced, which outperforms by up to 3x existing allreduce algorithms for vectors ranging from 32B to 128MiB, on different types of torus and torus-like topologies, regardless of their shape and size.

Abstract

The allreduce collective operation accounts for a significant fraction of the runtime of workloads running on distributed systems. One factor determining its performance is the distance between communicating nodes, especially on networks like torus, where a higher distance implies multiple messages being forwarded on the same link, thus reducing the allreduce bandwidth. Torus networks are widely used on systems optimized for machine learning workloads (e.g., Google TPUs and Amazon Trainium devices), as well as on some of the Top500 supercomputers. To improve allreduce performance on torus networks we introduce Swing, a new algorithm that keeps a low distance between communicating nodes by swinging between torus directions. Our analysis and experimental evaluation show that Swing outperforms by up to 3x existing allreduce algorithms for vectors ranging from 32B to 128MiB, on different types of torus and torus-like topologies, regardless of their shape and size.
Paper Structure (41 sections, 5 theorems, 12 equations, 15 figures, 2 tables)

This paper contains 41 sections, 5 theorems, 12 equations, 15 figures, 2 tables.

Key Result

Lemma A.1

$\rho(s)$ and $\delta(s)$ are odd $\forall s \in \mathbb{N}$.

Figures (15)

  • Figure 1: First three steps of the recursive doubling and Swing allreduce algorithms on a 1D torus with $16$ nodes.
  • Figure 2: Example of recursive doubling on a $4x4$ torus. Wrap-around links are not shown.
  • Figure 3: First 2 step of the Swing algorithm on a 1D torus with 7 nodes.
  • Figure 4: First step of the Swing algorithm on a 4x4 torus.
  • Figure 5: Multiport Swing collective on a 2x4 torus.
  • ...and 10 more figures

Theorems & Definitions (10)

  • Lemma A.1
  • proof
  • Lemma A.2
  • proof
  • Lemma A.3
  • proof
  • Lemma A.4
  • proof
  • Theorem A.5
  • proof