Function: hgemm

C Prototype

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)

Python Function

ret = acl.blas.hgemm(trans_a, trans_b, trans_c,

m, n, k,

alpha, matrix_a, lda,

matrix_b, ldb,

beta, matrix_c, ldc,

type, stream)

Function Usage

Computes matrix-matrix multiplication: C = αAB + βC. The inputs and outputs are all of data type aclFloat16. This API is asynchronous.

Input Description

trans_a: int, whether matrix A is transposed.

trans_b: int, whether matrix B is transposed.

trans_c: int, transpose flag of matrix C. Currently, only aclTrans_N is supported.

m: int, number of rows in matrix A and C.

n: int, number of columns in matrix B and C.

k: int, number of columns in matrix A and number of rows in matrix B.

alpha: int, data pointer address of Scalar α used for executing the multiplication operation.

matrix_a: int, data pointer address of matrix A.

lda: int, leading dimension of matrix A. For row-major transpose, lda is the number of columns of matrix A.

matrix_b: int, data pointer address of matrix B.

ldb: int, leading dimension of matrix B. For row-major transpose, leading dimension is the number of columns of matrix B.

beta: int, data pointer address of Scalar β used for executing the multiplication operation.

matrix_c: int, data pointer address of matrix C.

ldc: int, leading dimension of matrix C (reserved).

type: int, calculation precision.

stream: int, stream where the operator is executed.

Return Value

ret: int, error code.

Restrictions

None

Reference

For details about the API call sequence, see API Call Sequence.