[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]
  • API function: Performs MatMul computation on quantized input parameters [object Object] and [object Object], followed by dequantization, then performs addition with [object Object], and finally executes AllReduce computation. The per-tensor and per-channel quantization modes are supported.
  • Formula:output=AllReduce(dequantScale(x1int8@x2int8+biasint32)+x3)output= AllReduce(dequantScale*(x1_{int8}@x2_{int8} + bias_{int32}) + x3)
[object Object]

Each operator has [two-phase API](../common/two_phase_api .md) 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]:

      • The x2 input supports the ND format (only 2D input is supported in the current version) and FRACTAL_NZ format (only 4D input is supported in the current version). When the format of [object Object] is FRACTAL_NZ, [object Object] and [object Object] are used to convert the data format from ND into NZ. Non-contiguous tensors support only the transpose scenario.
    • Ascend 950PR/Ascend 950DT:

      • The x2 input supports only the ND format (only 2D input is supported in the current version).
  • Returns:

    [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 computing:
    • [object Object]Atlas A2 training products/Atlas A2 inference products[object Object]: aclnnQuantMatmulAllReduce is implemented in non-deterministic mode by default. You can enable deterministic computing by setting the HCCL_DETERMINISTIC environment variable to true.
    • Ascend 950PR/Ascend 950DT: [object Object] defaults to a deterministic implementation.
  • MC2 is disabled in incremental generation scenarios but enabled in full generation scenarios.
  • [object Object] can be 2D (m, k) or 3D (b, s, k). [object Object] must be 2D (k, n), where the k axis meets the input parameter requirements of the MatMul operator. The k axes of [object Object] and [object Object] must be equal.
  • The value of m cannot exceed 2147483647. The size of the last dimension of [object Object] (k) and [object Object] (k when transposed and n when not transposed) cannot exceed 65535. If [object Object] is not empty, its shape is (n). If [object Object] is not empty, its shape is the same as that of [object Object].
  • When the shape of input [object Object] is (b, s, k), [object Object] shape is (b, s, n). When the shape of input [object Object] is (m, k), [object Object] shape is (m, n).
  • The passed [object Object], [object Object], [object Object], or [object Object] cannot be a null pointer.
  • The data types and formats of [object Object], [object Object], [object Object], [object Object], [object Object] (when not empty), and [object Object] (when not empty) must be supported.
  • If [object Object] is of FLOAT16 type, the type of [object Object] is INT64 or UINT64. If [object Object] is of BFLOAT16 type, the types of [object Object] and [object Object] are both BFLOAT16.
  • Only the all-mesh networking of HCCS links is supported.
    • [object Object]Atlas A2 training products/Atlas A2 inference products[object Object]: 1, 2, 4, or 8 ranks are supported.
    • Ascend 950PR/Ascend 950DT: 1, 2, 4, 8, 16, 32, and 64 cards are supported.
  • [object Object]Atlas A2 training products/Atlas A2 inference products[object Object]: supports only one communication domain for MC2 operators within a model.
  • Support for empty tensors:
    • Empty tensors are not supported.
[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 Ascend 950PR/Ascend 950DT:

    [object Object]