set_split_strategy_by_size

Applicability

Product

Supported

Atlas 350 Accelerator Card

√

Atlas A3 training product/Atlas A3 inference product

√

Atlas A2 training product/Atlas A2 inference product

√

Atlas 200I/500 A2 inference product

☓

Atlas inference product

√

Atlas training product

√

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.

For the Atlas inference products, only the Atlas 300I Duo inference card is supported.

Function

Sets a gradient segmentation strategy in a collective communication group based on the proportion of gradient data to implement AllReduce fusion and optimize the collective communication performance.

Prototype

1
def set_split_strategy_by_size(dataSizeList, group="hccl_world_group")

Parameters

Parameter

Input/Output

Description

dataSizeList

Input

A list.

List of gradient parameter data volume percentages.

  • The index ID list of the gradient must be non-negative, and the total percentage of the gradient data volume sequence must be 100.
  • A maximum of eight gradient segments are supported.
  • For example, if the model has 150 MB gradient data and needs to be divided into three segments: 90 MB, 30 MB, and 30 MB, set dataSizeList to [60, 20, 20].

group

Input

A string containing a maximum of 128 bytes, including the end character.

Group name, which can be a user-defined value or hccl_world_group. Defaults to hccl_world_group.

Returns

None

Constraints

Call Example

1
2
from hccl.split.api import *
set_split_strategy_by_size([60, 20, 20], "group")