HcclRankGraphGetLinks
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
x |
|
x |
|
x |
For
Function
Queries information about the communication connection between the source rank and the destination rank at a specified topology layer in a specified communicator.
- Example 1: The source rank and destination rank are on two SuperPoDs.
netLayer = 1: no connection
netLayer = 2: RDMA connection
- Example 2: The source rank and destination rank are on the same SuperPoD but different AI servers.
netLayer = 1: HCCS connection
netLayer = 2: no connection
- Example 3: The source rank and destination rank are on the same AI server but different NPUs.
netLayer = 1: no connection
netLayer = 2: no connection
Prototype
1 | HcclResult HcclRankGraphGetLinks(HcclComm comm, uint32_t netLayer, uint32_t srcRank, uint32_t dstRank, CommLink **links, uint32_t *linkNum) |
Parameters
Parameter |
Input/Output |
Description |
||
|---|---|---|---|---|
comm |
Input |
Communicator. The HcclComm type is defined as follows:
|
||
netLayer |
Input |
Topology layer ID. |
||
srcRank |
Input |
Source rank ID. |
||
dstRank |
Input |
Destination rank ID. |
||
links |
Output |
Communication connection list. For the definition of the CommLink type, see CommLink. |
||
linkNum |
Output |
Number of communication connections. |
Returns
HcclResult: HCCL_SUCCESS on success, or else failure.
Restrictions
None
Example
1 2 3 4 5 6 | HcclComm comm; CommLink *links; uint32_t linkNum; uint32_t netlayer = 0; // Query the link between rank 0 and rank 1 on the server. HcclRankGraphGetLinks(comm, netlayer, 0, 1, &links, &linkNum); |