HcclRankGraphGetTopoInstsByLayer
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
x |
|
x |
|
x |
|
x |
|
x |
Function
Queries the topology instance set of the current rank based on the given communicator and topology layer ID.
Prototype
1 | HcclResult HcclRankGraphGetTopoInstsByLayer(HcclComm comm, uint32_t netLayer, uint32_t **topoInsts, uint32_t *topoInstNum) |
Parameters
Parameter |
Input/Output |
Description |
||
|---|---|---|---|---|
comm |
Input |
Communicator. The HcclComm type is defined as follows:
|
||
netLayer |
Input |
Topology layer ID. |
||
topoInsts |
Output |
Topology instance list. |
||
topoInstNum |
Output |
Number of topology instances. |
Returns
HcclResult: HCCL_SUCCESS on success, or else failure.
Restrictions
None
Example
1 2 3 4 5 6 7 | HcclComm comm; uint32_t netLayer = 0; uint32_t *topoInsts = nullptr; uint32_t topoInstNum = 0; // If topoInstanceId is not configured in the topology file, the default value 0 is used. HcclRankGraphGetTopoInstsByLayer(comm, netLayer, &topoInsts, &topoInstNum); // topoInsts = [0], topoInstNum = 1 |
Parent topic: Topology Information Query