HcclRankGraphGetEndpointInfo
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
x |
|
x |
|
x |
|
x |
|
x |
Function
Obtains the topology attributes of a given communication device.
Prototype
1 | HcclResult HcclRankGraphGetEndpointInfo(HcclComm comm, uint32_t rankId, const EndpointDesc *endpointDesc, EndpointAttr endpointAttr, uint32_t infoLen, void *info) |
Parameters
Parameter |
Input/Output |
Description |
||
|---|---|---|---|---|
comm |
Input |
Communicator. The HcclComm type is defined as follows:
|
||
rankId |
Input |
Rank ID of the endpoint to be queried. |
||
endpointDesc |
Input |
EndPoint descriptor, which is the endPointDesc returned by HcclRankGraphGetEndpointDesc. |
||
endpointAttr |
Input |
Type of the endpoint attribute to be queried. For the definition of the EndpointAttr type, see EndpointAttr. |
||
infoLen |
Input |
Size of the provided info buffer, in bytes. |
||
info |
Output |
Pointer to the output buffer that stores the attribute. |
Returns
HcclResult: HCCL_SUCCESS on success, or else failure.
Restrictions
None
Example
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); // The value must match the size of the target type. HcclRankGraphGetEndpointInfo(comm, rankId, endpointDesc, ENDPOINT_ATTR_BW_COEFF, size, &bwCoeff); |