Skip to content

Commit f382ab8

Browse files
committed
Regenerate tblgen files with new onnx version
1 parent 29a18ad commit f382ab8

File tree

4 files changed

+230
-109
lines changed

4 files changed

+230
-109
lines changed

docs/Dialects/krnl.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ _Krnl acos scalar operation_
55

66
Krnl acos scalar operation.
77

8+
Traits: `AlwaysSpeculatableImplTrait`
9+
10+
Interfaces: `ConditionallySpeculatable`, `NoMemoryEffect (MemoryEffectOpInterface)`
11+
12+
Effects: `MemoryEffects::Effect{}`
13+
814
#### Operands:
915

1016
| Operand | Description |
@@ -23,6 +29,12 @@ _Krnl acosh scalar operation_
2329

2430
Krnl acosh scalar operation.
2531

32+
Traits: `AlwaysSpeculatableImplTrait`
33+
34+
Interfaces: `ConditionallySpeculatable`, `NoMemoryEffect (MemoryEffectOpInterface)`
35+
36+
Effects: `MemoryEffects::Effect{}`
37+
2638
#### Operands:
2739

2840
| Operand | Description |
@@ -41,6 +53,12 @@ _Krnl asin scalar operation_
4153

4254
Krnl asin scalar operation.
4355

56+
Traits: `AlwaysSpeculatableImplTrait`
57+
58+
Interfaces: `ConditionallySpeculatable`, `NoMemoryEffect (MemoryEffectOpInterface)`
59+
60+
Effects: `MemoryEffects::Effect{}`
61+
4462
#### Operands:
4563

4664
| Operand | Description |
@@ -59,6 +77,12 @@ _Krnl asinh scalar operation_
5977

6078
Krnl asinh scalar operation.
6179

80+
Traits: `AlwaysSpeculatableImplTrait`
81+
82+
Interfaces: `ConditionallySpeculatable`, `NoMemoryEffect (MemoryEffectOpInterface)`
83+
84+
Effects: `MemoryEffects::Effect{}`
85+
6286
#### Operands:
6387

6488
| Operand | Description |
@@ -77,6 +101,12 @@ _Krnl atan scalar operation_
77101

78102
Krnl atan scalar operation.
79103

104+
Traits: `AlwaysSpeculatableImplTrait`
105+
106+
Interfaces: `ConditionallySpeculatable`, `NoMemoryEffect (MemoryEffectOpInterface)`
107+
108+
Effects: `MemoryEffects::Effect{}`
109+
80110
#### Operands:
81111

82112
| Operand | Description |
@@ -95,6 +125,12 @@ _Krnl atanh scalar operation_
95125

96126
Krnl atanh scalar operation.
97127

128+
Traits: `AlwaysSpeculatableImplTrait`
129+
130+
Interfaces: `ConditionallySpeculatable`, `NoMemoryEffect (MemoryEffectOpInterface)`
131+
132+
Effects: `MemoryEffects::Effect{}`
133+
98134
#### Operands:
99135

100136
| Operand | Description |
@@ -336,6 +372,12 @@ _Krnl erf scalar operation_
336372

337373
Krnl erf scalar operation.
338374

375+
Traits: `AlwaysSpeculatableImplTrait`
376+
377+
Interfaces: `ConditionallySpeculatable`, `NoMemoryEffect (MemoryEffectOpInterface)`
378+
379+
Effects: `MemoryEffects::Effect{}`
380+
339381
#### Operands:
340382

341383
| Operand | Description |
@@ -497,6 +539,12 @@ _Krnl isinf scalar operation_
497539

498540
Krnl isinf scalar operation.
499541

542+
Traits: `AlwaysSpeculatableImplTrait`
543+
544+
Interfaces: `ConditionallySpeculatable`, `NoMemoryEffect (MemoryEffectOpInterface)`
545+
546+
Effects: `MemoryEffects::Effect{}`
547+
500548
#### Operands:
501549

502550
| Operand | Description |
@@ -515,6 +563,12 @@ _Krnl isnan scalar operation_
515563

516564
Krnl isnan scalar operation.
517565

566+
Traits: `AlwaysSpeculatableImplTrait`
567+
568+
Interfaces: `ConditionallySpeculatable`, `NoMemoryEffect (MemoryEffectOpInterface)`
569+
570+
Effects: `MemoryEffects::Effect{}`
571+
518572
#### Operands:
519573

