HcclChannelGetRemoteMems

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

x

Atlas A2 training product/Atlas A2 inference product

x

Atlas 200I/500 A2 inference product

x

Atlas inference product

x

Atlas training product

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:

1
typedef void *HcclComm;

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);