---
title: CreateHcclComm
description: "backend为HCCL时，rootInfo方式创建单机多卡通信域功能。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendtb/ascendtb_01_0307.html
sourcePath: /source/zh/canncommercial/900/API/ascendtb/ascendtb_01_0307.html
indexId: 1d71efd714d9a8ccd9449e91e6903fce3ee4ea164fb09932970fccd8a607355464
---
# CreateHcclComm

#### 功能说明

backend为HCCL时，rootInfo方式创建单机多卡通信域功能。


#### 定义

```
namespace atb {
using void *HcclComm;
namespace Comm {
HcclComm CreateHcclComm(int32_t rank, int32_t rankRoot, int32_t rankSize, char *commName);
}; // namespace Comm
} // namespace atb
```


#### 参数列表

| 成员名称 | 输入/输出 | 类型 | 默认值 | 描述 |
| --- | --- | --- | --- | --- |
| rank | 输入 | int32\_t | \- | 当前卡所属通信编号。 |
| rankRoot | 输入 | int32\_t | \- | 主通信编号。 |
| rankSize | 输入 | int32\_t | \- | 通信的卡的数量。 |
| commName | 输出 | char \* | \- | 通信域名称。 |


#### 约束说明

rank、rankSize、rankRoot需满足以下条件。- 0 ≤ rank < rankSize
- 0 ≤ rankRoot < rankSize


只支持 Atlas A2 训练系列产品 / Atlas A2 推理系列产品 和 Atlas A3 推理系列产品 / Atlas A3 训练系列产品 。
