Gemm - version 11#
This page documents version 11 of operator Gemm. See Gemm for the latest version (since version 13).
Domain:
ai.onnxSince version: 11
General Matrix multiplication: https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms#Level_3
A’ = transpose(A) if transA else A
B’ = transpose(B) if transB else B
Compute Y = alpha * A’ * B’ + beta * C, where input tensor A has shape (M, K) or (K, M), input tensor B has shape (K, N) or (N, K), input tensor C is broadcastable to shape (M, N), and output tensor Y has shape (M, N). 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. The shape of A should be (M, K) if transA is 0, or (K, M) if transA is non-zero.
B (T): Input tensor B. The shape of B should be (K, N) if transB is 0, or (N, K) if transB is non-zero.
C (T): Optional input tensor C. If not specified, the computation is done as if C is a scalar 0. The shape of C should be unidirectional broadcastable to (M, N).
Outputs
Y (T): Output tensor of shape (M, N).
Type Constraints
T: Constrain input and output types to float/int tensors. Allowed types: tensor(double), tensor(float), tensor(float16), tensor(int32), tensor(int64), tensor(uint32), tensor(uint64).
Differences with previous version (9)#
SchemaDiff: Gemm (domain 'ai.onnx')
old version: 9
new version: 11
breaking: no