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: Integrates AllGather communication and MatMul compute.
- 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 A3 training products/Atlas A3 inference products[object Object], [object Object]Atlas A3 training products/Atlas A3 inference products[object Object]:
- bias: The scenario where the input is not 0 is not supported.
- Ascend 950PR/Ascend 950DT:
- bias: The scenario where the input is not 0 is supported.
- [object Object]Atlas A3 training products/Atlas A3 inference products[object Object], [object Object]Atlas A3 training products/Atlas A3 inference products[object Object]:
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 deterministic implementation.
Input
[object Object]is 2D (m, k). x2 must be 2-dimensional, and its shape is (k, n). The axis meets the input parameter requirements of the MatMul operator. The k axis is equal, and the value range of the k axis is [256, 65535).[object Object]and[object Object]support empty tensor scenarios. m and n can be empty, k cannot be empty, and 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.
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]: supports two, four, eight, sixteen, or thirty-two devices and only the double ring networking of HCCS links.
Ascend 950PR/Ascend 950DT:
- Supports 2, 4, 8, 16, 32, and 64 devices and supports only the all-mesh networking of HCCS links.
- The total data volume of AllGather(x1) collective communication cannot exceed 16 x 256 MB. The total data volume of collective communication is calculated as follows: m x k x sizeof(x1_dtype) x Number of devices. The internal implementation of the operator may vary according to the shape. Therefore, the total communication volume may be slightly less than this value.
[object Object]Atlas A2 training products/Atlas A2 inference products[object Object]: The MC2 operator in a model supports only the same communicator.
The following example is for reference only. For details, see .
Note: This sample code calls some HCCL collective communication library APIs, including HcclGetCommName, HcclCommInitAll, and HcclCommDestroy. For details, see .
[object Object]Atlas A2 training products/Atlas A2 inference products[object Object], [object Object]Atlas A3 training products/Atlas A3 inference products[object Object], and Ascend 950PR/Ascend 950DT:
[object Object]