This API is used to perform the quantized matrix multiplication of tensor x1 and tensor x2. The K-C quantization mode is supported (../common/quant_mode_introduction.md). Only three-dimensional tensors are supported. 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: Assume that the shape of x1 is (M, B, K), the shape of x2 is (B, K, N), x1Scale and x2Scale are not None, and batchSplitFactor is 1. The shape of the output out is (M, B, N).
Each operator has calls. First, [object Object] is called to obtain the input parameters and compute the required workspace size based on the process. Then, [object Object] is called to perform computation.
Parameters
[object Object]Returns:
[object Object]: status code. For details, see .The first-phase API implements input parameter validation. The following error codes may be returned.
[object Object]
Deterministic description: The aclnnTransposeQuantBatchMatMul is implemented in deterministic mode by default.
Ascend 950PR/Ascend 950DT:
- permX1 and permY support [1, 0, 2], and permX2 supports [0, 1, 2].
- x1Scale and x2Scale are 1-dimensional, and x1Scale is (M,), and x2Scale is (N,).
- out and dtype support float16 and bfloat16.
The following example is for reference only. For details, see .