[object Object][object Object][object Object]undefined
[object Object]
  • Description: Performs matrix multiplication on tensors x1 and x2. Only three-dimensional tensors can be passed. Tensors can be transposed. The transposition sequence is changed based on the input sequence. permX1 indicates the transposition sequence of tensor x1, and permX2 indicates the transposition sequence of tensor x2. The sequence value 0 indicates the batch dimension, and the other two dimensions are used for matrix multiplication.

  • Example:

    • If the shape of x1 is (B, M, K), the shape of x2 is (B, K, N), scale is None, and batchSplitFactor is 1, the shape of the output out is (M, B, N).
    • If the shape of x1 is (B, M, K), the shape of x2 is (B, K, N), scale is not None, and batchSplitFactor is 1, the shape of the output out is (M, 1, B * N).
    • If the shape of x1 is (B, M, K), the shape of x2 is (B, K, N), scale is None, and batchSplitFactor is greater than 1, the shape of the output out is (batchSplitFactor, M, B * N / batchSplitFactor).
[object Object]

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

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

    [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]
[object Object]
  • Parameters:

    [object Object]
  • Returns:

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

[object Object]
  • Determinism description: The aclnnTransposeBatchMatMul is implemented in deterministic mode by default.

  • [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]:

    • The value range of B is [1, 65536), and the value range of N is [1, 65536).
    • When the input shape of x1 is (B, M, K), K ≤ 65535. When the input shape of x1 is (M, B, K), B × K ≤ 65535.
    • The second or third dimension of x2 cannot be exactly divided by 16.
    • permX2 supports only the input [0, 1, 2].
    • When scale is not empty, batchSplitFactor can only be 1, the product of B and N is less than 65536, and only the type inference from FLOAT16 to INT8 is supported.
  • Ascend 950PR/Ascend 950DT:

    • permX2 supports the input [0, 1, 2] and [0, 2, 1].
    • When scale is not empty, batchSplitFactor can only be 1, and only the type inference from FLOAT16 to INT8 is supported.
[object Object]

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

[object Object]