HcclGetHeterogMode

Applicability

Product

Supported

Atlas 350 Accelerator Card

x

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

Obtains the heterogeneous networking mode of a given communicator.

Prototype

1
HcclResult HcclGetHeterogMode(HcclComm comm, HcclHeterogMode *mode)

Parameters

Parameter

Input/Output

Description

comm

Input

Communicator where the collective communication operation is performed.

The HcclComm type is defined as follows:

1
typedef void *HcclComm;

mode

Output

Heterogeneous mode.

For details about the HcclHeterogMode type, see HcclHeterogMode.

Returns

HcclResult: HCCL_SUCCESS on success, or else failure.

Restrictions

None

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
HcclHeterogMode mode;
HcclResult ret = HcclGetHeterogMode(comm, &mode);
if (ret == HCCL_SUCCESS) {
    switch (mode) {
        case HCCL_HETEROG_MODE_HOMOGENEOUS:
            printf("Homogeneous networking\n");
            break;
        case HCCL_HETEROG_MODE_MIX_A2_A3:
            printf("A2/A3 heterogeneous networking\n");
            break;
        default:
            printf ("Unknown networking mode\n");
            break;
    }
}