Commit 30ad350
authored
Add LpNormalization-22 and update the implementation to respect ONNX spec (#27164)
I missed the operator since it didn't have the corresponding tests at
the time.
With onnx/onnx#7618, the disabled test should be
able to pass.
---
This pull request updates the ONNX Runtime CPU execution provider to add
support for the `LpNormalization` operator for opset version 22, in
addition to clarifying and correcting the registration for earlier
versions. It also updates the backend test filters to reflect this new
support.
**ONNX Operator Kernel Registration:**
* Added new kernel registrations for `LpNormalization` with opset
version 22 for both `float` and `double` data types in
`cpu_execution_provider.cc`.
[[1]](diffhunk://#diff-054ffdd679ada14ebb4b1db27a60b2881e2db48f9dc3f0b948c784cdcdaf4908R1328-R1329)
[[2]](diffhunk://#diff-054ffdd679ada14ebb4b1db27a60b2881e2db48f9dc3f0b948c784cdcdaf4908R3389-R3392)
* Updated the registration for `LpNormalization` for opset versions 1
through 21 to use the correct versioned kernel macro, ensuring correct
kernel selection and compatibility.
[[1]](diffhunk://#diff-054ffdd679ada14ebb4b1db27a60b2881e2db48f9dc3f0b948c784cdcdaf4908L197-R198)
[[2]](diffhunk://#diff-054ffdd679ada14ebb4b1db27a60b2881e2db48f9dc3f0b948c784cdcdaf4908L1731-R1735)
**Test Filters Update:**
* Updated `onnx_backend_test_series_filters.jsonc` to remove the
exclusion of `test_l1normalization*`, `test_lpnormalization*`, and
`test_l2normalization*` now that `LpNormalization` opset 22 is
implemented, and added a TODO comment referencing ONNX 1.21 for a known
zero-norm issue.
[[1]](diffhunk://#diff-abc0f78c2314f9e7648c8081125d0ce9f33b12399520d92d811d73e3c795ed59R32-R33)
[[2]](diffhunk://#diff-abc0f78c2314f9e7648c8081125d0ce9f33b12399520d92d811d73e3c795ed59L42)
[[3]](diffhunk://#diff-abc0f78c2314f9e7648c8081125d0ce9f33b12399520d92d811d73e3c795ed59L70-L71)1 parent f83d4d0 commit 30ad350
File tree
4 files changed
+26
-12
lines changed- docs
- onnxruntime
- core/providers/cpu
- nn
- test/testdata
4 files changed
+26
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
243 | | - | |
| 243 | + | |
| 244 | + | |
244 | 245 | | |
245 | 246 | | |
246 | 247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
198 | | - | |
| 197 | + | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| |||
1325 | 1325 | | |
1326 | 1326 | | |
1327 | 1327 | | |
| 1328 | + | |
| 1329 | + | |
1328 | 1330 | | |
1329 | 1331 | | |
1330 | 1332 | | |
| |||
1728 | 1730 | | |
1729 | 1731 | | |
1730 | 1732 | | |
1731 | | - | |
1732 | | - | |
1733 | | - | |
1734 | | - | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
1735 | 1737 | | |
1736 | 1738 | | |
1737 | 1739 | | |
| |||
3384 | 3386 | | |
3385 | 3387 | | |
3386 | 3388 | | |
| 3389 | + | |
| 3390 | + | |
| 3391 | + | |
| 3392 | + | |
3387 | 3393 | | |
3388 | 3394 | | |
3389 | 3395 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
12 | 18 | | |
13 | 19 | | |
14 | 20 | | |
15 | 21 | | |
16 | | - | |
17 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
18 | 26 | | |
19 | 27 | | |
20 | 28 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
42 | | - | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | | - | |
71 | | - | |
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
| |||
0 commit comments