OptCCL: Scalable Synthesis of Optimal Collective Communication AlgorithmsOptCCL:可擴展地合成最佳集體通訊演算法
After reading, you can explain why step-based schedule solvers trade optimality for scale, and how OptCCL routes first, schedules second and solves one subproblem per class of identical GPUs.讀完後,你能說明以時間步建模的排程求解器為何只能在最佳性與規模之間二選一,以及 OptCCL 如何先決定路由、再排程,並對每一類相同的 GPU 只解一個子問題。
Schedule synthesizers such as TE-CCL and SyCCL cut time into steps. Step size and step count are tied, so they get optimality or speed, not both: in most of the authors' runs they found no schedule beyond 16–64 GPUs within 3 hours. OptCCL solves space before time. A linear program (LP) picks the routes under bandwidth limits that hold only on average; the paper's Theorem 2 states that this loses nothing. Weighted fair queueing cuts the routes into fixed-size chunks, and a symmetry-aware decomposition solves one subproblem per class of identical GPUs. Measured synthesis time: hundreds of GPUs in tens of minutes, and 3–32× faster than SyCCL at 64 GPUs and more. The quality of the schedules was only simulated.
TE-CCL、SyCCL 這類排程合成器把時間切成步。步長與步數綁在一起,所以最佳性與速度只能擇一:在作者的大多數實驗中,它們在 3 小時內找不到超過 16–64 顆 GPU 的排程。OptCCL 先解空間、後解時間。一個線性規劃(LP)在只需平均成立的頻寬限制下選擇路由;論文的定理 2 指出這樣不損失任何東西。加權公平佇列(weighted fair queueing)把路由切成固定大小的 chunk,感知對稱性的分解法則對每一類相同的 GPU 只解一個子問題。實測的合成時間:數百顆 GPU 在數十分鐘內完成;在 64 顆 GPU 以上比 SyCCL 快 3–32 倍。排程本身的品質只做了模擬。
1. Where this paper sits1. 這篇論文的位置
Section 9.1 of the Chapter 4 asks whether a solver can beat ring and tree and still finish in time. TE-CCL solves multi-commodity flow on a time-expanded network, one copy of the network per time step: optimal, but it grows with GPUs, steps and chunks. SyCCL solves small sub-demands once and reuses them for isomorphic GPU groups: fast, but with no optimality guarantee. OptCCL (Cornell) claims every property of the paper's Table 1, part of which is below (★: possible with natural extensions).
第 4 章第 9.1 節問的是:求解器能否勝過環與樹,而且來得及算完。TE-CCL 在時間展開網路(time-expanded network)上解多商品流,每個時間步複製一份網路:它是最佳的,但規模隨 GPU、步數與 chunk 數成長。SyCCL 對小的子需求只解一次,再套用到同構的 GPU 群組:很快,但不保證最佳。OptCCL(Cornell)宣稱具備論文 Table 1 的所有性質,下表列出其中一部分(★:經自然延伸即可具備)。
| System系統 | Optimal最佳 | Scalable可擴展 | All collectives所有集體操作 | Any hardware任意硬體 | Concurrent collectives並行集體操作 |
|---|---|---|---|---|---|
| NCCL | ✗ | ✓ | ✓ | ✓ | ✓ |
| TACCL | ✗ | ✓ | ✓ | ✗ | ✗ |
| SyCCL | ✗ | ✓ | ✓ | ✗ | ✗ |
| TE-CCL | ✓ | ✗ | ✓ | ★ | ★ |
| ForestColl | ✓ | ✓ | ✗ | ✗ | ✗ |
| OptCCL | ✓ | ✓ | ✓ | ✓ | ✓ |
2. The problem: steps tie optimality to size2. 問題:時間步把最佳性與規模綁在一起
This argument is analysis, not measurement. A formulation with steps of size completes in . The time-expanded network has one layer per step, so the LP grows roughly linearly with : we want few steps. But data enter a path one step at a time, so coarse steps leave links idle, a loss that grows with : we want small steps (Figure 1). With fixed, we cannot have both. The exact integer program must also be solved for many candidate and , up to times.
這個論點是分析,不是量測。一個有 步、每步長 的模型,完成時間是 。時間展開網路每一步一層,所以 LP 大約隨 線性成長:我們希望步數少。但資料是一步一步進入路徑的,步長粗時鏈路會閒置,損失隨 成長:我們希望步長小(圖 1)。 固定時,兩者無法兼得。精確的整數規劃還得對許多候選的 與 求解,最多 次。
Steps tie the spatial problem (which paths) to the temporal one (what crosses each link in each step). The evaluation measured where this stops: with each baseline's public code and a 3-hour limit, TE-CCL found no schedule beyond 16–32 GPUs, SyCCL none beyond 64–128, and TACCL scaled like SyCCL (§7.1).
時間步把空間問題(走哪些路徑)和時間問題(每一步每條鏈路傳什麼)綁在一起。評估量測了它在哪裡停下:使用各基準的公開程式碼、限時 3 小時,TE-CCL 超過 16–32 顆 GPU 就找不到排程,SyCCL 超過 64–128 顆也找不到,TACCL 與 SyCCL 相近(§7.1)。
3. The design: space first, then time3. 設計:先空間,後時間
OptCCL splits the problem into routing and scheduling (Figure 2).
OptCCL 把問題拆成路由與排程兩半(圖 2)。
3.1 The model and the usage variable3.1 模型與用量變數
Each component (GPU, CPU, memory, switch) can store, transmit, copy or reduce data, in any subset. The topology becomes a directed graph : an edge per link direction, a self-loop where data can be stored, and a shared limit for each set of edges, such as a link or a memory. copies every vertex times (Figure 3).
每個元件(GPU、CPU、記憶體、交換器)可以儲存、傳送、複製或歸約資料,能力為任意子集。拓樸變成有向圖 :每條鏈路的每個方向一條邊,能儲存資料之處有自迴圈,每組邊 (例如一條鏈路或一個記憶體)共用一個上限 。 把每個頂點複製 份(圖 3)。

