You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "Mathevilg (via GitHub)" <gi...@apache.org> on 2025/03/20 07:16:05 UTC

[I] [Bug] Onnx relax frontend - Loop and NonMaximalSupression operators missing [tvm]

Mathevilg opened a new issue, #17767:
URL: https://github.com/apache/tvm/issues/17767

   When converting ONNX models that contain dynamic control flow (e.g., the Loop operator) or post-processing operations such as NonMaxSuppression using TVM's Relax ONNX frontend, the conversion fails with the following error:
   
   tvm.error.OpNotImplemented: The following operators are not supported for frontend ONNX: Loop, NonMaxSuppression
   
   This issue prevents conversion of models such as YOLOv3/YOLOv5 that include these operators. It appears that the Relax ONNX frontend does not currently implement these operators.
   
   Steps to Reproduce:
       Export a YOLO model (or any model containing Loop and/or NonMaxSuppression) to ONNX.
       Load the ONNX model using TVM's Relax ONNX frontend:
   
   
   
   
   ````
   import onnx
   import tvm.relax as relax
   
   onnx_model = onnx.load("path/to/model.onnx")
   shape_dict = {"input": (1, 3, 640, 640)}
   mod, params = relax.frontend.from_onnx(onnx_model, shape_dict)
   ````
   
   Expected Behavior: Either these operators should be supported by the ONNX Relax frontend, or the frontend should provide a clear message or workaround (such as lowering them to supported operators) so that users can convert their models.
   
   Environment:
   
       TVM Version: 19
       Model: YOLO model onnx - https://github.com/onnx/models/tree/main/validated/vision/object_detection_segmentation/yolov3
   
   Additional Info: The issue appears when converting models that rely on dynamic control flow or include post-processing operators like Loop and NonMaxSuppression.
   
   Additional Context: This issue was encountered while attempting to convert a YOLO model to TVM Relax IR. Any guidance or **workarounds** on handling these operators would be greatly appreciated.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [ONNX][FRONTEND] - Loop and NonMaximalSupression operators missing [tvm]

Posted by "Johnson9009 (via GitHub)" <gi...@apache.org>.
Johnson9009 commented on issue #17767:
URL: https://github.com/apache/tvm/issues/17767#issuecomment-2823443467

   We meet the missing op too, and we are working on to support them, have any others also is working on them? Maybe we can share the work before we can send a formal PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org