HcclChannelGetRemoteMems
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
x |
|
x |
|
x |
|
x |
|
x |
Function
Obtains the remote memory information exchanged in the communication channel.
Prototype
1 | HcclResult HcclChannelGetRemoteMems(HcclComm comm, ChannelHandle channel, uint32_t *memNum, CommMem **remoteMems, char ***memTags); |
Parameters
Parameter |
Input/Output |
Description |
||
|---|---|---|---|---|
comm |
Input |
Communicator handle. The HcclComm type is defined as follows:
|
||
channel |
Input |
Communication channel handle. For the definition of the ChannelHandle type, see ChannelHandle. |
||
memNum |
Output |
Number of memory blocks. |
||
remoteMems |
Output |
Remote memory list. For the definition of the CommMem type, see CommMem. |
||
memTags |
Output |
List of remote memory strings. |
Returns
HcclResult: HCCL_SUCCESS on success, or else failure.
Restrictions
Only the AIV engine of the Atlas 350 Accelerator Card supports this function.
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | uint32_t channelNum = 1; std::vector<HcclChannelDesc> channelDesc(channelNum); HcclChannelDescInit(channelDesc.data(), channelNum); // Omit the channelDesc configuration. HcclComm comm; CommEngine engine = CommEngine::COMM_ENGINE_AIV; std::vector<ChannelHandle> channels(channelNum); HcclChannelAcquire(comm, engine, channelDesc.data(), channelNum, channels.data()); uint32_t memNum = 0; CommMem* remoteMems = nullptr; char** memTags = nullptr; HcclChannelGetRemoteMems(comm, channels[0], &memNum, &remoteMems, &memTags); |