You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/04/19 18:14:46 UTC
[GitHub] [tvm] shingjan opened a new issue, #11064: [Bug] TE hybrid parser doesn't work with latest Python version (3.9+)
shingjan opened a new issue, #11064:
URL: https://github.com/apache/tvm/issues/11064
This issue below happens during importing onnx model in tvm with relay, `from_onnx` more specifically. The stack trace is as follows:
### Actual behavior
```
"/home/yj/tvm/python/tvm/te/hybrid/parser.py", line 466, in <listcomp>
args = [self.visit(i) for i in node.args]
File "/home/yj/anaconda3/lib/python3.9/ast.py", line 407, in visit
return visitor(node)
File "/home/yj/tvm/python/tvm/te/hybrid/parser.py", line 379, in visit_Subscript
for i in args:
TypeError: 'IntImm' object is not iterable
```
### Expected behavior
This model should be imported without an error under Python 3.9
### Environment
TVM commit a94558686834c4ff7e4d90e4bc1fde5451ce445d
Python 3.9
### Steps to reproduce
```
import sys
from os import path as osp
import onnx
import numpy as np
import tvm
from tvm import relay
from tvm.meta_schedule.tune import tune_relay
from tvm.target.target import Target
if __name__ == "__main__":
target = Target("llvm --num-cores=8")
dev = tvm.cpu() if str(target.kind) == "llvm" else tvm.cuda()
onnx_model = onnx.load(f"/home/yj/models/ssd.onnx")
shape_dict = {}
datas = {}
input_shape = [1, 3, 1200, 1200]
input_dtype = "float32"
input_name = "image"
shape_dict[input_name] = input_shape
datas[input_name] = tvm.nd.array(np.random.randn(*input_shape).astype(input_dtype), dev)
mod, params = relay.frontend.from_onnx(onnx_model, shape_dict, freeze_params=True)
```
The model is `ssd.onnx` downloaded from OctoML's aquarium.
cc: @areusch
--
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
[GitHub] [tvm] areusch closed issue #11064: [Bug] TE hybrid parser doesn't work with latest Python version (3.9+)
Posted by GitBox <gi...@apache.org>.
areusch closed issue #11064: [Bug] TE hybrid parser doesn't work with latest Python version (3.9+)
URL: https://github.com/apache/tvm/issues/11064
--
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
[GitHub] [tvm] tkonolige commented on issue #11064: [Bug] TE hybrid parser doesn't work with latest Python version (3.9+)
Posted by GitBox <gi...@apache.org>.
tkonolige commented on issue #11064:
URL: https://github.com/apache/tvm/issues/11064#issuecomment-1103162650
#8577 is tracking this problem.
--
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
[GitHub] [tvm] areusch commented on issue #11064: [Bug] TE hybrid parser doesn't work with latest Python version (3.9+)
Posted by GitBox <gi...@apache.org>.
areusch commented on issue #11064:
URL: https://github.com/apache/tvm/issues/11064#issuecomment-1104554638
closing in favor of #8577
--
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