HcclRankGraphGetEndpointDesc

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 endpoint description list of a topology instance.

Prototype

1
HcclResult HcclRankGraphGetEndpointDesc(HcclComm comm, uint32_t layer, uint32_t topoInstId, uint32_t *descNum, EndpointDesc *endpointDesc);

Parameters

Parameter

Input/Output

Description

comm

Input

Communicator.

The HcclComm type is defined as follows:

1
typedef void *HcclComm;

layer

Input

Topology layer ID.

topoInstId

Input

Topology instance ID.

descNum

Input/Output

Number of communication device descriptions to be obtained.

When used as an input, it must match the num value returned by HcclRankGraphGetEndpointNum.

endPointDesc

Output

Endpoint description list. Memory must be allocated by the caller.

For the definition of the EndpointDesc type, see EndPointDesc.

Returns

HcclResult: HCCL_SUCCESS on success, or else failure.

Restrictions

None

Example

1
2
3
4
5
6
7
HcclComm comm;
uint32_t layer = 0;
uint32_t topoInstId = 0;
uint32_t num = 0;
HcclRankGraphGetEndpointNum(comm, layer, topoInstId, &num);
uint32_t descNum = num;
HcclRankGraphGetEndpointDesc(comm, layer, topoInstId, &descNum, endPointDesc);