Gemm - version 1#

This page documents version 1 of operator Gemm. See Gemm for the latest version (since version 13).

  • Domain: ai.onnx

  • Since version: 1

General Matrix multiplication: https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms#Level_3 Compute Y = alpha * A * B + beta * C, where input tensor A has dimension (M X K), input tensor B has dimension (K X N), input tensor C and output tensor Y have dimension (M X N). If attribute broadcast is non-zero, input tensor C will be broadcasted to match the dimension requirement. A will be transposed before doing the computation if attribute transA is non-zero, same for B and transB.

Inputs

  • A (T): Input tensor A

  • B (T): Input tensor B

  • C (T): Input tensor C, can be inplace.

Outputs

  • Y (T): Output tensor.

Type Constraints

  • T: Constrain input and output types to float tensors. Allowed types: tensor(double), tensor(float), tensor(float16).