[Feature][Relax][ONNX] Support CenterCropPad operator in Relax ONNX frontend
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- backend-api-design
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 13.9k
- Forks
- 4.1k
- Merge medio
- 4 d 22 h
- PR fusionados (30 d)
- 22
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/tvm
-
[Bug] [Relax] `relax.op.unique(return_inverse=True)` returns an input-shaped inverse for N-D input when `axis` is NonePosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 3 días
-
[Bug][TOPI] `topi.scanop` (`cumsum` / `cumprod`) performs out-of-bounds write/read on empty tensorsAbiertoneeds-triage type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 3 días
-
[Bug] [Relax] take_backward does not normalize negative axis causing heap OOB write and wrong gradientsPosiblemente ocupada @pierceluu10 la tomó hace 4 días. Abiertoneeds-triage type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 3 días
-
[Bug][Relax][ONNX] NonZero returns the wrong output shape for scalar inputsPosiblemente ocupada @tandede la tomó hace 9 días. Abiertoneeds-triage type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 3 días
-
needs-triage type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
apache/tvm#21043 · 1 comentario ·
Los mantenedores suelen responder en 3 días
Todos los issues de apache/tvm
Issues similares
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
web-push-libs/pywebpush#216 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
AgriciDaniel/claude-seo#572 ·
Los mantenedores suelen responder en 5 días
-
area:print-dispatch
Dificultad 2/5 1-3 horas Aptitud para principiantes 92/100
Los mantenedores suelen responder en 1 día
-
area: docs domain: technical-writing good first issue type: documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Deepak3699/Ai_Mentor#919 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día