HcclSend

Description

Sends the data at the specified location on the current rank to the specified location on the destination rank.

Prototype

HcclResult HcclSend(void* sendBuf, uint64_t count, HcclDataType dataType, uint32_t destRank,HcclComm comm, aclrtStream stream)

Parameters

Parameter

Input/Output

Description

sendBuf

Input

Address of the buffer to send source data.

count

Input

Number of data elements to be sent.

dataType

Input

Data type of the data to be sent, which is of the HcclDataType type.

Atlas Training Series Product : The supported data types are int8, uint8, int16, uint16, int32, uint32, int64, uint64, float16, float32, and float64.

destRank

Input

ID of the destination rank.

comm

Input

Communicator where the operation is performed.

stream

Input

Stream of the rank.

Returns

HcclResult: HCCL_SUCCESS on success; else, failure.

Constraints

The HcclSend and HcclRecv interfaces are invoked synchronously and must be used in pairs. That is, after a process calls the HcclSend interface, the process can call the next interface only after the corresponding HcclRecv interface receives data, as shown in the following figure.

Applicability

Atlas Training Series Product

Example

For details, see the HcclSend/HcclRecv operation code example of each communicator initialization mode in Example Code.