Gemm - 9 vs 11

Files changed (1) hide show
  1. Gemm9 → Gemm11 +6 -2
Gemm9 → Gemm11 RENAMED
@@ -1 +1 @@
1
1
  General Matrix multiplication:
2
2
  https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms#Level_3
3
3
  A' = transpose(A) if transA else A
4
4
  B' = transpose(B) if transB else B
5
5
  Compute Y = alpha * A' * B' + beta * C, where input tensor A has shape (M, K) or (K, M),
6
6
  input tensor B has shape (K, N) or (N, K), input tensor C is broadcastable to shape (M, N),
7
7
  and output tensor Y has shape (M, N). A will be transposed before doing the
8
8
  computation if attribute transA is non-zero, same for B and transB.
9
9
  This operator supports **unidirectional broadcasting** (tensor C should be unidirectional broadcastable to tensor A * B); for more details please check Broadcasting in ONNX <https://github.com/onnx/onnx/blob/master/docs/Broadcasting.md>_.
10
+ This operator has **optional** inputs/outputs. See ONNX <https://github.com/onnx/onnx/blob/master/docs/IR.md>_ for more details about the representation of optional arguments. An empty string may be used in the place of an actual argument's name to indicate a missing argument. Trailing optional arguments (those not followed by an argument that is present) may also be simply omitted.
10
11
  **Attributes**
11
12
  * **alpha**:
12
13
  Scalar multiplier for the product of input tensors A * B.
13
14
  * **beta**:
14
15
  Scalar multiplier for input tensor C.
15
16
  * **transA**:
16
17
  Whether A should be transposed
17
18
  * **transB**:
18
19
  Whether B should be transposed
19
20
  **Inputs**
21
+ Between 2 and 3 inputs.
22
+
20
23
  * **A** (heterogeneous) - **T**:
21
24
  Input tensor A. The shape of A should be (M, K) if transA is 0, or
22
25
  (K, M) if transA is non-zero.
23
26
  * **B** (heterogeneous) - **T**:
24
27
  Input tensor B. The shape of B should be (K, N) if transB is 0, or
25
28
  (N, K) if transB is non-zero.
26
- * **C** (heterogeneous) - **T**:
29
+ * **C** (optional, heterogeneous) - **T**:
30
+ Optional input tensor C. If not specified, the computation is done
27
- Input tensor C. The shape of C should be unidirectional
31
+ as if C is a scalar 0. The shape of C should be unidirectional
28
32
  broadcastable to (M, N).
29
33
  **Outputs**
30
34
  * **Y** (heterogeneous) - **T**:
31
35
  Output tensor of shape (M, N).
32
36
  **Type Constraints**
33
37
  * **T** in (
34
38
  tensor(double),
35
39
  tensor(float),
36
40
  tensor(float16),
37
41
  tensor(int32),
38
42
  tensor(int64),
39
43
  tensor(uint32),
40
44
  tensor(uint64)
41
45
  ):
42
46
  Constrain input and output types to float/int tensors.