HcclRankGraphGetEndpointInfo
产品支持情况
产品 |
是否支持 |
|---|---|
Atlas 350 加速卡 |
√ |
☓ |
|
☓ |
|
☓ |
|
☓ |
|
☓ |
功能说明
获取指定通信设备的拓扑属性信息。
函数原型
1 | HcclResult HcclRankGraphGetEndpointInfo(HcclComm comm, uint32_t rankId, const EndpointDesc *endpointDesc, EndpointAttr endpointAttr, uint32_t infoLen, void *info) |
参数说明
参数名 |
输入/输出 |
描述 |
||
|---|---|---|---|---|
comm |
输入 |
通信域。 HcclComm类型的定义如下:
|
||
rankId |
输入 |
需要查询的端点的所属的rank ID。 |
||
endpointDesc |
输入 |
EndPoint描述符,为通过HcclRankGraphGetEndpointDesc接口获取到的“endPointDesc”。 |
||
endpointAttr |
输入 |
需要查询的EndPoint属性类型。 EndpointAttr类型的定义请参见EndpointAttr。 |
||
infoLen |
输入 |
提供的info缓冲区大小(字节)。 |
||
info |
输出 |
存储属性信息的输出缓冲区指针。 |
返回值
HcclResult:接口成功返回HCCL_SUCCESS,其他失败。
约束说明
无
调用示例
1 2 3 4 5 6 7 8 9 10 | HcclComm comm; uint32_t netLayer = 0; uint32_t topoInstId = 0; uint32_t num = 0; HcclRankGraphGetEndpointNum(comm, netLayer, topoInstId, &num); uint32_t descNum = num; HcclRankGraphGetEndpointDesc(comm, netLayer, topoInstId, &descNum, endPointDesc); EndpointAttrBwCoeff bwCoeff{}; uint32_t size = sizeof(EndpointAttrBwCoeff); //必须等于目标类型大小 HcclRankGraphGetEndpointInfo(comm, rankId, endpointDesc, ENDPOINT_ATTR_BW_COEFF, size, &bwCoeff); |
父主题: 拓扑信息查询