HcclScatter
Description
Scatters data of the root rank to other ranks.
Prototype
HcclResult HcclScatter(void *sendBuf, void *recvBuf, uint64_t recvCount, HcclDataType dataType, uint32_t root, 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. |
recvCount |
Input |
Number of recvBuf data elements to perform the Scatter operation. For example, if only one int32 data element is involved, then count = 1. |
dataType |
Input |
Data type of the Scatter operation, which is of the HcclDataType type. |
root |
Input |
ID of the root rank used for the Scatter operation. |
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 recvCount, dataType, and root.
- There can be only one root rank globally.
- sendBuf of a non-root rank can be empty. sendBuf of the root rank cannot be empty.