Computes matrix-matrix multiplication: C = αAB + βC. The inputs and outputs are all of data type aclFloat16. This API is asynchronous.
aclError aclblasHgemm(aclTransType transA,
aclTransType transB,
aclTransType transC,
int m,
int n,
int k,
const aclFloat16 *alpha,
const aclFloat16 *matrixA,
int lda,
const aclFloat16 *matrixB,
int ldb,
const aclFloat16 *beta,
aclFloat16 *matrixC,
int ldc,
aclComputeType type,
aclrtStream stream)
Parameter |
Input/Output |
Description |
|---|---|---|
transA |
Input |
Transpose flag of matrix A. |
transB |
Input |
Transpose flag of matrix B. |
transC |
Input |
Transpose flag of matrix C. Currently, only ACL_TRANS_N is supported. |
m |
Input |
Number of rows in matrix A and matrix C. |
n |
Input |
Number of columns in matrix B and matrix C. |
k |
Input |
Number of columns in matrix A and number of rows in matrix B. |
alpha |
Input |
Pointer to scalar α used for executing the multiplication operation. |
matrixA |
Input |
Pointer to matrix A. |
lda |
Input |
Leading dimension of matrix A. For row-major transpose, lda is the number of columns of matrix A. This parameter is reserved and can only be set to –1. |
matrixB |
Input |
Pointer to matrix B. |
ldb |
Input |
Leading dimension of matrix B. For row-major transpose, ldb is the number of columns of matrix B. This parameter is reserved and can only be set to –1. |
beta |
Input |
Pointer to scalar β used for executing the multiplication operation. |
matrixC |
Input/Output |
Pointer to matrix C. |
ldc |
Input |
Leading dimension of matrix C. This parameter is reserved and can only be set to -1. |
type |
Input |
Computation precision type (high precision by default). |
stream |
Input |
Stream where the operator is executed. |
0 on success; else, failure.
For the API call sequence, see API Call Sequence.