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

オープン
#20,965 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
56/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
13.9k
フォーク
4.1k
平均マージ
4日 22時間
マージ済み PR(30日)
22

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/tvm のほかの issue

apache/tvm の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。