Towards a Standardized Representation for Deep Learning Collective Algorithms

Jinsun Yoo, William Won, Meghan Cowan, Nan Jiang, Benjamin Klenk, Srinivas Sridharan, Tushar KrishnaHOTI 2024 · DOI

Abstract

The explosion of machine learning model size has led to its execution on distributed clusters at a very large scale. Many works have tried to optimize the process of producing collective algorithms and running collective communications, which act as a bottleneck to distributed machine learning. However, different works use their own collective algorithm representation, pushing away from co-optimizing collective communication and the rest of the workload. The lack of a standardized collective algorithm representation has also hindered interoperability between collective algorithm producers and consumers. Additionally, tool-specific conversions and modifications have to be made for each pair of tools producing and consuming collective algorithms which adds to engineering efforts. In this position paper, we propose a standardized workflow leveraging a common collective algorithm representation. Upstream producers and downstream consumers converge to a common representation format based on Chakra Execution Trace, a commonly used graph based representation of distributed machine learning workloads. Such a common representation enables us to view collective communications at the same level as workload operations and decouple producer and consumer tools, enhance interoperability, and relieve the user from the burden of having to focus on downstream implementations. We provide a proof-of-concept of this standardized workflow by simulating collective algorithms generated by the MSCCLang domain-specific language through the ASTRA-sim distributed machine learning simulator using various network configurations.

Introduction

As deep learning models, particularly Large Language Models (LLMs), continue to scale, they necessitate distribution across massive clusters of Neural Processing Units (NPUs). These units rely on "collective communications"—such as All-Reduce and All-Gather—to synchronize data. However, a significant "interoperability gap" exists between the researchers designing optimized communication algorithms (producers) and those developing system simulators or runtimes (consumers).

Currently, these groups use incompatible formats, often requiring manual, hardcoded integration of new algorithms into simulators like ASTRA-sim. This siloed approach prevents the co-optimization of compute and communication operations, making it difficult to effectively overlap tasks and hide latency.

Methodology: Standardizing with Chakra ET

To address this, we propose a unified, graph-based representation for both ML workloads and collective algorithms by extending the Chakra Execution Trace (ET) format. Chakra ET is an open-source standard that represents workloads as Directed Acyclic Graphs (DAGs).

The proposed standardized workflow leveraging Chakra ET to bridge algorithm producers and consumers.

Extensions and Workflow

We extended Chakra ET by adding specific node types to represent the fundamental operations of a collective algorithm:

  • COMM_SEND: Point-to-point message transmission.
  • COMM_RECV: Point-to-point message reception.
  • COMP: Compute or reduction tasks.

In this standardized workflow, a collective operation like All-Reduce is no longer a "black box" to the simulator. Instead, the simulator receives a Chakra ET that explicitly defines every underlying send, receive, and compute step. This decoupling allows any producer tool (e.g., MSCCLang, TACCL) to communicate with any consumer tool (e.g., ASTRA-sim, MSCCL-Runtime) through a common language.

Proof-of-Concept and Results

We demonstrated this end-to-end flow by building a converter for MSCCLang to output Chakra ETs and modifying ASTRA-sim to ingest them. This allowed ASTRA-sim to execute custom algorithms without internal source code modifications.

Topology Sensitivity

We evaluated a 1D Ring collective algorithm across various physical layouts in a 64-NPU cluster. The results highlight the critical need for topology-aware algorithm design.

Performance slowdown of a 1D Ring collective algorithm across different network topologies.

As shown in the evaluation, running a simple 1D Ring algorithm on 2D Mesh or Torus topologies results in significant performance slowdowns compared to a native 1D Ring topology. This underscores the value of our framework in helping designers visualize and optimize how specific algorithms map to different hardware configurations.

Conclusion and Future Work

By elevating communication operations to first-class citizens within the workload graph, we enable a more flexible and interoperable ecosystem. Future work will focus on testing more complex, automatically synthesized algorithms and implementing actual co-optimization passes to better overlap compute and communication. The success of this initiative depends on the broader community's adoption of Chakra ET as a universal standard for collective communications.

Summary updated

BibTeX
@inproceedings{yoo2024towards,
  author = {Jinsun Yoo and William Won and Meghan Cowan and Nan Jiang and Benjamin Klenk and Srinivas Sridharan and Tushar Krishna},
  title = {{Towards a Standardized Representation for Deep Learning Collective Algorithms}},
  booktitle = {HOTI},
  year = {2024},
  doi = {10.1109/hoti63208.2024.00017},
}
Figure