Configures the communication algorithms between servers and supernodes. The algorithms can be configured globally or by operator.
This section only briefly describes the algorithm functions. For details, see Introduction to Collective Communication Algorithms.
export HCCL_ALGO="level0:NA;level1:<algo>;level2:<algo>"
Note: When level1 (inter-server communication algorithm) is set to AHC, level2 (inter-supernode communication algorithm) automatically uses the AHC algorithm without additional configuration. Even if level2 is set to another algorithm, the setting does not take effect.
For details about the communication operators, data types, network running modes, and products supported by each inter-server communication algorithm, see Supported Algorithms for Communication Between Servers.
For details about the communication operators, data types, and network running modes supported by each inter-supernode communication algorithm, see Supported Algorithms for Communication Between Supernodes.
If level2 is not set, the ring algorithm is used when the number of supernodes in the communicator is less than 8 and is not an integral power of 2. In other scenarios, the H-D_R algorithm is used.
export HCCL_ALGO="<op0>=level0:NA;level1:<algo0>;level2:<algo1>/<op1>=level0:NA;level1:<algo3>;level2:<algo4>"
export HCCL_ALGO="level0:NA;level1:H-D_R"
# The AllReduce operator uses the ring algorithm and the AllGather operator uses the RHD algorithm. Other operators automatically select a communication algorithm based on the product form, number of nodes, and data size. export HCCL_ALGO="allreduce=level0:NA;level1:ring/allgather=level0:NA;level1:H-D_R"
|
Algorithm Type |
Collective Communication Operator |
Data Type |
Network Running Mode |
Deterministic Computing |
Supported Products |
Unsupported Operator Processing Method |
|---|---|---|---|---|---|---|
|
ring |
ReduceScatter, AllGather, AllReduce, and Reduce |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The NHR or H-D_R algorithm is automatically selected. |
|
ReduceScatterV |
int8, int16, int32, int64 (supported only in single-operator mode on the |
|
Supported |
|
The NHR or H-D_R algorithm is automatically selected. |
|
|
Scatter |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The NHR or H-D_R algorithm is automatically selected. |
|
|
AllGatherV |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The NHR or H-D_R algorithm is automatically selected. |
|
|
H-D_R |
ReduceScatter, AllGather, AllReduce, Broadcast, and Reduce |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The NHR or ring algorithm is automatically selected. |
|
NHR |
ReduceScatter, AllGather, AllReduce, and Broadcast |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The H-D_R or ring algorithm is automatically selected. |
|
ReduceScatterV |
int8, int16, int32, int64 (supported only in single-operator mode on the |
|
Supported |
|
The H-D_R or ring algorithm is automatically selected. |
|
|
Scatter |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The H-D_R or ring algorithm is automatically selected. |
|
|
AllGatherV |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The H-D_R or ring algorithm is automatically selected. |
|
|
NHR_V1 |
ReduceScatter, AllGather, AllReduce, and Broadcast |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The NHR, H-D_R, or ring algorithm is automatically selected. |
|
NB |
ReduceScatter, AllGather, AllReduce, and Broadcast |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The NHR, H-D_R, or ring algorithm is automatically selected. |
|
ReduceScatterV |
int8, int16, int32, int64 (supported only in single-operator mode on the |
|
Supported |
|
The NHR, H-D_R, or ring algorithm is automatically selected. |
|
|
AllGatherV |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The NHR, H-D_R, or ring algorithm is automatically selected. |
|
|
Scatter |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The NHR, H-D_R, or ring algorithm is automatically selected. |
|
|
AHC |
ReduceScatter, AllGather, and AllReduce |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The NHR, H-D_R, or ring algorithm is automatically selected. |
|
pipeline |
AllReduce |
int8, int16, int32, float16, float32, and bfp16 |
|
Not supported |
|
The NHR, H-D_R, or ring algorithm is automatically selected. |
|
AllGather |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
- |
|
The NHR, H-D_R, or ring algorithm is automatically selected. |
|
|
AllGatherV |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The NHR, H-D_R, or ring algorithm is automatically selected. |
|
|
ReduceScatter |
int8, int16, int32, float16, float32, and bfp16 |
|
Not supported |
|
The NHR, H-D_R, or ring algorithm is automatically selected. |
|
|
AlltoAll |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
- |
|
The pairwise algorithm is automatically selected. |
|
|
AlltoAllV |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
- |
|
The pairwise algorithm is automatically selected. |
|
|
AlltoAllVC |
int8, int16, int32, int64, float16, float32, and bfp16 |
Dynamic shape scenario of the graph mode (Ascend IR) |
- |
|
The pairwise algorithm is automatically selected. |
|
|
pairwise |
AlltoAll, AlltoAllV, and AlltoAllVC |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
- |
|
The NHR, H-D_R, or ring algorithm is automatically selected. |
|
Algorithm Type |
Collective Communication Operator |
Data Type |
Network Running Mode |
Deterministic Computing |
Supported Products |
Unsupported Operator Processing Method |
|---|---|---|---|---|---|---|
|
ring |
ReduceScatter, AllGather, AllReduce, and Reduce |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The NHR or H-D_R algorithm is automatically selected. |
|
ReduceScatterV |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The NHR or H-D_R algorithm is automatically selected. |
|
|
Scatter and AllGatherV |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The NHR or H-D_R algorithm is automatically selected. |
|
|
H-D_R |
AllReduce, Broadcast, and Reduce |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The NHR or ring algorithm is automatically selected. |
|
NHR |
ReduceScatter, AllGather, AllReduce, and Broadcast |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The H-D_R or ring algorithm is automatically selected. |
|
ReduceScatterV |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The H-D_R or ring algorithm is automatically selected. |
|
|
Scatter and AllGatherV |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The H-D_R or ring algorithm is automatically selected. |
|
|
NB |
ReduceScatter, AllGather, AllReduce, and Broadcast |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The NHR, H-D_R, or ring algorithm is automatically selected. |
|
ReduceScatterV |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The NHR, H-D_R, or ring algorithm is automatically selected. |
|
|
Scatter and AllGatherV |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The NHR, H-D_R, or ring algorithm is automatically selected. |
|
|
pipeline |
AllGather |
int8, int16, int32, int64, float16, float32, and bfp16 |
|
Supported |
|
The NHR, H-D_R, or ring algorithm is automatically selected. |
|
ReduceScatter |
int8, int16, int32, float16, float32, and bfp16 |
|
Supported |
|
The NHR, H-D_R, or ring algorithm is automatically selected. |