-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[Tracking Issue][ONNX] Complete missing and limited operators in ONNX frontend #18945
Copy link
Copy link
Labels
Description
The Relax ONNX frontend (python/tvm/relax/frontend/onnx/onnx_frontend.py) currently supports 157 operators. However, 7 operators are commented out in the converter map, and 11 have known limitations. This issue tracks completing support for these operators.
Scope
Each missing operator needs:
- Converter implementation in
onnx_frontend.py - Tests in
tests/python/relax/test_frontend_from_onnx.py
Each limited operator needs the specific restriction lifted and corresponding test coverage added.
Missing operators (commented out in converter map)
Tier 1 — High value
-
If— ONNX control flow (conditional branching). Needed for models with runtime-dependent execution paths. -
MatMulInteger— INT8 matrix multiplication. Required for quantized model inference (e.g. ONNX QDQ models).
Tier 2 — Lower priority
-
MaxRoiPool— Max ROI pooling. -
MatMulInteger16— INT16 matrix multiplication. Rarely used. -
Optional/OptionalHasElement/OptionalGetElement— ONNX Optional type handling. Used in some models with optional outputs.
Operators with known limitations
Shape/dynamic restrictions
-
Unsqueeze— Does not support symbolic axes or dynamic axes. Only constant axes work. -
Squeeze— Does not support symbolic axes. -
Slice— Only supports constant parameters. Dynamic/symbolic start, end, step not supported. -
Reshape— Special case for shape[-1]not fully handled.
Op-specific restrictions
-
ConvTranspose— Does not support 3D (ConvTranspose3d, ndim=5). -
Resize— Does not support dynamic ROI. -
ArgMax/ArgMin— Does not supportselect_last_indexattribute. -
SequenceInsert— Does not support inserting with new axis. -
SplitToSequence— Only supportskeepdims=1.
Implementation reference
- Converter base class:
OnnxOpConverterinonnx_frontend.py - Converter map:
_get_convert_map()(line 3937) - Existing tests:
tests/python/relax/test_frontend_from_onnx.py
The shape/dynamic restriction fixes (Unsqueeze, Squeeze, Slice) are good first issues — the converter class already exists, just needs to handle additional cases.
If you're interested in contributing, please comment below to claim a task before starting work.
Reactions are currently unavailable