arXiv:2610.21815cs.DCOct 2026

Manuscript Offprint

arXiv:2610.21815

Exact Makespan Bounds and the GPipe Homogeneity Bias for Heterogeneous LLM Inference Pipelines

Zhu Wenbo

Abstract

We give an exact, critical-path-based characterization of the makespan of micro-batch pipelines that serve large language models (LLMs) on heterogeneous GPU clusters, and use it to quantify exactly how the classic homogeneous GPipe formula errs. In the pure-forward, communication-free, infinite-buffer setting, the makespan is exactly T(M)=(M−1)τmax⁡+∑jτjT(M) = (M - 1)\tau_{\max} + \sum_j \tau_j, where τj\tau_j is the per-micro-batch service time of pipeline stage jj, τmax⁡\tau_{\max} its maximum, and MM the number of micro-batches (Theorem 1). Under asynchronous communication — the regime of modern NCCL-based serving systems — the expression extends to T(M)=∑jτj+∑jdj+(M−1)τmax⁡T(M) = \sum_j \tau_j + \sum_j d_j + (M - 1)\tau_{\max}, where ∑jdj\sum_j d_j enters purely as an additive constant (Theorem 2); under blocking communication, T(M)=(M−1)σmax⁡+∑sσsT(M) = (M - 1)\sigma_{\max} + \sum_s \sigma_s with σs=τs+ds\sigma_s = \tau_s + d_s, so communication enters the steady-state slope iff some ds>τmax⁡−τsd_s > \tau_{\max} - \tau_s (Theorem 3). These results (i) quantify exactly how the classic GPipe homogeneous formula overestimates makespan, (ii) decompose that bias into a homogeneity-overestimate term ∑j(τmax⁡−τj)\sum_j (\tau_{\max} - \tau_j) and a communication-ignoring underestimate term ∑jdj\sum_j d_j, and (iii) sandwich any partially-overlapped real system between the two extremes, yielding a computable ceiling on the throughput gain from communication-compute overlap. Every formula is validated point-wise against the exact dynamic-programming recurrences (maximum relative error <10−9< 10^{-9} across 1.6×1051.6 \times 10^5 randomized and hand-crafted configurations, zero counterexamples), and the bias decomposition and sandwich are additionally checked against 8,571 measured requests from a live, three-generation heterogeneous GPU cluster.

1 Introduction

Pipeline parallelism (PP) is the standard mechanism for serving and training large language models whose parameters exceed the memory of a single accelerator. The foundational GPipe analysis [1] assumes homogeneous stages — every stage processes a micro-batch in the same unit time — yielding the well-known makespan S+M−1S + M - 1 (in units of per-stage time) and bubble ratio (S−1)/(S+M−1)(S - 1)/(S + M - 1) for S stages and M micro-batches. This formula, and its variants, remain the default mental model in much of the systems literature for reasoning about pipeline efficiency.

Real inference deployments violate the homogeneity assumption in two distinct ways, both of which matter in practice.

Heterogeneous accelerators. A single cluster frequently mixes GPUs of different generations. The motivating deployment behind this work spans an RTX 5090 Laptop (24 GB GDDR7, Blackwell), dual RTX 3090 (24 GB GDDR6X, Ampere), and a GTX 1070 (8 GB GDDR5, Pascal) within one cluster — three generations, with the GTX 1070 lacking tensor cores entirely. The resulting per-stage time ratio depends on which resource binds: for memory-bound decode it is the bandwidth ratio (896 / 936 / 256 GB/s, roughly 3.5×), while for compute-bound prefill the tensor-core-less GTX 1070 is up to three orders of magnitude slower (FP16 ≈ 0.1 TFLOPS vs ≈ 142 TFLOPS on the RTX 3090). Assigning each pipeline stage its own device therefore yields per-stage times τj\tau_j that differ by an order of magnitude or more, not by one. Under such ratios the homogeneous formula is not merely an approximation — it is systematically wrong.

Non-zero communication latency. Stages exchange activations and KV cache over PCIe, NVLink, or Ethernet with non-zero per-transfer latency djd_{j}. Depending on the runtime, this transfer either overlaps with computation (asynchronous, the NCCL/CUDA-stream regime) or blocks the stage (synchronous). The two regimes produce qualitatively different makespan behavior, as we show.

The correct makespan of such a pipeline is the critical-path length of the resulting schedule — a quantity that is classical in flow-shop scheduling [2, 3]. Its exact value, however, and in particular its consequences for heterogeneous LLM inference, have to our knowledge not been stated explicitly in the serving-systems literature, which largely works with asymptotic or heuristic treatments. This paper makes three things explicit and rigorously verified:

  1. The exact bias of the classic homogeneous GPipe formula, decomposed into a homogeneity-overestimate term ∑j(τmax⁡−τj)\sum_j(\tau_{\max} - \tau_j) and a communication-ignoring underestimate term ∑jdj\sum_j d_j, together with a phase transition condition under which communication flips from an additive constant into a throughput bottleneck (Corollaries 1–4).

  2. An exact, critical-path-based characterization of the makespan under three communication regimes — communication-free (Theorem 1), asynchronous (Theorem 2), and blocking (Theorem 3) — each proved by a sandwich argument. These formulas are the classical flow-shop critical-path length instantiated for heterogeneous LLM inference; the novelty is the instantiation and its consequences, not a new lower-bound technique.

  3. A computable sandwich on the makespan of any real, partially-overlapped system, which yields a closed-form upper bound on the throughput gain achievable by communication-compute overlap — turning the informal “overlap helps” into a quantifiable ceiling.

The setting is deliberately restricted to the pure-forward, infinite-buffer, micro-batch fill-drain pipeline: stages process micro-batches in a fixed linear order, with no backward dependencies (unlike training) and no buffer limits. This is the structure of pipeline-parallel (PP) inference, where a forward-only stream of micro-batches — requests, prefill chunks, or the per-step tokens of a decode batch — flows through the stages. The per-micro-batch time τj\tau_{j} is therefore a service time, memory-bound in decode and compute-bound in prefill, not a raw FLOP count. Extensions — bandwidth-limited communication, bounded buffers, and prefill-decode interleaving — are discussed in §10 and remain open.

The rest of the paper is organized as follows. §2 defines the system model and notation. §3–§5 state and prove the three theorems and their corollaries. §6 draws out the optimization implications. §7 reports numerical validation. §8 positions the work against flow-shop scheduling and LLM systems. §9 discusses the sandwich bound in the context of real deployments. §10 states limitations honestly. §11 concludes. Appendices collect proof details, the full validation configuration table, and reproducibility instructions.

References (28)