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.
- 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. Per-tensor and per-channel quantization modes are supported. - Formula:
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.
Parameters:
[object Object]- [object Object]Atlas A2 training products/Atlas A2 inference products[object Object]: The
[object Object]input can be in ND (2D input only) or FRACTAL_NZ (4D input only) format. 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.
- [object Object]Atlas A2 training products/Atlas A2 inference products[object Object]: The
Returns:
[object Object]: status code. For details, see .The first-phase API implements input parameter verification. The following errors may be thrown:
[object Object]
Deterministic computing:
[object Object]defaults to a non-deterministic implementation. You can call[object Object]to enable deterministic compute.
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.[object Object]or[object Object]cannot be an empty matrix.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.
[object Object]Atlas A2 training products/Atlas A2 inference products[object Object]: supports only one communication domain for MC2 operators within a model.
The following example is for reference only. For details, see .
[object Object]Atlas A2 training products/Atlas A2 inference products[object Object]:
[object Object]