HcclRankGraphGetRanksByTopoInst
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
x |
|
x |
|
x |
|
x |
|
x |
Function
Queries the rank information in the topology instance of the current rank based on the given communicator and topology layer ID.
Prototype
1 | HcclResult HcclRankGraphGetRanksByTopoInst(HcclComm comm, uint32_t netLayer, uint32_t topoInstId, uint32_t **ranks, uint32_t *rankNum) |
Parameters
Parameter |
Input/Output |
Description |
||
|---|---|---|---|---|
comm |
Input |
Communicator. The HcclComm type is defined as follows:
|
||
netLayer |
Input |
Topology layer ID. |
||
topoInstId |
Input |
Topology instance ID, available in the topology file. |
||
ranks |
Output |
Rank list contained in the topology instance. |
||
rankNum |
Output |
Number of lists. |
Returns
HcclResult: HCCL_SUCCESS on success, or else failure.
Restrictions
None
Example
1 2 3 4 5 6 7 8 | // 8-device communicator, within the same 8P mesh topology. HcclComm comm; uint32_t netlayer = 0; uint32_t topoInstId = 0; uint32_t *ranks; uint32_t rankNum; HcclRankGraphGetRanksByLayer( comm, netLayer, topoInstId, &ranks, &rankNum ) // ranks = [0,1,2, ..., 7], rankNum=8 |
Parent topic: Topology Information Query