Skip to content

[ONNX] Register ONNXReduceL2Metatype - #4286

Open
Daksha1611 wants to merge 1 commit into
openvinotoolkit:developfrom
Daksha1611:fix/onnx-reducel2-metatype
Open

Daksha1611 wants to merge 1 commit into
openvinotoolkit:developfrom
Daksha1611:fix/onnx-reducel2-metatype

Conversation

@Daksha1611

Copy link
Copy Markdown

Changes

  • Add the missing @ONNX_OPERATION_METATYPES.register() decorator to ONNXReduceL2Metatype.
  • Add test_all_onnx_metatypes_are_registered, which fails if any concrete metatype class defined in onnx_metatypes.py is not in the registry.
  • Add test_reduce_l2_metatype_mapping.

Reason for changes

ReduceL2 resolved to UnknownMetatype, so it was never quantized on the ONNX backend, unlike the OpenVINO and Torch backends and the HW configs. The ONNXReduceL2Metatype entry in the transformer ignored metatypes (#1953) was also never applied.

Related tickets

Closes #4285

Tests

  • New unit tests in tests/onnx/test_metatypes.py.
  • ruff check and ruff format --check pass on the changed files.
  • tests/onnx/test_metatypes.py run locally.

ONNXReduceL2Metatype was missing the ONNX_OPERATION_METATYPES.register() decorator, so ReduceL2 nodes resolved to UnknownMetatype and were never quantized on the ONNX backend. The ReduceL2 entry in the transformer ignored metatypes was never applied either.

Add a test that every metatype defined in onnx_metatypes.py is registered.
@Daksha1611
Daksha1611 requested a review from a team as a code owner October 26, 2026 08:02
@github-actions github-actions Bot added the NNCF ONNX Pull requests that updates NNCF ONNX label Oct 26, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NNCF ONNX Pull requests that updates NNCF ONNX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ONNX] ReduceL2 is never quantized: ONNXReduceL2Metatype is not registered

1 participant