Skip to main content
QUICK REVIEW

[Paper Review] Automap: Towards Ergonomic Automated Parallelism for ML Models

Michael Schaarschmidt, Dominik Grewe|arXiv (Cornell University)|Dec 6, 2021
Parallel Computing and Optimization TechniquesComputer Science5 citations
TL;DR

Automap is a prototype automated partitioner that enables ergonomic, compiler-integrated SPMD-style parallelism for ML models by combining inductive biases, search, and learning to recover expert sharding strategies like Megatron's for transformers. It achieves near-expert performance in minutes via a platform-independent IR and incremental rewriting, reducing manual effort while scaling to complex models with minimal user input.

ABSTRACT

The rapid rise in demand for training large neural network architectures has brought into focus the need for partitioning strategies, for example by using data, model, or pipeline parallelism. Implementing these methods is increasingly supported through program primitives, but identifying efficient partitioning strategies requires expensive experimentation and expertise. We present the prototype of an automated partitioner that seamlessly integrates into existing compilers and existing user workflows. Our partitioner enables SPMD-style parallelism that encompasses data parallelism and parameter/activation sharding. Through a combination of inductive tactics and search in a platform-independent partitioning IR, automap can recover expert partitioning strategies such as Megatron sharding for transformer layers.

Motivation & Objective

  • To automate the discovery of efficient data, model, and pipeline parallelism strategies for large ML models without requiring expert knowledge or manual rewriting.
  • To integrate seamlessly into existing compiler stacks (e.g., XLA) and user workflows in JAX, avoiding reimplementation for specific hardware.
  • To reduce the time and cost of experimentation by enabling fast, interactive partitioning with minimal user input, supporting rapid research iteration.
  • To scale to complex, unstructured models with tens of thousands of operations by leveraging inductive biases and model structure (e.g., repeated blocks).
  • To support practical deployment across diverse accelerator fleets, including older hardware, by enabling efficient partitioning without architectural rewrites.

Proposed method

  • The system uses a novel, platform-agnostic partitioning IR (a dialect in MLIR) layered over XLA HLO to express sharding and replication decisions as rewrite rules.
  • It applies a hybrid approach combining Monte Carlo Tree Search (MCTS) with a learned model to guide search, reducing the number of trials needed to find high-quality strategies.
  • Inductive biases are embedded by mimicking expert sharding patterns (e.g., Megatron) to constrain the search space and improve convergence.
  • The system supports incremental rewriting, propagating sharding decisions across the computation graph where possible, especially through shared constants and layer groups.
  • Users can provide high-level hints via named scopes (e.g., 'attention-block') to group repeated layers, drastically improving search efficiency and reliability.
  • The prototype is trained on synthetic data using an Interaction Network in JAX, with optimization via Optax and graph neural network reasoning for partitioning decisions.

Experimental results

Research questions

  • RQ1Can automated partitioning be achieved with minimal user input while maintaining performance comparable to expert-optimized strategies like Megatron?
  • RQ2How can search efficiency be improved in large, unstructured models with tens of thousands of operations?
  • RQ3To what extent can inductive biases derived from expert practices reduce the search space and accelerate convergence?
  • RQ4Can compiler hints (e.g., named layer groups) replace fragile dependency propagation across shared constants to improve robustness in deep networks?
  • RQ5How does the combination of learning and search affect the time-to-solution in real-world research workflows?

Key findings

  • The system discovered Megatron-style sharding in under 500 search episodes (approx. minutes), achieving near-Megatron performance on TPU v3 with only a small runtime penalty.
  • Using a learned filter to guide MCTS reduced the number of required episodes to reliably find near-optimal solutions, demonstrating the value of data-driven search.
  • With compiler hints (e.g., named layer groups), Megatron sharding was found reliably in a small number of episodes, even without relying on shared constant propagation across layers.
  • Without grouping or propagation, Megatron sharding was not found for a 24-layer Transformer, highlighting the critical role of structural hints in scalability.
  • The prototype successfully partitioned non-standard models like GraphNets, discovering practical strategies such as input edge sharding for larger-scale experimentation.
  • The approach scales to models with 50k–100k operations, with search times suitable for interactive research workflows (minutes, not hours).

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.