Div - 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. Div6 → Div7 +5 -32
Div6 → Div7 RENAMED
@@ -1 +1 @@
1
- Performs element-wise binary division (with limited broadcast support).
1
+ Performs element-wise binary division (with Numpy-style broadcasting support).
2
+ This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [Broadcasting in ONNX](https://github.com/onnx/onnx/blob/main/docs/Broadcasting.md).
2
- If necessary the right-hand-side argument will be broadcasted to match the
3
- shape of left-hand-side argument. When broadcasting is specified, the second
4
- tensor can either be of element size 1 (including a scalar tensor and any
5
- tensor with rank equal to or smaller than the first tensor), or having its
6
- shape as a contiguous subset of the first tensor's shape. The starting of the
7
- mutually equal shape is specified by the argument "axis", and if it is not set,
8
- suffix matching is assumed. 1-dim expansion doesn't work yet.
9
-
10
- For example, the following tensor shapes are supported (with broadcast=1):
11
-
12
- shape(A) = (2, 3, 4, 5), shape(B) = (,), i.e. B is a scalar tensor
13
- shape(A) = (2, 3, 4, 5), shape(B) = (1, 1), i.e. B is an 1-element tensor
14
- shape(A) = (2, 3, 4, 5), shape(B) = (5,)
15
- shape(A) = (2, 3, 4, 5), shape(B) = (4, 5)
16
- shape(A) = (2, 3, 4, 5), shape(B) = (3, 4), with axis=1
17
- shape(A) = (2, 3, 4, 5), shape(B) = (2), with axis=0
18
-
19
- Attribute broadcast=1 needs to be passed to enable broadcasting.
20
-
21
- ### Attributes
22
-
23
- * **axis - INT** :
24
-
25
- If set, defines the broadcast dimensions. See doc for details.
26
-
27
- * **broadcast - INT** (default is '0'):
28
-
29
- Pass 1 to enable broadcasting
30
3
  ### Inputs
31
4
  - **A** (heterogeneous) - **T**:
32
- First operand, should share the type with the second operand.
5
+ First operand.
33
6
  - **B** (heterogeneous) - **T**:
34
- Second operand. With broadcasting can be of smaller size than A. If broadcasting is disabled it should be of the same size.
7
+ Second operand.
35
8
  ### Outputs
36
9
  - **C** (heterogeneous) - **T**:
37
- Result, has same dimensions and type as A
10
+ Result, has same element type as two inputs
38
11
  ### Type Constraints
39
12
  * **T** in ( tensor(double), tensor(float), tensor(float16), tensor(int32), tensor(int64), tensor(uint32), tensor(uint64) ):
40
13
  Constrain input and output types to high-precision numeric tensors.