Gemm - 7 vs 11#
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.
- Gemm7 → Gemm11 +4 -12
Gemm7 → 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.
|
11
10
|
**Attributes**
|
12
11
|
* **alpha**:
|
13
12
|
Scalar multiplier for the product of input tensors A * B.
|
14
13
|
* **beta**:
|
15
14
|
Scalar multiplier for input tensor C.
|
16
15
|
* **transA**:
|
17
16
|
Whether A should be transposed
|
18
17
|
* **transB**:
|
19
18
|
Whether B should be transposed
|
20
19
|
**Inputs**
|
21
|
-
Between 2 and 3 inputs.
|
22
|
-
|
23
20
|
* **A** (heterogeneous) - **T**:
|
24
21
|
Input tensor A. The shape of A should be (M, K) if transA is 0, or
|
25
22
|
(K, M) if transA is non-zero.
|
26
23
|
* **B** (heterogeneous) - **T**:
|
27
24
|
Input tensor B. The shape of B should be (K, N) if transB is 0, or
|
28
25
|
(N, K) if transB is non-zero.
|
29
|
-
* **C** (
|
26
|
+
* **C** (heterogeneous) - **T**:
|
30
|
-
Optional input tensor C. If not specified, the computation is done
|
31
|
-
|
27
|
+
Input tensor C. The shape of C should be unidirectional
|
32
28
|
broadcastable to (M, N).
|
33
29
|
**Outputs**
|
34
30
|
* **Y** (heterogeneous) - **T**:
|
35
31
|
Output tensor of shape (M, N).
|
36
32
|
**Type Constraints**
|
37
33
|
* **T** in (
|
38
34
|
tensor(double),
|
39
35
|
tensor(float),
|
40
|
-
tensor(float16)
|
36
|
+
tensor(float16)
|
41
|
-
tensor(int32),
|
42
|
-
tensor(int64),
|
43
|
-
tensor(uint32),
|
44
|
-
tensor(uint64)
|
45
37
|
):
|
46
|
-
Constrain input and output types to float
|
38
|
+
Constrain input and output types to float tensors.
|