CreateHcclCrossMulitComm

Description

Creates a multi-server multi-device sub-communicator in ranktable mode when the backend is HCCL.

Definition

1
HcclComm CreateHcclCrossMulitComm(const char *rankTableFile, uint32_t subCommRankId, std::vector<uint32_t> &rankIds, uint64_t subCommId, uint32_t hcclBufferSize, char *commName);

Parameters

Member

Input/Output

Type

Default Value

Description

rankTableFile

Input

char *

-

Path of the ranktable file. The value is of the string type and contains a maximum of 4096 bytes, including the end-of-text character.

For details about the ranktable configuration, see .

subCommRankId

Input

uint32_t

-

Rank ID of the current rank in the sub-communicator.

rankIds

Input

vector<uint32_t>

-

Array consisting of the IDs of the ranks in the sub-communicator in the global communicator.

Note: The array should be ordered. The subscript of each rank in the array is mapped to its rank ID in the sub-communicator.

subCommId

Input

uint64_t

-

Current sub-communicator ID.

hcclBufferSize

Input

uint32_t

-

Buffer size of the shared data in the sub-communicator. Unit: MB

commName

Output

char *

-

Name of the communicator obtained after a sub-communicator is created. The value can contain a maximum of 128 characters.

Restrictions

  • The current rank cannot be created in multiple sub-communicators in parallel. For example, if the current rank is 1 and the two sub-communicators are [0,1] and [1,2], parallel creation is not supported but serial creation is supported. If the current rank is 0 or 2 and the two sub-communicators are [0,1] and [1,2], parallel creation is supported.
  • subCommRankId < rankIds.size().
  • Multi-server communication across chip types is not supported.
  • For the same global communicator, you cannot use the same subCommId to create a sub-communicator.
  • Supported only by Atlas A2 training products/Atlas A2 inference products and Atlas A3 inference products/Atlas A3 training products.