HCCL_ALGO

功能描述

此环境变量用于配置集合通信Server间通信算法以及超节点间通信算法,支持全局配置算法类型与按算子配置算法类型两种配置方式。

HCCL提供自适应算法选择功能,默认会根据产品形态、数据量和Server个数选择合适的算法,一般情况下用户无需手工指定。若通过此环境变量指定了Server间通信算法,则自适应算法选择功能不再生效。

当不设置此环境变量时:
  • 针对Atlas 训练系列产品,当通信域内Server的个数为非2的整数次幂时,默认使用ring算法;其他场景默认使用H-D_R算法。
  • 针对Atlas A2 训练系列产品,内部会根据产品形态、节点数以及数据量自动选择算法。
  • 针对Atlas A3 训练系列产品/Atlas A3 推理系列产品,内部会根据产品形态、节点数以及数据量自动选择算法。

配置示例

使用约束

当前版本Server内通信算法仅支持配置为“NA”。

Server间通信算法支持度

表1 Server间通信算法支持度列表

算法类型

集合通信算子

数据类型

归约类型

网络运行模式

是否支持确定性计算

支持的产品型号

不支持算子处理方法

ring

ReduceScatter、AllGather、AllReduce、Reduce、Scatter

int8、int16、int32、 int64、float16、float32、bfp16

sum、prod、max、min

单算子/图模式

Atlas 训练系列产品

Atlas A2 训练系列产品

Atlas A3 训练系列产品/Atlas A3 推理系列产品

自动选择为H-D_R

H-D_R

ReduceScatter、AllGather、AllReduce、Broadcast、Reduce

int8、int16、int32、int64、float16、float32、bfp16

sum、prod、max、min

单算子/图模式

Atlas 训练系列产品

Atlas A2 训练系列产品

Atlas A3 训练系列产品/Atlas A3 推理系列产品

自动选择为ring算法

NHR

ReduceScatter、AllGather、AllReduce、Broadcast、Scatter

int8、int16、int32、int64、float16、float32、bfp16

sum、prod、max、min

单算子/图模式

Atlas 训练系列产品

Atlas A2 训练系列产品

Atlas A3 训练系列产品/Atlas A3 推理系列产品

自动选择为H-D_R或者ring算法

NHR_V1

ReduceScatter、AllGather、AllReduce、Broadcast

int8、int16、int32、int64、float16、float32、bfp16

sum、prod、max、min

单算子/图模式

Atlas 训练系列产品

Atlas A2 训练系列产品

自动选择为H-D_R或者ring算法

NB

ReduceScatter、AllGather、AllReduce、Broadcast、Scatter

int8、int16、int32、int64、float16、float32、bfp16

sum、prod、max、min

单算子/图模式

Atlas 训练系列产品

Atlas A2 训练系列产品

自动选择为H-D_R或者ring算法

AHC

AllReduce

int8、int16、int32、int64、float16、float32、bfp16

sum、prod、max、min

单算子/图模式

Atlas A3 训练系列产品/Atlas A3 推理系列产品

自动选择为H-D_R或者ring算法

pipeline

AllReduce

int8、int16、int32、float16、float32、bfp16

sum、max、min

单算子模式/图模式的动态shape场景

Atlas A2 训练系列产品

自动选择为H-D_R或者ring算法

AllGather

int8、int16、int32、int64、float16、float32、bfp16

-

单算子模式/图模式的动态shape场景

-

Atlas A2 训练系列产品

自动选择为H-D_R或者ring算法

ReduceScatter

int8、int16、int32、float16、float32、bfp16

sum、max、min

单算子模式/图模式的动态shape场景

Atlas A2 训练系列产品

自动选择为H-D_R或者ring算法

AlltoAll

int8、int16、int32、int64、float16、float32、bfp16

-

单算子模式/图模式的动态shape场景

-

Atlas A2 训练系列产品

自动选择为pairwise算法

AlltoAllV

int8、int16、int32、int64、float16、float32、bfp16

-

单算子模式/图模式的动态shape场景

-

Atlas A2 训练系列产品

自动选择为pairwise算法

pairwise

AlltoAll、AlltoAllV、AlltoAllVC

int8、int16、int32、int64、float16、float32、bfp16

-

单算子模式/图模式

-

Atlas A2 训练系列产品

自动选择为H-D_R或者ring算法

支持的型号

Atlas 训练系列产品

Atlas A2 训练系列产品

Atlas A3 训练系列产品/Atlas A3 推理系列产品