520574
| Operand | Description |
@@ -1207,6 +1261,12 @@ _Krnl round to nearest even operation_
12071261
Krnl round to nearest even operation. Accept scalar or vector float values.
12081262
Vector must be 1D of a size that is a multiple of the hardware vector size.
12091263

1264+
Traits: `AlwaysSpeculatableImplTrait`
1265+
1266+
Interfaces: `ConditionallySpeculatable`, `NoMemoryEffect (MemoryEffectOpInterface)`
1267+
1268+
Effects: `MemoryEffects::Effect{}`
1269+
12101270
#### Operands:
12111271

12121272
| Operand | Description |
@@ -1427,6 +1487,12 @@ _Krnl tan scalar operation_
14271487

14281488
Krnl tan scalar operation.
14291489

1490+
Traits: `AlwaysSpeculatableImplTrait`
1491+
1492+
Interfaces: `ConditionallySpeculatable`, `NoMemoryEffect (MemoryEffectOpInterface)`
1493+
1494+
Effects: `MemoryEffects::Effect{}`
1495+
14301496
#### Operands:
14311497

14321498
| Operand | Description |

docs/Dialects/onnx.md

Lines changed: 72 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ implementations (even if a seed is specified).
769769

770770
Traits: `AlwaysSpeculatableImplTrait`, `OpVersionTrait<22>`
771771

772-
Interfaces: `ConditionallySpeculatable`, `NoMemoryEffect (MemoryEffectOpInterface)`, `ShapeHelperOpInterface`, `ShapeInferenceOpInterface`
772+
Interfaces: `ConditionallySpeculatable`, `NoMemoryEffect (MemoryEffectOpInterface)`, `ResultTypeInferenceOpInterface`, `ShapeHelperOpInterface`, `ShapeInferenceOpInterface`
773773

774774
Effects: `MemoryEffects::Effect{}`
775775

@@ -1017,7 +1017,7 @@ See documentation of the Cast operator for further details.
10171017

10181018
Traits: `AlwaysSpeculatableImplTrait`, `OpVersionTrait<21>`
10191019

1020-
Interfaces: `ConditionallySpeculatable`, `NoMemoryEffect (MemoryEffectOpInterface)`, `ShapeHelperOpInterface`, `ShapeInferenceOpInterface`
1020+
Interfaces: `ConditionallySpeculatable`, `NoMemoryEffect (MemoryEffectOpInterface)`, `ResultTypeInferenceOpInterface`, `ShapeHelperOpInterface`, `ShapeInferenceOpInterface`
10211021

10221022
Effects: `MemoryEffects::Effect{}`
10231023

@@ -1122,28 +1122,31 @@ deep models. By default the conversion of a float *x* obeys
11221122
to the following rules. `[x]` means the value rounded to
11231123
the target mantissa width.
11241124

1125-
| x | E4M3FN | E4M3FNUZ | E5M2 | E5M2FNUZ |
1126-
|------|----|----|----|----|
1127-
| 0 | 0 | 0 | 0 | 0 |
1128-
|-0 | -0 | 0 | -0 | 0 |
1129-
| NaN | NaN | NaN | NaN | NaN |
1130-
| +/- Inf | +/- FLT_MAX | NaN | FLT_MAX | NaN |
1131-
| [x] > FLT_MAX | FLT_MAX | FLT_MAX | FLT_MAX | FLT_MAX |
1132-
| [x] < -FLT_MAX | -FLT_MAX | -FLT_MAX | -FLT_MAX | -FLT_MAX |
1133-
| else | RNE | RNE | RNE | RNE |
1125+
| x | E4M3FN | E4M3FNUZ | E5M2 | E5M2FNUZ |
1126+
| ----------------- | -------- | -------- | -------- | -------- |
1127+
| 0 | 0 | 0 | 0 | 0 |
1128+
| -0 | -0 | 0 | -0 | 0 |
1129+
| NaN | NaN | NaN | NaN | NaN |
1130+
| Inf | FLT_MAX | NaN | FLT_MAX | NaN |
1131+
| -Inf | -FLT_MAX | NaN | -FLT_MAX | NaN |
1132+
| \[x\] > FLT_MAX | FLT_MAX | FLT_MAX | FLT_MAX | FLT_MAX |
1133+
| \[x\] \< -FLT_MAX | -FLT_MAX | -FLT_MAX | -FLT_MAX | -FLT_MAX |
1134+
| else | RNE | RNE | RNE | RNE |
11341135

11351136
The behavior changes if the parameter 'saturate' is set to False.
11361137
The rules then become:
11371138

