leeexyz opened a new pull request #8481:
URL: https://github.com/apache/tvm/pull/8481
Hi, community,
When I use TVMC to compile a model trained on GPU, the name of input have a
slash, such as `"gpu_0/data_0": Var(gpu_0/data_0, ty=TensorType([1, 3, 224,
224], float32))`, TVMC complains that cannot find such inputs in the graph,
shows as below.
```bash
Traceback (most recent call last):
File "/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "~/tvm/python/tvm/driver/tvmc/__main__.py", line 24, in <module>
tvmc.main.main()
File "~/tvm/python/tvm/driver/tvmc/main.py", line 94, in main
sys.exit(_main(sys.argv[1:]))
File "~/tvm/python/tvm/driver/tvmc/main.py", line 87, in _main
return args.func(args)
File "~/tvm/python/tvm/driver/tvmc/compiler.py", line 140, in drive_compile
tvmc_model = frontends.load_model(args.FILE, args.model_format,
args.input_shapes)
File "~/tvm/python/tvm/driver/tvmc/frontends.py", line 376, in load_model
mod, params = frontend.load(path, shape_dict, **kwargs)
File "~/tvm/python/tvm/driver/tvmc/frontends.py", line 171, in load
return relay.frontend.from_onnx(model, shape=shape_dict, **kwargs)
File "~/tvm/python/tvm/relay/frontend/onnx.py", line 3605, in from_onnx
mod, params = g.from_onnx(graph, opset)
File "~/tvm/python/tvm/relay/frontend/onnx.py", line 3355, in from_onnx
self._shape
AssertionError: User specified the shape for inputs that weren't found in
the graph: {'data_0': [1, 3, 224, 224]}
```
This PR updates the RE to match such input name. :)
--
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]