SetAlgConfig

Function Usage

Sets the communication algorithm.

Prototype

1
uint32_t SetAlgConfig(const std::string &algConfig)

Parameters

Table 1 Parameters

Parameter

Input/Output

Description

algConfig

Input

Communication algorithm configuration. The value is of the string type and can contain a maximum of 128 bytes.

For the Atlas 350 Accelerator Card, this parameter is reserved and does not take effect after being configured. By default, only the FullMesh algorithm is supported. The FullMesh algorithm implies full-mesh connections between NPUs, enabling data transmission between any two NPUs. For details, see Introduction to HCCL in .

For the Atlas A3 training product / Atlas A3 inference product , the following values are supported:

  • "AllReduce=level0:doublering": AllReduce communication task.
  • "AllGather=level0:doublering": AllGather communication task.
  • "ReduceScatter=level0:doublering": ReduceScatter communication task.
  • "AlltoAll=level0:fullmesh;level1:pairwise": AlltoAllV and AlltoAll communication tasks.
  • "BatchWrite=level0:fullmesh": BatchWrite communication task.

For the Atlas A2 training product / Atlas A2 inference product , this parameter is reserved and does not take effect after being configured. By default, only the FullMesh algorithm is supported. The FullMesh algorithm implies full-mesh connections between NPUs, enabling data transmission between any two NPUs. For details, see Introduction to HCCL in .

Returns

  • 0: Setting succeeded.
  • Other values: Setting failed.

Restrictions

None

Examples

For details about the calling example of this API, see Examples.