[Feature][Relax][ONNX] Support ConvInteger operator in Relax ONNX frontend

Ouverte
#20,965 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 3 jours

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
56/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Active
Stack technique
python

Piste de recherche

Start in python/tvm/relax/frontend/onnx/onnx_frontend.py and read the existing MatMulInteger handling, then check the Relax convolution operators and ONNX frontend tests for how convolution attributes and optional inputs are represented. Add import support for ConvInteger with zero point adjustment, int32 accumulation, and the specified 1D, 2D, and 3D cases. Done means ONNX models containing these nodes import with the expected int32 output.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Feature Description

Support the ONNX ConvInteger operator in the Apache TVM Relax ONNX frontend (python/tvm/relax/frontend/onnx/onnx_frontend.py).

Motivation

While MatMulInteger is currently supported in the Relax ONNX frontend (computing (A - a_zero_point) * (B - b_zero_point) with int32 accumulation), its convolution counterpart ConvInteger (opset 10+) is currently missing.

ConvInteger is a foundational operator for integer-only quantized neural networks (e.g. integer CNNs, INT8 quantization pipelines). Importing ONNX models containing ConvInteger fails with:

NotImplementedError: The following operators are not supported: ['ConvInteger']

This operator was also highlighted in the ONNX coverage RFC tracking issue #20124 under Convolution operators.

Operator Specification (ONNX Opset 10+)
  • Inputs:
    1. x: N-D input tensor (uint8 or int8), shape (N, C, D1, D2, ...)
    2. w: N-D weight tensor (uint8 or int8), shape (M, C/group, k1, k2, ...)
    3. x_zero_point (optional): zero point for x (uint8 or int8, scalar or 1D tensor of shape (1,) or (C,))
    4. w_zero_point (optional): zero point for w (uint8 or int8, scalar or 1D tensor of shape (M,) for per-channel quantization)
  • Attributes:
    • auto_pad: string (NOTSET, SAME_UPPER, SAME_LOWER, VALID)
    • dilations: list of ints
    • group: int (default 1)
    • kernel_shape: list of ints
    • pads: list of ints
    • strides: list of ints
  • Outputs:
    1. y: N-D output tensor of type int32
Expected Behavior

The Relax ONNX frontend should import ConvInteger nodes by subtracting zero points from input and weight (broadcasting appropriately), upcasting to int32, performing convolution via relax.op.nn.conv1d / conv2d / conv3d, and returning int32 activations.

Langage dominant
Python
Étoiles
13.9k
Forks
4.1k
Merge moyen
4 j 22 h
PR mergées (30 j)
22

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de apache/tvm

Toutes les issues de apache/tvm

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.