Skip to content

Add LpNormalization-22#27164

Merged
titaiwangms merged 9 commits intomainfrom
titaiwang/support_lpnorm_22
Jan 28, 2026
Merged

Add LpNormalization-22#27164
titaiwangms merged 9 commits intomainfrom
titaiwang/support_lpnorm_22

Conversation

@titaiwangms
Copy link
Copy Markdown
Contributor

@titaiwangms titaiwangms commented Jan 26, 2026

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] [2]
  • 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] [2]

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] [2] [3]

@titaiwangms titaiwangms requested a review from xadupre January 26, 2026 21:26
@titaiwangms titaiwangms changed the title Add LpNormalization-22 Add LpNormalization-22 and update the implementation to respect ONNX spec Jan 27, 2026
Comment thread onnxruntime/test/providers/cpu/nn/lp_norm_op_test.cc Outdated
justinchuby
justinchuby previously approved these changes Jan 27, 2026
@titaiwangms titaiwangms enabled auto-merge (squash) January 28, 2026 00:37
@titaiwangms titaiwangms merged commit 30ad350 into main Jan 28, 2026
89 of 90 checks passed
@titaiwangms titaiwangms deleted the titaiwang/support_lpnorm_22 branch January 28, 2026 04:53
@titaiwangms titaiwangms changed the title Add LpNormalization-22 and update the implementation to respect ONNX spec Add LpNormalization-22 Jan 28, 2026
@titaiwangms titaiwangms linked an issue Feb 2, 2026 that may be closed by this pull request
milpuz01 pushed a commit to milpuz01/onnxruntime that referenced this pull request Feb 4, 2026
…spec (microsoft#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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LpNormalization-22 is not registered

2 participants