Skip to content

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

Open

Description

@Chaitanya140904

Description

The ONNX QLinearConv operator (opset 10) is currently missing from the Relax ONNX frontend (python/tvm/relax/frontend/onnx/onnx_frontend.py), as tracked in RFC issue #20124 under quantization operators.

QLinearConv performs 1D, 2D, or 3D quantized convolution on 8-bit inputs and weights, supporting bias and requantizing to the output quantization parameters:

Y = clip(round((Conv(X - x_zp, W - w_zp) + B * s_x * s_w) / s_y) + y_zp, min_val, max_val)

Key Requirements

  • Support 1D (conv1d), 2D (conv2d), and 3D (conv3d) convolutions.
  • Dequantize inputs and weights with per-channel or scalar scales and zero points.
  • Support optional quantized bias B with scale s_x * s_w and zero point 0.
  • Support auto_pad modes (SAME_UPPER, SAME_LOWER, VALID, NOTSET), strides, dilations, and groups.
  • Numerical correctness verified against ONNX Runtime.

Reference PR

Implementation is available in PR #20953.

Triage

  • needs-triage
  • frontend:onnx

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions