Function: create_handle_for_gemm_ex

C Prototype

aclError aclblasCreateHandleForGemmEx(aclTransType transA,

aclTransType transB,

aclTransType transC,

int m,

int n,

int k,

aclDataType dataTypeA,

aclDataType dataTypeB,

aclDataType dataTypeC,

aclComputeType type,

aclopHandle **handle)

Python Function

handle, ret = acl.blas.create_handle_for_gemm_ex(trans_a, trans_b, trans_c, m, n, k, data_type_a, data_type_b, data_type_c, type)

Function Usage

Creates a handle for matrix-matrix multiplication. The data types of the input and output data are set using arguments.

After the handle is created, call acl.op.execute_with_handle to execute the operator.

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.

data_type_a: int, data type of matrix A.

data_type_b: int, data type of matrix B.

data_type_c: int, data type of matrix C.

type: int, calculation precision.

Return Value

handle: int, pointer address of the handle data of the operator to be executed.

ret: int, error code.

Restrictions

Only the following data types for A, B and C are supported.

Data Type of A Data Type of x Data Type of y

aclFloat16 aclFloat16 aclFloat16

aclFloat16 aclFloat16 float(float32)

int8_t int8_t float(float32)

int8_t int8_t int32_t