HcclRankGraphGetInstSizeListByLayer

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

x

Atlas inference product

x

Atlas training product

x

For Atlas A2 training product/Atlas A2 inference product, only the Atlas 800T A2 training server, Atlas 900 A2 PoD cluster basic unit, and Atlas 200T A2 Box16 heterogeneous subrack are supported.

Function

Queries the number of topology instances at a specified topology layer and the number of ranks in each instance in a specified communicator.

Take the preceding topology model as an example:
  • 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:

1
typedef void *HcclComm;

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