The objective is completion time; among optimal algorithms, OptCCL also minimizes a weighted sum of link bytes. A commodity is one sender–destination pair , with ordinary flow conservation for its flow . TE-CCL builds the collective's structure into its flow constraints; OptCCL adds a usage variable , the data of origin that edge really carries. One AllGather transmission can serve every destination, so:
目標是完成時間;在所有最佳演算法中,OptCCL 還最小化各鏈路位元組的加權和。一個商品(commodity)是一對發送端–目的端 ,其流 遵守一般的流守恆。TE-CCL 把集體操作的結構寫進流量限制;OptCCL 則加上用量變數(usage variable),表示邊 實際承載、來自起點 的資料。AllGather 的一次傳送就能服務每個目的端,所以:
Usage covers the largest flow, not the sum: this is copy, written as a linear constraint.
用量只需涵蓋最大的流而非總和:這就是把複製寫成線性限制。
3.2 Route first: an LP over average bandwidth3.2 先路由:以平均頻寬寫成的 LP
OptCCL drops the per-step limit. It asks only that each edge set carry at most times its bandwidth over the target completion time :
OptCCL 拿掉每一步的上限,只要求每組邊在目標完成時間 內承載的量不超過 乘以其頻寬:
is edge in layer , and is now only a hop budget. Theorem 2: LP(9) and the step-based LP(7) convert into each other at equal cost and, up to any small , equal completion time, so one LP covers every step size. Max-flow problems give the optimal directly (a ForestColl technique).
是第 層的邊 ,此時 只是跳數預算。定理 2:LP(9) 與時間步的 LP(7) 能以相同成本互相轉換,完成時間也只差任意小的 ,所以一個 LP 就涵蓋所有步長。最佳的 由最大流問題直接算出(取自 ForestColl 的技巧)。
The LP can still cheat: the usage constraint assumes that flows from one origin on one edge carry the same data. OptCCL turns the routing into trees per sender and checks every edge. If all fit, the routing is optimal, since a relaxation's optimum is a lower bound. If not, it splits the offending vertex per destination and solves again (Figure 4).
LP 仍可能「作弊」:用量限制假設同一起點在同一條邊上的流都帶相同資料。OptCCL 把路由轉成每個發送端的樹,逐邊檢查。全部通過時路由就是最佳的,因為鬆弛問題的最佳值是下界。不通過時,就把出問題的頂點依目的端拆分,再解一次(圖 4)。
Theorem 3: no repair is needed in an ideal topology, where optimal paths cross at most four links and the limits and costs sit on switch–NIC links. NVLink hosts on one tier of rail switches qualify when all data take the shortest path: the NIC is the bottleneck, and such paths are GPU → NIC → switch → NIC → GPU.
定理 3:在理想拓樸(ideal topology)中完全不必修補;這種拓樸的最佳路徑最多經過四條鏈路,上限與成本都位於交換器–NIC 鏈路。單層 rail 交換器連接的 NVLink 主機,在所有資料都走最短路徑時就符合:NIC 是瓶頸,這種路徑是 GPU → NIC → 交換器 → NIC → GPU。
3.3 Schedule second: fixed-size chunks by fair queueing3.3 後排程:以公平佇列產生固定大小的 chunk
Libraries send fixed-size chunks. OptCCL groups each sender's paths into a few trees with volumes and emulates them with weighted fair queueing (Parekh and Gallager). Each tree releases chunks of size at a steady rate, and a shared edge first sends the chunk with the smallest virtual time: when its data would finish there in the LP solution. Theorem 4 bounds the completion time with chunks:
函式庫傳送固定大小的 chunk。OptCCL 把每個發送端的路徑組成少數幾棵樹,各有量 ,並以加權公平佇列(Parekh 與 Gallager)模擬它們。每棵樹以穩定速率釋出大小 的 chunk,共用的邊先送虛擬時間(virtual time)最小的 chunk:也就是在 LP 解中它的資料在該邊傳完的時間。定理 4 給出切成 chunk 後完成時間 的上界:
is the smallest tree volume and the smallest bandwidth. If both carry far more than bytes during , is close to ; larger collectives and scale only help.
是最小的樹量, 是最小的頻寬。若兩者在 內傳的量都遠大於 位元組, 就接近 ;集體操作與規模越大只會更好。
3.4 Every collective, any hardware3.4 所有集體操作、任意硬體
- Switches without multicast: OptCCL adds flow conservation on the usage there, and splits a vertex only in corner cases; splitting every such vertex up front can nearly square the graph.不支援 multicast 的交換器:OptCCL 在這些頂點對用量加上流守恆,只在少數情況拆分頂點;若事先拆分所有這類頂點,圖可能接近平方倍。
- AllReduce: some optimal AllReduce reduces every piece before it copies it (Theorem 5), yet a plain ReduceScatter then AllGather can still lose, so OptCCL solves both phases in one LP.AllReduce:存在一種最佳 AllReduce,先把每份資料歸約完再複製(定理 5),但單純先 ReduceScatter 再 AllGather 仍可能吃虧,所以 OptCCL 在一個 LP 中同時解兩個階段。
- Others: All-to-All needs no usage variables, ReduceScatter is AllGather reversed, and concurrent collectives share the average limits under one objective, the makespan (the time to finish all).其他:All-to-All 不需要用量變數,ReduceScatter 是反向的 AllGather,並行的集體操作則在同一個目標 makespan(全部完成所需的時間)下共用平均上限。
3.5 Symmetry: one subproblem per class of GPUs3.5 對稱性:每一類 GPU 一個子問題
LP(9) for an AllGather on GPUs has variables, but only the bandwidth limits link the origins, through the usage variables. Dantzig–Wolfe decomposition uses this: a master problem holds those limits, and each origin's subproblem proposes routings under the master's prices, so each iteration solves subproblems.
顆 GPU 的 AllGather,LP(9) 有 個變數,但只有頻寬上限透過用量變數把各起點連在一起。Dantzig–Wolfe 分解利用這一點:主問題保存這些上限,每個起點的子問題依主問題給的價格提出路由,所以每次迭代要解 個子問題。
Mirrored Dantzig–Wolfe adds symmetry. Two GPUs are indistinguishable if the input without labels looks the same from both. Theorem 6: a symmetric input has a symmetric optimal solution. So OptCCL solves one subproblem per class (Figure 5), each roughly times smaller than the LP, in the paper's words. SyCCL instead repeats each route pattern in every isomorphic group, which, the authors state, no longer guarantees optimality (shown in their technical report).
Mirrored Dantzig–Wolfe 再加上對稱性。若去掉標籤後,從兩顆 GPU 看出去的輸入都一樣,它們就無法區分。定理 6:對稱的輸入有對稱的最佳解。所以 OptCCL 每一類只解一個子問題(圖 5),依論文的說法,每個子問題大約比整個 LP 小 倍。SyCCL 則讓每個路由模式在每個同構群組中重複;作者指出這樣就不再保證最佳(在其技術報告中說明)。
Panel 1 sets the LP's size beside the measured synthesis times.
面板 1 把 LP 的大小與實測的合成時間並列。
4. Implementation4. 實作
The code is public on GitHub; the paper gives no language, solver or line count. Synthesis time covers one representative schedule per symmetry class, not its expansion to every GPU. Switches could only store and transmit (no multicast or in-network reduction). OptCCL is not yet integrated with NCCL or RCCL.
程式碼公開在 GitHub;論文沒有說明語言、求解器或程式行數。合成時間只涵蓋每個對稱類一個代表性排程,不包含展開到每顆 GPU。交換器只能儲存與傳送(沒有 multicast 或網內歸約)。OptCCL 尚未整合進 NCCL 或 RCCL。
5. What was measured5. 量到了什麼
The topologies were "A100" (8 GPUs per host) and "DOE" (4 GPUs per host, after NERSC's Perlmutter), with NVLink inside hosts and a Rail-only-style multi-rail network between them, on 4 or 8 up to 256 GPUs. TE-CCL, SyCCL and TACCL ran from public code, each at the largest chunk count it finished within 3 hours; SyCCL cannot run one host, and TACCL's All-to-All has known bugs. Link bandwidths and data and chunk sizes are not stated.
拓樸是「A100」(每主機 8 顆 GPU)與「DOE」(每主機 4 顆 GPU,依 NERSC 的 Perlmutter),主機內為 NVLink,主機之間是 Rail-only 式的 multi-rail 網路,規模從 4 或 8 顆到 256 顆 GPU。TE-CCL、SyCCL 與 TACCL 以公開程式碼執行,各取 3 小時內能完成的最大 chunk 數;SyCCL 無法執行單一主機,TACCL 的 All-to-All 有已知錯誤。論文沒有說明鏈路頻寬、資料大小與 chunk 大小。
Only the synthesis times are measurements: the paper states that its evaluation uses simulations, so the bandwidth of every schedule and the concurrent-collective results are computed, not run, and this page leaves them out.
只有合成時間是量測值:論文說明其評估使用模擬,所以每個排程的頻寬與並行集體操作的結果都是計算而非實際執行,本頁略去不列。
| Case情況 | Measured synthesis time實測合成時間 |
|---|---|
| Where the baselines stop (3 hours)基準停下的位置(3 小時) | TE-CCL beyond 16–32 GPUs, SyCCL beyond 64–128; TACCL like SyCCLTE-CCL 超過 16–32 顆 GPU、SyCCL 超過 64–128 顆;TACCL 與 SyCCL 相近 |
| OptCCL, largest sizesOptCCL,最大規模 | Hundreds of GPUs within tens of minutes; about 30 minutes for a 256-GPU AllGather (Figure 4)數百顆 GPU 在數十分鐘內;256 顆 GPU 的 AllGather 約 30 分鐘(Figure 4) |
| 64 GPUs or more64 顆 GPU 以上 | 3–32× faster than SyCCL, 5–60× faster than TACCL比 SyCCL 快 3–32 倍,比 TACCL 快 5–60 倍 |
| All-to-AllAll-to-All | 2–500× faster than TE-CCL and SyCCL比 TE-CCL 與 SyCCL 快 2–500 倍 |
| AllGather, 16 GPUs or fewerAllGather,16 顆 GPU 以下 | TACCL often faster than OptCCL (Figure 4)TACCL 常比 OptCCL 快(Figure 4) |
The paper credits much of the speed-up to Mirrored Dantzig–Wolfe, with details in its technical report. Figure 6 shows the measured curves.
論文把很大一部分的加速歸功於 Mirrored Dantzig–Wolfe,細節在其技術報告中。圖 6 是實測的曲線。

6. Limits and open questions6. 限制與未解的問題
The paper's own limits: a new collective needs carefully defined usage variables; the proofs and evaluation assume large messages, and small ones under the – model are left for later; concurrent collectives optimize only the makespan; NCCL or RCCL integration and testbed validation come next. A careful reader adds:
論文自述的限制:新的集體操作需要仔細定義用量變數;證明與評估都假設大訊息,– 模型下的小訊息留待之後;並行的集體操作只最佳化 makespan;下一步是整合進 NCCL 或 RCCL 並在測試平台驗證。細心的讀者還應補上:
- Evidence and proofs. No schedule ran on hardware; the measured quantity is solver time on one server. Theorems 1–6 are proved in a technical report outside the reviewed paper.證據與證明。沒有任何排程在硬體上跑過;量到的是單一伺服器上的求解時間。定理 1–6 的證明在審稿論文之外的技術報告中。
- Outside ideal topologies. A multi-tier Clos, or a host whose internal links bind, may need the split-and-solve loop, which in the worst case adds many vertices; the paper does not say how often its runs needed it.理想拓樸之外。多層 Clos,或主機內鏈路成為瓶頸時,可能需要「拆分再解」的迴圈,最壞情況會加入許多頂點;論文沒有說明實驗中多常用到它。
- Static input. MoE sizes known only at run time, failed links and other tenants' traffic that is not given as input are outside the model.靜態輸入。執行時才知道的 MoE 大小、故障的鏈路與未列入輸入的其他租戶流量都在模型之外。
- Baseline limits depend on settings. SyCCL's own paper reports about 37 minutes at 512 GPUs on its setup (the collectives research notes, 9.1).基準的上限取決於設定。SyCCL 自己的論文在其設定下回報 512 顆 GPU 約 37 分鐘(第 4 章第 9.1 節)。
7. How it connects7. 與其他內容的關聯
- Deep dive, section 9.1: the third step after TE-CCL and SyCCL. It replaces TE-CCL's epochs with one average limit, and SyCCL's group symmetry with a symmetry that keeps optimality.第 4 章第 9.1 節:繼 TE-CCL 與 SyCCL 之後的第三步。它以一個平均上限取代 TE-CCL 的 epoch,以保持最佳性的對稱取代 SyCCL 的群組對稱。
- Deep dive, section 4, and Rail-only: the paper's example of an ideal topology is the NVLink-plus-rail design, and the evaluation used Rail-only's network.第 4.4 節與 Rail-only:論文舉的理想拓樸例子正是 NVLink 加 rail 的設計,評估也使用 Rail-only 的網路。
- MCCS, which OptCCL cites on why collective performance matters: a provider-run service sees the topology, so such a solver could run there.MCCS(OptCCL 引用它說明集體通訊效能的重要性):供應商執行的服務看得到拓樸,這種求解器可以在那裡執行。
- Theseus accepts new solver output while a job runs, so minutes of synthesis need not stop the job.Theseus 能在任務執行中接收求解器的新輸出,所以幾分鐘的合成不必讓任務停下。
Key numbers關鍵數字
| Number | 數字 | Meaning (measured synthesis time unless noted) | 意義(除註明外皆為實測合成時間) |
|---|---|---|---|
| 16–32 / 64–128 | GPUs beyond which TE-CCL / SyCCL found no schedule in 3 h | TE-CCL / SyCCL 超過此 GPU 數就在 3 小時內找不到排程 | |
| 3–32× · 5–60× | OptCCL faster than SyCCL · TACCL, 64 GPUs or more | 64 顆 GPU 以上,OptCCL 比 SyCCL · TACCL 快的倍數 | |
| 2–500× | OptCCL faster than TE-CCL and SyCCL, All-to-All | All-to-All,OptCCL 比 TE-CCL 與 SyCCL 快的倍數 | |
| ≈ 30 min | OptCCL, 256-GPU AllGather (Figure 4, read from the plot) | OptCCL,256 顆 GPU 的 AllGather(Figure 4,讀自圖) | |
| · links條鏈路 | LP(9) variables for AllGather · path length of an ideal topology (analysis) | AllGather 的 LP(9) 變數 · 理想拓樸的路徑長度(分析) |
Terms used on this page本頁用到的術語
- Time-expanded network
- copies of every vertex, with each edge joining one layer to the next.
- 每個頂點複製 份,每條邊把一層連到下一層。
- Usage variable
- The data of one origin that an edge really carries; at least the largest flow, not their sum.
- 一條邊實際承載的、來自某個起點的資料;至少等於最大的流,而非總和。
- Ideal topology
- Optimal paths of at most four links, with limits on switch–NIC links; the LP alone is exact.
- 最佳路徑最多四條鏈路,上限位於交換器–NIC 鏈路;光靠 LP 就是精確的。
- Mirrored Dantzig–Wolfe
- Dantzig–Wolfe decomposition with one subproblem per class of indistinguishable GPUs.
- 對每一類無法區分的 GPU 只用一個子問題的 Dantzig–Wolfe 分解。