[Feature][Relax][ONNX] Support CenterCropPad operator in Relax ONNX frontend
Maintainer antworten meist innerhalb von 3 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 55/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- python
- Bereich
- backend-api-design
Rechercherichtung
Start with python/tvm/relax/frontend/onnx/onnx_frontend.py and read how the Relax ONNX frontend translates operators using slicing and padding. Check the ONNX CenterCropPad specification for opset 18+, especially axes defaults and symmetric crop or pad behavior. Done means the frontend handles the operator and produces the requested output shape for both cropping and padding.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Feature Description
Support the ONNX CenterCropPad operator in the Apache TVM Relax ONNX frontend (python/tvm/relax/frontend/onnx/onnx_frontend.py).
Motivation
CenterCropPad crops and/or pads input tensors centered along specified axes to reach a desired spatial shape. It is a standard building block in computer vision data pipelines and end-to-end vision inference models where image preprocessing is embedded directly into the ONNX graph.
Standardized in ONNX opset 18+, CenterCropPad is currently not supported in the Relax ONNX frontend, resulting in:
NotImplementedError: The following operators are not supported: ['CenterCropPad']
This operator was also highlighted in the ONNX operator coverage RFC tracking issue #20124 under Cropping / Sequence operators.
Operator Specification (ONNX Opset 18+)
- Inputs:
input_data: N-D input tensor (float32,float16,uint8, etc.).shape: 1D integer tensor specifying the target shape along the specified axes.
- Attributes:
axes: list of ints (optional) - the axes along which to crop/pad (defaults to[-2, -1]for spatial dims).
- Outputs:
output_data: Cropped and/or padded tensor matching the target shape.
Expected Behavior
The Relax ONNX frontend should implement CenterCropPad by comparing input dimensions with target dimensions:
- For dimensions where target < input: compute symmetric start/end indices and apply
relax.op.strided_slice. - For dimensions where target > input: compute symmetric left/right pad widths and apply
relax.op.pad.
- Vorherrschende Sprache
- Python
- Sterne
- 13.9k
- Forks
- 4.1k
- Ø Merge
- 4 T. 22 Std.
- Gemergte PRs (30 T.)
- 22
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus apache/tvm
-
[Bug] [Relax] `relax.op.unique(return_inverse=True)` returns an input-shaped inverse for N-D input when `axis` is NoneEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 3 Tagen
-
[Bug][TOPI] `topi.scanop` (`cumsum` / `cumprod`) performs out-of-bounds write/read on empty tensorsOffenneeds-triage type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 3 Tagen
-
[Bug] [Relax] take_backward does not normalize negative axis causing heap OOB write and wrong gradientsEvtl. vergeben @pierceluu10 hat das vor 5 Tagen übernommen. Offenneeds-triage type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 3 Tagen
-
[Bug][Relax][ONNX] NonZero returns the wrong output shape for scalar inputsEvtl. vergeben @tandede hat das vor 9 Tagen übernommen. Offenneeds-triage type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
Maintainer antworten meist innerhalb von 3 Tagen
-
needs-triage type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
apache/tvm#21043 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 3 Tagen
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
Techiebutler/freeframe#687 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug verbose GC
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
IBM/javacore-analyser#677 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
Maintainer antworten meist innerhalb von 2 Tagen
-
area/config comp/plugins P1 platform/qqbot tool/file type/bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
NousResearch/hermes-agent#163932 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
plugins/dsh: todayStr() computes UTC but is documented as local — journal entries written 00:00–08:00 local land in the previous day's fileEvtl. vergeben @Beehtrix hat das heute übernommen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
zilliztech/memsearch#907 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag