Skip to content

[Relax][Frontend][ONNX] Add QLinearConv operator converter - #20953

Open
Chaitanya140904 wants to merge 1 commit into
apache:mainfrom
Chaitanya140904:relax-onnx-qlinearconv
Open

Chaitanya140904 wants to merge 1 commit into
apache:mainfrom
Chaitanya140904:relax-onnx-qlinearconv

Conversation

@Chaitanya140904

@Chaitanya140904 Chaitanya140904 commented Nov 9, 2026 •

Copy link
Copy Markdown

This PR adds support for the ONNX QLinearConv operator in the Relax ONNX frontend, resolving #20959.

Key Changes

  • In python/tvm/relax/frontend/onnx/onnx_frontend.py:
    • Implemented QLinearConv op converter supporting opset 10.
    • Supports 1D, 2D, and 3D convolutions with dequantization of input activations and weights.
    • Supports per-channel and per-tensor scales and zero-points with channel broadcasting ([1, C, 1, 1] and [O, 1, 1, 1]).
    • Supports auto_pad modes (SAME_UPPER, SAME_LOWER, VALID, NOTSET), strides, dilations, and groups.
    • Handles quantized bias scaling (B * x_scale * w_scale).
    • Requantizes and clamps results to the output integer type range.
    • Registered "QLinearConv": QLinearConv in _get_convert_map().
  • In tests/python/relax/test_frontend_onnx.py:
    • Added test_qlinearconv covering 2D convolutions with and without bias, and multi-channel convolutions with custom padding, validated against ONNX Runtime.

Closes #20959.

@Chaitanya140904

Copy link
Copy Markdown
Author

Hi @mshr-h, @yzhliu, @tqchen, @akaashrp

Could you please take a look at this PR when you get a chance?

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature][Relax][ONNX] Support QLinearConv in Relax ONNX frontend

1 participant