HcclAllGather
Description
Re-sorts the inputs of all ranks in the communicator by rank ID, combines the inputs, and sends the results to the outputs of all ranks.
For the AllGather operation, each rank receives a set of data that is resorted based on a rank ID, that is, AllGather outputs of all ranks are the same.
Prototype
HcclResult HcclAllGather(void *sendBuf, void *recvBuf, uint64_t sendCount, HcclDataType dataType, HcclComm comm, aclrtStream stream)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
sendBuf |
Input |
Address of the buffer to send source data. |
recvBuf |
Output |
Address of the buffer to receive collective communication result. |
sendCount |
Input |
sendBuf size involved in AllGather operation. The size of recvBuf data is calculated as: count x rank size. |
dataType |
Input |
Data type of the Allgather operation, which is of the HcclDataType type. |
comm |
Input |
Communicator where the operation is performed. |
stream |
Input |
Stream of the rank. |
Returns
HcclResult: HCCL_SUCCESS on success; else, failure.
Constraints
The ranks must have the same sendCount and dataType.