HcclAllGather

函数原型

HcclResult HcclAllGather(void *sendBuf, void *recvBuf, uint64_t sendCount, HcclDataType dataType, HcclComm comm, aclrtStream stream);

功能说明

实现all-gather操作接口。将所有rank的sendBuf按rank顺序拼接起来,再把结果发送到所有rank的recvBuf。

参数说明

参数名

输入/输出

描述

sendBuf

输入

源数据buffer地址。

recvBuf

输出

目的数据buffer地址,集合通信结果输出至此buffer中。

sendCount

输入

参与allgather操作的sendBuf的数据size,recvBuf的数据size则等于count * rank size。

dataType

输入

allgather操作的数据类型,目前支持int8, uint8, uint16, int32, uint32, int64, uint64, float16, float32, float64数据类型。

comm

输入

集合通信操作所在的通信域。

stream

输入

本rank所使用的stream。

返回值

HcclResult:接口成功返回HCCL_SUCCESS。其他失败。

约束说明