Soft Constraints, Strong Solutions: Optimizing Intra-Operator Parallelism for Distributed Deep Learning

Christoph Staudt, Mark BlacherOpenReview 2026 · Submission to ICLR 2026 · Rejected

TL;DR

This paper presents the winning solution to the ASPLOS/EuroSys 2025 Contest on Intra-Operator Parallelism. By relaxing strict memory constraints into adaptive, per-node penalties, the authors transform a daunting combinatorial optimization problem into an efficient Cost Function Network (CFN) task that consistently outperforms production compilers like XLA by orders of magnitude.

What Problem Does This Paper Address?

As deep learning models scale to billions of parameters, they can no longer fit on a single accelerator (like a GPU or TPU). To handle this, compilers use intra-operator parallelism, which shards individual operations (e.g., a massive matrix multiplication) across a mesh of devices.

The challenge lies in "strategy selection": for every operation in a model’s computational graph, the compiler must choose a sharding strategy that minimizes the combined cost of computation and communication. However, this choice is governed by a "hard" constraint—the total memory used by active operations at any discrete time step must not exceed the hardware's physical limit. Because memory usage varies over time and strategies interact across the graph, finding the global optimum is an NP-hard combinatorial problem that existing production solvers often fail to solve efficiently.

Methods

The authors’ approach, which secured first place in the competition, relies on three main pillars:

  1. Lagrangian-Inspired Relaxation: Instead of treating memory limits as "hard" walls that the solver cannot cross, they convert them into "soft" penalties added to the objective function. While standard Lagrangian relaxation uses multipliers for each time step, this paper proposes per-node usage penalties ($w_v$). This makes the optimization landscape smoother and easier to navigate.
  2. Cost Function Networks (CFNs): Once the constraints are relaxed, the problem takes the form of a CFN—a mathematical model where the goal is to minimize the sum of unary costs (individual node strategies) and binary costs (communication between dependent nodes). The authors leverage toulbar2, a high-performance exact solver designed specifically for these types of graphical models.
  3. Adaptive Weight Optimization: The core algorithm (Algorithm 1) iteratively adjusts the penalty weights. If a solution exceeds memory limits, the weights for the offending nodes are increased; if a solution is feasible, weights are decreased to hunt for lower-cost strategies.
  4. Greedy Post-processing: After the CFN solver finds a feasible solution, a final pass performs local "swaps"—checking if changing a single node's strategy can further reduce cost without breaking the memory budget.

Datasets

The evaluation uses a newly curated benchmark suite from Google, consisting of 25 large-scale instances derived from real-world production workloads. These include:

  • Architectures: Graph Network Simulators (GNS), U-Nets, diffusion models, and the Gemma 1 and Gemma 2 language models.
  • Tasks: Both Supervised Fine-Tuning (SFT) and Inference.
  • Scale: The largest graphs contain over 62,000 nodes and 91,000 edges, with some nodes having over 20,000 candidate strategies.
  • Public vs. Private: 5 instances were released for development, while 20 were withheld for the final contest evaluation.

Key Insights and Ideas

  • Softening the Constraints: The "aha moment" is that enforcing hard memory limits during the search process makes the problem too rigid for standard solvers. By allowing the solver to temporarily "break" the rules and then penalizing that behavior, the algorithm can explore the search space much more effectively.
  • Per-Node vs. Per-Time-Step: Traditional relaxation penalizes specific moments in time when memory is exceeded. However, because a single node's strategy affects memory over a duration, penalizing the node directly provides a more stable signal for the solver to reach feasibility.
  • CFN Efficiency: The paper demonstrates that specialized graphical model solvers (like toulbar2) are surprisingly capable of handling tens of thousands of variables, provided the problem is formulated to exploit the graph's underlying structure.

Key Results

  • Contest Victory: The solver achieved a score of 18.74 out of 20 on the hidden benchmarks, significantly gapping the second-place team (13.84).
  • Dominating XLA: Compared to XLA (the compiler for JAX and TensorFlow), the proposed solver produced solutions that were often orders of magnitude cheaper in terms of total cost. In several challenging cases, XLA failed to find any feasible solution, whereas this solver succeeded.
  • Near-Optimality: By comparing their results to theoretical lower bounds (calculated using Gurobi over 72-hour runs), the authors found their solutions were typically within 5% of the global optimum, and always within 27%, despite running in just a few minutes.
  • Speed: For many instances, the solver converged to high-quality solutions in just a few seconds, making it practical for real-world compiler pipelines.

Limitations and Future Work

  • Initial Bugs: The authors noted that their initial contest submission had bugs affecting two specific benchmarks (V and W), though these were corrected in the post-contest version of the paper.
  • Integration: While the solver is highly effective, it currently operates as a standalone tool. The next step is integrating this logic directly into production compiler infrastructures like Alpa, XLA, or TVM.
  • Resource Dimensions: The current model focuses on compute, communication, and memory. Future work could extend this framework to handle other resource constraints, such as interconnect bandwidth limits or power consumption targets.

Summary updated

Abstract

As deep learning models grow in size and complexity, efficiently mapping their computations onto distributed hardware is a central challenge for systems and compiler design. A key technique for addressing this challenge is intra-operator parallelism, which partitions individual operations across multiple devices. To accelerate research on automated intra-operator parallelism, Google curated a benchmark suite of 25 large-scale instances drawn from real production workloads including Graph Network Simulators, U-Nets, diffusion models, and Gemma 1 and Gemma 2 language models, and organized the ASPLOS/EuroSys 2025 Contest on Intra-Operator Parallelism for Distributed Deep Learning. The contest formalized intra-operator parallelism as a constrained combinatorial optimization problem in which each computational-graph node must be assigned an execution strategy that minimizes compute and communication cost while satisfying strict time-varying memory limits. This paper presents the winning solution. We show that relaxing the hard memory constraints enables the problem to be reformulated as a Cost Function Network optimization task. Building on this idea, we develop a solver that combines adaptive penalty-based relaxation with efficient Cost Function Network optimization. The method quickly produces feasible strategies with costs near the global optimum on nearly all benchmark instances, consistently outperforming XLA, the production-grade compiler used in TensorFlow and JAX, often by orders of magnitude.
BibTeX
@misc{staudt2026soft,
  author = {Christoph Staudt and Mark Blacher},
  title = {{Soft Constraints, Strong Solutions: Optimizing Intra-Operator Parallelism for Distributed Deep Learning}},
  year = {2026},
  url = {https://openreview.net/forum?id=xvzwLMgX3U},
  howpublished = {OpenReview},
  note = {Submitted to ICLR 2026},
}
Figure