aclblasGemmEx
Description
Computes matrix-matrix multiplication: C = αAB + βC. The data types of the input and output data are set using arguments. This API is asynchronous.
Restrictions
A, B, and C support a limited combination of data types. α and β have the same data types as C.
|
Data Type of A |
Data Type of B |
Data Type of C |
|---|---|---|
|
float(float32) |
||
|
int8_t |
int8_t |
float(float32) |
|
int8_t |
int8_t |
int32_t |
Prototype
aclError aclblasGemmEx(aclTransType transA,
aclTransType transB,
aclTransType transC,
int m,
int n,
int k,
const void *alpha,
const void *matrixA,
int lda,
aclDataType dataTypeA,
const void *matrixB,
int ldb,
aclDataType dataTypeB,
const void *beta,
void *matrixC,
int ldc,
aclDataType dataTypeC,
aclComputeType type,
aclrtStream stream)
Parameters
|
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. |
|
dataTypeA |
Input |
Data type of matrix A. |
|
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. |
|
dataTypeB |
Input |
Data type of matrix B. |
|
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. |
|
dataTypeC |
Input |
Data type of matrix C. |
|
type |
Input |
Computation precision type (high precision by default). |
|
stream |
Input |
Stream where the operator is executed. |
Returns
The value 0 indicates success, and other values indicate failure. For details, see aclError.