Setting the Backward Gradient Segmentation Policy
You can call the gradient segmentation APIs to set the AllReduce segmentation and fusion policy in the backward pass phase.
set_split_strategy_by_idx: sets the backward gradient segmentation policy in the collective communication group based on the gradient index ID.
from hccl.split.api import set_split_strategy_by_idx set_split_strategy_by_idx([20, 100, 159])
set_split_strategy_by_size: sets the backward gradient segmentation policy in the collective communication group by ratio.
from hccl.split.api import set_split_strategy_by_size set_split_strategy_by_size([60, 20, 20])