jwfromm commented on code in PR #13065: URL: https://github.com/apache/tvm/pull/13065#discussion_r996007222
########## 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.name) in ["ai.onnx", ""]: Review Comment: I'm not sure if its inconsistent but the models I'm looking at use `opset_identifer.domain` rather than `name`. Also, it seems like if there is only one import there is no domain name, just the version and its assumed the domain is ai.onnx. This is at least the case for `resnet50-v1-7` which is used in the tests. -- 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-unsubscr...@tvm.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org