HcclRankGraphGetInstSizeListByLayer
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
x |
|
x |
|
x |
For
Function
Queries the number of topology instances at a specified topology layer and the number of ranks in each instance in a specified communicator.

- Layer 0 contains two topology instances. For easy understanding, the topology instance IDs are defined as 0 and 1. Each instance contains 3 ranks.
- Layer 1 contains one topology instance, and the instance contains 6 ranks.
Prototype
1 | HcclResult HcclRankGraphGetInstSizeListByLayer(HcclComm comm, uint32_t netLayer, uint32_t **instSizeList, uint32_t *listSize) |
Parameters
Parameter |
Input/Output |
Description |
||
|---|---|---|---|---|
comm |
Input |
Communicator. The HcclComm type is defined as follows:
|
||
netLayer |
Input |
Topology layer ID. |
||
instSizeList |
Output |
List of the number of ranks contained in each topology instance at this layer. |
||
listSize |
Output |
Size of instSizeList, that is, the number of topology instances at this layer. |
Returns
HcclResult: HCCL_SUCCESS on success, or else failure.
Restrictions
None
Example
The following uses the topology model in Function as an example:
1 2 3 4 5 6 7 | HcclComm comm; uint32_t *instSizeList; uint32_t listSize; HcclRankGraphGetInstSizeListByLayer(comm, 0, &instSizeList, &listSize); // instSizeList=[3,3], listSize=2 HcclRankGraphGetInstSizeListByLayer(comm, 1, &instSizeList, &listSize); // instSizeList=[6], listSize=1 |