[object Object]

[object Object][object Object]undefined

Note: When using this API, ensure that the driver firmware package and CANN package are in the 8.0.RC2 version or later. Otherwise, an error, such as BUS ERROR, will be reported.

[object Object]
  • Description: Performs mm + reduce_scatter_base computation.

  • Formula:

    output=reduceScatter(x1@x2+bias)output=reduceScatter(x1@x2+bias)
[object Object]

Each operator has calls. First, [object Object] is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, [object Object] is called to perform computation.

[object Object]
[object Object]
[object Object]
  • Parameters

    [object Object]
    • [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training products/Atlas A3 inference products[object Object]:
      • bias does not support non-zero input.
    • Ascend 950PR/Ascend 950DT:
      • bias supports non-zero input.
  • Return

    [object Object]: status code. For details, see .

    The first-phase API implements input parameter verification. The following errors may be thrown:

    [object Object]
[object Object]
  • Parameters

    [object Object]
  • Returns

    [object Object]: status code. For details, see .

[object Object]
  • Deterministic compute:

    • [object Object] defaults to a non-deterministic implementation. You can call [object Object] to enable deterministic compute.
  • Input x1 must be 2D (m, k). m must be an integer multiple of rank_size.

  • Input x2 must be 2D with shape (k, n). The axes must meet the input parameter requirements of the [object Object] operator. The k axes must be equal and fall within the range of [256, 65535).

  • x1 and x2 support empty tensors. m and n can be empty, but k cannot be empty. The following conditions must be met:

    • m is empty, k is not empty, and n is not empty.
    • If m is not empty, k is not empty, and n is empty.
    • If m is empty, k is not empty, and n is empty.
  • Matrix x2 can be transposed or not transposed, and matrix x1 can only be not transposed.

  • The data type of x1 and x2 must be the same as that of output.

  • bias does not support non-zero input.

  • The output is 2D with shape (m/rank_size, n), where rank_size indicates the number of devices.

  • [object Object]Atlas A2 training products/Atlas A2 inference products[object Object]: supports two, four, or eight devices and only the all mesh networking of HCCS links.

  • [object Object]Atlas A3 training products/Atlas A3 inference products[object Object]:

    • 2, 4, 8, 16, or 32 NPUs are supported, and only the double-ring networking of HCCS links is supported.
    • The total size of data for collective communication in reduceScatter(x1@x2+bias) cannot exceed 16 x 256 MB. The total size of data for collective communication is calculated as follows: m x n x sizeof(output_dtype). The internal implementation of the operator may vary according to the shape. Therefore, the total communication volume supported may be slightly less than this value.
  • Ascend 950PR/Ascend 950DT: 2, 4, 8, 16, 32, or 64 NPUs are supported, and only the all-mesh networking of HCCS links is supported.

  • [object Object]Atlas A2 training products/Atlas A2 inference products[object Object]: supports only one communication domain for MC2 operators within a model.

[object Object]

The following example is for reference only. For details, see .

Note: This sample code calls some HCCL collective communication library APIs: HcclGetCommName, HcclCommInitAll, and HcclCommDestroy. For details, see .

  • [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training products/Atlas A3 inference products[object Object]:

    [object Object]