1138-
| x | E4M3FN | E4M3FNUZ | E5M2 | E5M2FNUZ |
1139-
|------|----|----|----|----|
1140-
| 0 | 0 | 0 | 0 | 0 |
1141-
|-0 | -0 | 0 | -0 | 0 |
1142-
| NaN | NaN | NaN | NaN | NaN |
1143-
| +/- Inf | NaN | NaN | +/- Inf | NaN |
1144-
| [x] > FLT_MAX | NaN | NaN | Inf | NaN |
1145-
| [x] < -FLT_MAX | NaN | NaN | -Inf | NaN |
1146-
| else | RNE | RNE | RNE | RNE |
1139+
| x | E4M3FN | E4M3FNUZ | E5M2 | E5M2FNUZ |
1140+
| ----------------- | ------ | -------- | ---- | -------- |
1141+
| 0 | 0 | 0 | 0 | 0 |
1142+
| -0 | -0 | 0 | -0 | 0 |
1143+
| NaN | NaN | NaN | NaN | NaN |
1144+
| -NaN | -NaN | NaN | -NaN | NaN |
1145+
| Inf | NaN | NaN | Inf | NaN |
1146+
| -Inf | -NaN | NaN | -Inf | NaN |
1147+
| \[x\] > FLT_MAX | NaN | NaN | Inf | NaN |
1148+
| \[x\] \< -FLT_MAX | NaN | NaN | -Inf | NaN |
1149+
| else | RNE | RNE | RNE | RNE |
11471150

11481151
Traits: `AlwaysSpeculatableImplTrait`, `OpVersionTrait<21>`
11491152

@@ -1281,12 +1284,18 @@ _ONNX CenterCropPad operation_
12811284

12821285
Center crop or pad an input to given dimensions.
12831286

1284-
The crop/pad dimensions can be specified for a subset of the `axes`. Non-specified dimensions will not be
1285-
cropped or padded.
1287+
The crop/pad dimensions can be specified for a subset of the `axes`; unspecified dimensions will remain unchanged.
1288+
1289+
If the input dimensions are larger than the target crop dimensions, a centered cropping window will be extracted
1290+
from the input. The starting value for the cropping window is rounded down, which means that if the difference
1291+
between the input shape and the crop shape is odd, the cropping window will be shifted half a pixel to the left
1292+
of the input center.
12861293

1287-
If the input dimensions are bigger than the crop shape, a centered cropping window is extracted from the input.
1288-
If the input dimensions are smaller than the crop shape, the input is padded on each side equally,
1289-
so that the input is centered in the output.
1294+
If the input dimensions are smaller than the target crop dimensions, the input will be padded equally on both sides
1295+
to center it in the output. In cases where the total number of padding pixels is odd, an additional pixel will be
1296+
added to the right side.
1297+
1298+
The padding value used is zero.
12901299

12911300
Traits: `AlwaysSpeculatableImplTrait`, `OpVersionTrait<18>`
12921301

@@ -1321,6 +1330,8 @@ _ONNX Clip operation_
13211330
Clip operator limits the given input within an interval. The interval is
13221331
specified by the inputs 'min' and 'max'. They default to
13231332
numeric_limits::lowest() and numeric_limits::max(), respectively.
1333+
When 'min' is greater than 'max', the clip operator sets all the 'input' values to
1334+
the value of 'max'. Thus, this is equivalent to 'Min(max, Max(input, min))'.
13241335

13251336
Traits: `AlwaysSpeculatableImplTrait`, `OpVersionTrait<13>`
13261337

