Integration with Mainstream Frameworks
Scenario
The following figure shows the position of HCCL in the system.
Figure 1 Position of HCCL in the system

The AI framework has three programming execution modes: single-operator, graph (Ascend IR), and graph capture (ACLGraph). HCCL provides the corresponding working modes.
- In single-operator and graph capture (ACLGraph) modes, the AI framework directly calls the C APIs of HCCL to dispatch communication operators to the acceleration engine for execution. For details about the HCCL communication operator APIs, see Communication Operators.
- In graph mode (Ascend IR), the AI framework uses the Ascend operator IR to construct the model computation process into a graph, and uses the Graph Engine (GE) to dispatch the communication operators in the graph to the acceleration engine for execution. For details about the graph mode, see Graph Development. For the definition of Ascend IR, see in Operator Library.
HCCL APIs have been integrated into the PyTorch adaptation plugin Ascend Extension for PyTorch and the MindSpore framework code. Developers can specify HCCL as the distributed backend and directly use the native communication APIs of the framework to implement distributed capabilities. For details, see the MindSpore official website.
HCCL connects to the TensorFlow framework through the TensorFlow adaptation plugin TF Adapter. For details, see TensorFlow 1.15 Model Porting Guide and TensorFlow 2.6.5 Model Porting Guide.