HcclRankGraphGetTopoInstsByLayer
产品支持情况
产品 |
是否支持 |
|---|---|
Atlas 350 加速卡 |
√ |
☓ |
|
☓ |
|
☓ |
|
☓ |
|
☓ |
功能说明
给定通信域和拓扑层级编号,查询当前rank所在的拓扑实例集合。
函数原型
1 | HcclResult HcclRankGraphGetTopoInstsByLayer(HcclComm comm, uint32_t netLayer, uint32_t **topoInsts, uint32_t *topoInstNum) |
参数说明
参数名 |
输入/输出 |
描述 |
||
|---|---|---|---|---|
comm |
输入 |
通信域。 HcclComm类型的定义如下:
|
||
netLayer |
输入 |
拓扑层级编号。 |
||
topoInsts |
输出 |
拓扑实例列表。 |
||
topoInstNum |
输出 |
拓扑实例数量。 |
返回值
HcclResult:接口成功返回HCCL_SUCCESS,其他失败。
约束说明
无
调用示例
1 2 3 4 5 6 7 | HcclComm comm; uint32_t netLayer = 0; uint32_t *topoInsts = nullptr; uint32_t topoInstNum = 0; // topo文件中不配置topoInstanceId时默认为0 HcclRankGraphGetTopoInstsByLayer(comm, netLayer, &topoInsts, &topoInstNum); // topoInsts = [0], topoInstNum = 1 |
父主题: 拓扑信息查询