FilesLast commitLast update
16 days ago
23 days ago
18 days ago
1 month ago
26 days ago
1 month ago
18 days ago
4 months ago
24 days ago
9 days ago
README

DistributeBarrier

English | 简体中文

Product Support

Product Supported
Ascend 950DT products √
Atlas A3 products √
Atlas A2 products ×
Atlas 200I/500 A2 inference products ×
Atlas inference products ×
Atlas training products ×

Description

Operator function: Performs synchronization across all cards within the communicator. xRef is used only to build tensor dependencies; the API does not perform any operation on xRef.

Parameter Description

Parameter Name Input/Output Description Data Type Data Format
xRef Input No business semantics. Used only as the input tensor dependency; the API does not perform any operation on it. BFLOAT16, FLOAT16, FLOAT32, BOOL, INT8, INT16, INT32, INT64, UINT8, UINT16, UINT32, UINT64, FLOAT8_E5M2, FLOAT8_E4M3FN, FLOAT4_E1M2, FLOAT4_E2M1, HIFLOAT8, INT4 ND
timeOut Input Timeout setting. If there is no response within this time, a timeout occurs. INT32 ND
elasticInfo Input Dynamic scale-in information of the EP communicator:
Atlas A2 products: not supported; pass a null pointer;
Atlas A3 products: a 1D tensor (shape 4 + 2 * epWorldSize,) of the INT32 type. The first 4 elements are the scale-in configuration, and the last 2*epWorldSize elements are the rank mapping table.
INT32 ND (non-contiguous tensors supported)
group Input Communicator name. It is the communicator in which synchronization across all cards is performed. STRING ND
worldSize Input Size of the communicator. INT64 ND
  • Atlas A3 products: The FLOAT8_E5M2, FLOAT8_E4M3FN, FLOAT4_E1M2, FLOAT4_E2M1, HIFLOAT8, and INT4 types are not supported.
  • Ascend 950DT products: The unit of the timeout in the timeOut parameter is us. A value of 5000000us is recommended. The lower limit of the timeout may differ depending on the actual environment.

Constraints

  • Communicator usage constraint:

    • aclnnDistributeBarrier in a model needs to use a dedicated communicator, and other operators are not allowed in this communicator.
  • Communication method constraint:

    • Ascend 950DT products: Only UB Memory communication is supported.
  • Usage scenario description:

    • Call this operator in a network model that requires synchronization across all cards. It can shield performance fluctuations caused by fast and slow cards and help analyze performance.
    • The operator can be called consecutively. When the operator is added to a graph, the input of the previous operator and the output of the next operator must be passed to the API as input parameters.
    • When elasticInfo is enabled, ensure that Dispatch/Combine also passes in this parameter and that this elasticInfo is consistent with the elasticInfo in Dispatch/Combine.

Calling Instructions

Calling Method Sample Code Description
aclnn API test_aclnn_distribute_barrier.cpp Call the distribute_barrier operator through the aclnnDistributeBarrier API.