@@ -2185,7 +2196,6 @@ full-precision tensor. The dequantization formula is `y = (x - x_zero_point) * x
21852196
must have the same shape, determining the quantization's granularity: a scalar for per-tensor/per-layer quantization,
21862197
a 1-D tensor for per-axis quantization, or have a rank identical to the input for blocked quantization.
21872198
See QuantizeLinear for details on quantization granularity.
2188-
21892199
`x_zero_point` and `x` must have the same type. `x` and `y` must have the same shape. In the case of dequantizing
21902200
`int32`, there's no zero point (zero point is supposed to be 0).
21912201
`zero-point` is usually not used in the case of float8 types quantization, but the dequantization formula remains the same
@@ -3129,7 +3139,22 @@ Given `data` tensor of rank r >= 1, and `indices` tensor of rank q, gather
31293139
entries of the axis dimension of `data` (by default outer-most one as axis=0) indexed by `indices`, and concatenates
31303140
them in an output tensor of rank q + (r - 1).
31313141

3132-
If `axis = 0`, let `k = indices[i_{0}, ..., i_{q-1\}\]`
3142+
It is an indexing operation that indexes into the input `data` along a single (specified) axis.
3143+
Each entry in `indices` produces a `r-1` dimensional slice of the input tensor.
3144+
The entire operation produces, conceptually, a `q`-dimensional tensor of `r-1` dimensional slices,
3145+
which is arranged into a `q + (r-1)`-dimensional tensor, with the `q` dimensions taking the
3146+
place of the original `axis` that is being indexed into.
3147+
3148+
The following few examples illustrate how `Gather` works for specific shapes of `data`,
3149+
`indices`, and given value of `axis`:
3150+
| data shape | indices shape | axis | output shape | output equation |
3151+
| --- | --- | --- | --- | --- |
3152+
| (P, Q) | ( ) (a scalar) | 0 | (Q) | output[q] = data[indices, q] |
3153+
| (P, Q, R) | ( ) (a scalar) | 1 | (P, R) | output[p, r] = data[p, indices, r] |
3154+
| (P, Q) | (R, S) | 0 | (R, S, Q) | output[r, s, q] = data[ [indices[r, s], q] |
3155+
| (P, Q) | (R, S) | 1 | (P, R, S) | output[p, r, s] = data[ p, indices[r, s]] |
3156+
3157+
More generally, if `axis = 0`, let `k = indices[i_{0}, ..., i_{q-1\}\]`
31333158
then `output[i_{0}, ..., i_{q-1}, j_{0}, ..., j_{r-2\}\] = input[k , j_{0}, ..., j_{r-2\}\]`:
31343159

31353160
```
@@ -3740,7 +3765,7 @@ This operator transforms input according to
37403765
y = scale * (x - mean) / sqrt(variance + epsilon) + bias,
37413766
```
37423767
where the mean and variance are computed per instance per group of channels, and
3743-
`scale` and `bias` should be specified for each group of channels. The number of
3768+
`scale` and `bias` should be specified for each channel. The number of
37443769
groups `num_groups` should be divisible by the number of channels so that there are
37453770
an equal number of channels per group.
37463771

@@ -5403,19 +5428,23 @@ Effects: `MemoryEffects::Effect{}`
54035428

54045429
_ONNX Mod operation_
54055430

5406-
Performs element-wise binary modulus (with Numpy-style broadcasting support).
5407-
The sign of the remainder is the same as that of the Divisor.
5431+
Performs an element-wise binary modulo operation.
5432+
The semantics and supported data types depend on the value of the `fmod` attribute which must be `0` (default), or `1`.
54085433

5409-
Mod operator can also behave like C fmod() or numpy.fmod. In this case, the sign of the remainder however, will be the same as the Dividend
5410-
(in contrast to integer mod). To force a behavior like numpy.fmod() an 'fmod' Attribute is provided.
5411-
This attribute is set to 0 by default causing the behavior to be like integer mod.
5412-
Setting this attribute to 1 causes the remainder to be calculated similar to that of numpy.fmod().
5434+
If the `fmod` attribute is set to `0`, `T` is constrained to integer data types and the semantics follow that of the Python `%`-operator.
5435+
The sign of the result is that of the divisor.
54135436

5414-
If the input type is floating point, then `fmod` attribute must be set to 1.
5437+
If `fmod` is set to `1`, the behavior of this operator follows that of the `fmod` function in C and `T` is constrained to floating point data types.
5438+
The result of this operator is the remainder of the division operation `x / y` where `x` and `y` are respective elements of `A` and `B`. The result is exactly the value `x - n * y`, where `n` is `x / y` with its fractional part truncated.
5439+
The returned value has the same sign as `x` (except if `x` is `-0`) and is less or equal to `|y|` in magnitude.
5440+
The following special cases apply when `fmod` is set to `1`:
5441+
- If `x` is `-0` and `y` is greater than zero, either `+0` or `-0` may be returned.
5442+
- If `x` is `±∞` and `y` is not `NaN`, `NaN` is returned.
5443+
- If `y` is `±0` and `x` is not `NaN`, `NaN` should be returned.
5444+
- If `y` is `±∞` and `x` is finite, `x` is returned.
5445+
- If either argument is `NaN`, `NaN` is returned.
54155446

5416-
In case of dividend being zero, the results will be platform dependent.
5417-
5418-
This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [the doc](Broadcasting.md).
5447+
This operator supports **multidirectional (i.e., NumPy-style) broadcasting**; for more details please check [the doc](Broadcasting.md).
54195448

54205449
Traits: `AlwaysSpeculatableImplTrait`, `OpVersionTrait<13>`, `SameOperandsAndResultElementType`
54215450

@@ -6817,20 +6846,16 @@ _ONNX QuantizeLinear operation_
68176846
The linear quantization operator consumes a high-precision tensor, a scale, and a zero point to compute the
68186847
low-precision/quantized tensor. The scale factor and zero point must have the same shape, determining the quantization
68196848
granularity. The quantization formula is `y = saturate((x / y_scale) + y_zero_point)`.
6820-
68216849
Saturation is done according to:
68226850
- uint16: [0, 65535]
68236851
- int16: [-32768, 32767]
68246852
- uint8: [0, 255]
68256853
- int8: [-128, 127]
68266854
- uint4: [0, 15]
68276855
- int4: [-8, 7]
6828-
68296856
For `(x / y_scale)`, it rounds to the nearest even. Refer to https://en.wikipedia.org/wiki/Rounding for details.
6830-
68316857
`y_zero_point` and `y` must have the same type. `y_zero_point` is usually not used for quantization to float8 types, but the quantization
68326858
formula remains the same for consistency, and the type of the attribute `y_zero_point` still determines the quantization type.
6833-
68346859
There are three supported quantization granularities, determined by the shape of `y_scale`.
68356860
In all cases, `y_zero_point` must have the same shape as `y_scale`.
68366861
- Per-tensor (per-layer) quantization: `y_scale` is a scalar.
@@ -7113,7 +7138,7 @@ TensorProto message and be valid as an output type.
71137138

71147139
Traits: `AlwaysSpeculatableImplTrait`, `OpVersionTrait<22>`
71157140

7116-
Interfaces: `ConditionallySpeculatable`, `NoMemoryEffect (MemoryEffectOpInterface)`, `ShapeHelperOpInterface`, `ShapeInferenceOpInterface`
7141+
Interfaces: `ConditionallySpeculatable`, `NoMemoryEffect (MemoryEffectOpInterface)`, `ResultTypeInferenceOpInterface`, `ShapeHelperOpInterface`, `ShapeInferenceOpInterface`
71177142

71187143
Effects: `MemoryEffects::Effect{}`
71197144

@@ -7152,7 +7177,7 @@ TensorProto message.
71527177

71537178
Traits: `AlwaysSpeculatableImplTrait`, `OpVersionTrait<22>`
71547179

7155-
Interfaces: `ConditionallySpeculatable`, `NoMemoryEffect (MemoryEffectOpInterface)`, `ShapeHelperOpInterface`, `ShapeInferenceOpInterface`
7180+
Interfaces: `ConditionallySpeculatable`, `NoMemoryEffect (MemoryEffectOpInterface)`, `ResultTypeInferenceOpInterface`, `ShapeHelperOpInterface`, `ShapeInferenceOpInterface`
71567181

71577182
Effects: `MemoryEffects::Effect{}`
71587183

@@ -9270,7 +9295,7 @@ Construct an empty tensor sequence, with given data type.
92709295

92719296
Traits: `AlwaysSpeculatableImplTrait`, `OpVersionTrait<11>`
92729297

9273-
Interfaces: `ConditionallySpeculatable`, `NoMemoryEffect (MemoryEffectOpInterface)`, `ShapeHelperOpInterface`, `ShapeInferenceOpInterface`
9298+
Interfaces: `ConditionallySpeculatable`, `NoMemoryEffect (MemoryEffectOpInterface)`, `ResultTypeInferenceOpInterface`, `ShapeHelperOpInterface`, `ShapeInferenceOpInterface`
92749299

92759300
Effects: `MemoryEffects::Effect{}`
92769301

@@ -9417,11 +9442,11 @@ If start axis is omitted, the slice starts from axis 0.
94179442
The end axis, if specified, is exclusive (and the returned value will not include the size of that axis).
94189443
If the end axis is omitted, the axes upto the last one will be included.
94199444
Negative axes indicate counting back from the last axis.
9420-
Note that axes will be clamped to the range [0, r-1], where r is the
9445+
Note that axes will be clamped to the range [0, r], where r is the
94219446
rank of the input tensor if they are out-of-range (after adding r in the case of
94229447
negative axis). Thus, specifying any end value > r is equivalent to specifying an end
94239448
value of r, and specifying any start value < -r is equivalent to specifying a start
9424-
value of 0.
9449+
value of 0. If start > end, the result will be an empty shape.
94259450

94269451
Examples:
94279452

0 commit comments

Comments
 (0)