CreateHcclCrossMulitComm

Description

Creates a multi-server multi-device sub-communicator using a rank table 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 rank table file. The value is a string of a maximum of 4,096 bytes, including the end-of-text character.

For details about the rank table configuration, see 《HCCL集合通信库》中的“ranktable文件配置资源信息”章节.

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: This 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.

Constraints

  • 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.
  • Only Atlas A2 training products/Atlas A2 inference products and Atlas A3 inference products/Atlas A3 training products are supported.