[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Computes α multiplied by the product of A and B, and then adds the product of β and input C.
  • Formula:
    • If transA is not zero, A is transposed before computation. Similarly, if transB is not zero, B is transposed before computation.

      out=α(A@B)+βCout = α (A @ B) + β C
    • If both transA and transB are not zero, the formula is as follows:

      out=α(AT@BT)+βCout = α (A^T @ B^T) + βC
[object Object]

Each operator has calls. First, aclnnGemmGetWorkspaceSize is called to obtain the input parameters and compute the required workspace size based on the process. Then, aclnnGemm is called to perform computation.

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

    [object Object]
    • [object Object]Atlas training series products[object Object] and [object Object]Atlas inference series products[object Object]:
      • The data type of A can be FLOAT16 or FLOAT32.
      • The data type of B can be FLOAT16 or FLOAT32.
      • The data type of C can be FLOAT16 or FLOAT32.
      • The data type of out can be FLOAT16 or FLOAT32.
      • The data type BFLOAT16 is not supported.
      • When the input data type is FLOAT32, cubeMathType cannot be set to 0.
      • When cubeMathType is set to 1, if the input data type is FLOAT32, it is converted to FLOAT16 for computation. If the input data type is not FLOAT32, no processing is performed.
      • cubeMathType cannot be set to 3.
    • [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training series products/Atlas A3 inference series products[object Object]:
      • The data type of A can be BFLOAT16, FLOAT16, or FLOAT32.
      • The data type of B can be BFLOAT16, FLOAT16, or FLOAT32.
      • The data type of C can be BFLOAT16, FLOAT16, or FLOAT32.
      • The data type of out can be BFLOAT16, FLOAT16, or FLOAT32.
      • When cubeMathType is set to 1, if the input data type is FLOAT32, it is converted to HFLOAT32 for computation. If the input data type is not FLOAT32, no processing is performed.
      • When cubeMathType is set to 2, this option is not supported if the input data type is BFLOAT16.
      • When cubeMathType is set to 3, if the input data type is FLOAT32, it is converted to HFLOAT32 for computation. If the input data type is not FLOAT32, this option is not supported.
  • Returns

    aclnnStatus: 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

    aclnnStatus: status code. For details, see .

[object Object]
  • Deterministic description:
    • [object Object]Atlas training series products[object Object] and [object Object]Atlas inference series products[object Object]: aclnnGemm defaults to a deterministic implementation.
  • [object Object]Atlas training series products[object Object] and [object Object]Atlas inference series products[object Object]: The Cube unit does not support FLOAT32 computation. The input data type FLOAT32 can be converted to FLOAT16 in the API for computation by setting cubeMathType to 1 (ALLOW_FP32_DOWN_PRECISION).
[object Object]

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

[object Object]