AndrewZhaoLuo commented on code in PR #13065:
URL: https://github.com/apache/tvm/pull/13065#discussion_r996152294


##########
python/tvm/relay/frontend/onnx.py:
##########
@@ -5906,7 +5906,16 @@ def from_onnx(
     graph = model.graph
 
     try:
-        opset_in_model = model.opset_import[0].version if model.opset_import 
else 1
+        opset_in_model = 1
+        if model.opset_import:
+            # TODO: for now we only really support ai.onnx op set
+            # TODO: handle other namespaces well see 
https://github.com/apache/tvm/issues/10950
+            for opset_identifier in model.opset_import:
+                # As per https://github.com/onnx/onnx/blob/main/docs/IR.md
+                # All operator sets except the default one must specify the 
operator version
+                if str(opset_identifier.domain) in ["ai.onnx", ""]:

Review Comment:
   Hmm in the code, it should be fine with the "", I'll investigate this test.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to