Gemm

Description

Computes the product of alpha multiplied by A and B, and then sum up the product of alpha multiplied by β and input C.

Input

  • A: 2D matrix tensor of type float16 or float. The data type must be deducible from that of C and B. The shape (or the transposed shape) must be compatible for multiplication with B. The data format can be ND.
  • B: 2D matrix tensor of type float16 or float. The data type must be deducible from that of C and A. The shape (or the transposed shape) must be compatible for multiplication with A. The data format can be ND.
  • C (optional): bias. This parameter is not supported currently.

Attribute

  • transA: bool, indicating whether A needs to be transposed. The default value is 0. If the value is not 0, A is transposed. If the value is 0, A is not transposed.
  • transB: bool, indicating whether B needs to be transposed. The default value is 0. If the value is not 0, B is transposed. If the value is 0, B is not transposed.
  • alpha: float. This parameter is not supported currently.
  • beta: float. This parameter is not supported currently.

Output

Y: 2D matrix tensor. The shape must be the same as that of the A@B computation result. The data type must be deduced from that of C. The data type can be float16 or float.

Constraints

The v8, v9, and v10 versions do not support the input of the float type when the atc tool parameter --precision_mode=must_keep_origin_dtype is used.

ONNX Opset Support

Opset v8/v9/v10/v11/v12/v13/v14/v15/v16/v17/v18