Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
☓ |
|
√ |
|
√ |
For
For the
Generates the identification information (HcclRootInfo) of the root rank. Call this API on the root rank before calling the HCCL initialization API HcclCommInitRootInfo or HcclCommInitRootInfoConfig.
Assume that an AI server has eight devices, which are divided into four communicators. The two devices in each communicator communicates with each other, as shown in the following figure.

Figure 2 shows the process of obtaining rootInfo and initializing collective communication. In a thread, create four rootInfo records by switching devices and store the information in an array with a length of 4. After obtaining the rootInfo records, start four threads to initialize the communicators by calling the HcclCommInitRootInfo or HcclCommInitRootInfoConfig API based on the rootInfo information. Figure 2 uses HcclCommInitRootInfo as an example.
1 | HcclResult HcclGetRootInfo(HcclRootInfo *rootInfo) |
Parameter |
Input/Output |
Description |
|---|---|---|
rootInfo |
Output |
Rank identification information, including the device IP address and device ID. The information needs to be broadcast to all ranks in the cluster for HCCL initialization. For details about the definition of the HcclRootInfo type, see HcclRootInfo. |
HcclResult: HCCL_SUCCESS on success, or else failure.
None.
1 2 3 4 5 6 7 8 9 10 | uint32_t rankSize = 8; uint32_t deviceId = 0; // Generate the identification information of the root rank. HcclRootInfo rootInfo; HcclGetRootInfo(&rootInfo); // Initialize the communicator. HcclComm hcclComm; HcclCommInitRootInfo(rankSize, &rootInfo, deviceId, &hcclComm); // Destroy the communicator. HcclCommDestroy(hcclComm); |