Gemm - 6 vs 7#

Next section compares an older to a newer version of the same operator after both definition are converted into markdown text. Green means an addition to the newer version, red means a deletion. Anything else is unchanged.

Files changed (1) hide show
  1. Gemm6 → Gemm7 +15 -19
Gemm6 → Gemm7 RENAMED
@@ -1 +1 @@
1
1
  General Matrix multiplication:
2
2
  https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms#Level_3
3
-
4
- A' = transpose(A) if transA else A
5
-
6
- B' = transpose(B) if transB else B
7
-
8
- Compute Y = alpha * A' * B' + beta * C, where input tensor A has shape (M, K) or (K, M),
3
+ Compute Y = alpha * A * B + beta * C, where input tensor A has
4
+ dimension (M X K), input tensor B has dimension (K X N), input tensor C and
5
+ output tensor Y have dimension (M X N).
9
- input tensor B has shape (K, N) or (N, K), input tensor C is broadcastable to shape (M, N),
6
+ If attribute broadcast is non-zero, input tensor C will be broadcasted to match
10
- and output tensor Y has shape (M, N). A will be transposed before doing the
7
+ the dimension requirement. A will be transposed before doing the computation
11
- computation if attribute transA is non-zero, same for B and transB.
8
+ if attribute transA is non-zero, same for B and transB.
12
- 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>_.
13
9
  **Attributes**
14
10
  * **alpha**:
15
- Scalar multiplier for the product of input tensors A * B.
11
+ Scalar multiplier for the product of input tensors A * B, the
12
+ default value is 1.0.
16
13
  * **beta**:
17
- Scalar multiplier for input tensor C.
14
+ Scalar multiplier for input tensor C, the default value is 1.0.
15
+ * **broadcast**:
16
+ Whether C should be broadcasted
18
17
  * **transA**:
19
18
  Whether A should be transposed
20
19
  * **transB**:
21
20
  Whether B should be transposed
22
21
  **Inputs**
23
22
  * **A** (heterogeneous) - **T**:
23
+ Input tensor A
24
- Input tensor A. The shape of A should be (M, K) if transA is 0, or
25
- (K, M) if transA is non-zero.
26
24
  * **B** (heterogeneous) - **T**:
25
+ Input tensor B
27
- Input tensor B. The shape of B should be (K, N) if transB is 0, or
28
- (N, K) if transB is non-zero.
29
26
  * **C** (heterogeneous) - **T**:
27
+ Input tensor C
30
- Input tensor C. The shape of C should be unidirectional
31
- broadcastable to (M, N).
32
28
  **Outputs**
33
29
  * **Y** (heterogeneous) - **T**:
34
- Output tensor of shape (M, N).
30
+ Output tensor.
35
31
  **Type Constraints**
36
32
  * **T** in (
37
33
  tensor(double),
38
34
  tensor(float),
39
35
  tensor(float16)
40
36
  ):
41
37
  Constrain input and output types to float tensors.