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 2019/11/25 08:55:29 UTC
[GitHub] [incubator-tvm] talematros opened a new issue #4420: compiling with
autotune log fails, KeyErrors
talematros opened a new issue #4420: compiling with autotune log fails, KeyErrors
URL: https://github.com/apache/incubator-tvm/issues/4420
Im trying to tune and compile mobilenetv2 - mnet.025 model from retinaface repository. Im following tutorials and code examples from documentation, but it doesn't work out.
I have following two target for tests:
`target = tvm.target.create('llvm -mattr=avx')`
or
`target = tvm.target.create('llvm -device=arm_cpu -target=arm-linux-gnueabihf -mattr=+neon,+thumb2')`
I pretty much cannot use winograd and spatial_pack, because I get errors like KeyError: 'tile_co' or KeyError: 'winograd'. Below is error trace for compiling model with autotuned log with winograd and spatial_pack for 'llvm -mattr=avx' target:
```
Compile the Graph ...
Traceback (most recent call last):
File "from_mxnet2.py", line 44, in <module>
graph, lib, params = relay.build_module.build(func, target=target, params=params)
File "/home/talematros/incubator-tvm/python/tvm/relay/build_module.py", line 244, in build
graph_json, mod, params = bld_mod.build(func, target, target_host, params)
File "/home/talematros/incubator-tvm/python/tvm/relay/build_module.py", line 109, in build
self._build(func, target, target_host)
File "/home/talematros/incubator-tvm/python/tvm/_ffi/_ctypes/function.py", line 207, in __call__
raise get_last_ffi_error()
tvm._ffi.base.TVMError: Traceback (most recent call last):
[bt] (8) /place/home/talematros/incubator-tvm/build/libtvm.so(tvm::relay::ScheduleGetter::VisitExpr(tvm::relay::Expr const&)+0x7e) [0x7f72192aeabe]
[bt] (7) /place/home/talematros/incubator-tvm/build/libtvm.so(tvm::relay::ExprFunctor<tvm::Array<tvm::Tensor, void> (tvm::relay::Expr const&)>::VisitExpr(tvm::relay::Expr const&)+0x92) [0x7f72192acf62]
[bt] (6) /place/home/talematros/incubator-tvm/build/libtvm.so(tvm::relay::ExprFunctor<tvm::Array<tvm::Tensor, void> (tvm::relay::Expr const&)>::InitVTable()::{lambda(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::Array<tvm::Tensor, void> (tvm::relay::Expr const&)>*)#6}::_FUN(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::Array<tvm::Tensor, void> (tvm::relay::Expr const&)>*)+0x27) [0x7f721929f7b7]
[bt] (5) /place/home/talematros/incubator-tvm/build/libtvm.so(tvm::relay::ScheduleGetter::VisitExpr_(tvm::relay::CallNode const*)+0x169) [0x7f72192ab609]
[bt] (4) /place/home/talematros/incubator-tvm/build/libtvm.so(tvm::relay::ScheduleGetter::VisitExpr(tvm::relay::Expr const&)+0x7e) [0x7f72192aeabe]
[bt] (3) /place/home/talematros/incubator-tvm/build/libtvm.so(tvm::relay::ExprFunctor<tvm::Array<tvm::Tensor, void> (tvm::relay::Expr const&)>::VisitExpr(tvm::relay::Expr const&)+0x92) [0x7f72192acf62]
[bt] (2) /place/home/talematros/incubator-tvm/build/libtvm.so(tvm::relay::ExprFunctor<tvm::Array<tvm::Tensor, void> (tvm::relay::Expr const&)>::InitVTable()::{lambda(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::Array<tvm::Tensor, void> (tvm::relay::Expr const&)>*)#6}::_FUN(tvm::runtime::ObjectRef const&, tvm::relay::ExprFunctor<tvm::Array<tvm::Tensor, void> (tvm::relay::Expr const&)>*)+0x27) [0x7f721929f7b7]
[bt] (1) /place/home/talematros/incubator-tvm/build/libtvm.so(tvm::relay::ScheduleGetter::VisitExpr_(tvm::relay::CallNode const*)+0x680) [0x7f72192abb20]
[bt] (0) /place/home/talematros/incubator-tvm/build/libtvm.so(+0x11265cb) [0x7f72194155cb]
File "/home/talematros/incubator-tvm/python/tvm/_ffi/_ctypes/function.py", line 72, in cfun
rv = local_pyfunc(*pyargs)
File "/home/talematros/incubator-tvm/python/tvm/relay/op/nn/_nn.py", line 576, in compute_contrib_conv2d_NCHWc
data_layout, out_layout, out_dtype)
File "</home/talematros/.local/lib/python3.6/site-packages/decorator-4.4.1-py3.6.egg/decorator.py:decorator-gen-37>", line 2, in conv2d_NCHWc
File "/home/talematros/incubator-tvm/python/tvm/target.py", line 382, in dispatch_func
return dispatch_dict[k](*args, **kwargs)
File "</home/talematros/.local/lib/python3.6/site-packages/decorator-4.4.1-py3.6.egg/decorator.py:decorator-gen-124>", line 2, in config_dispatcher
File "/home/talematros/incubator-tvm/python/tvm/autotvm/task/dispatcher.py", line 221, in dispatch_func
return dispatch_dict[cfg.template_key](cfg, *args, **kwargs)
KeyError: 'winograd'
```
I also posted two issues tvm discuss:
https://discuss.tvm.ai/t/key-error-tile-co-tile-k-mobilenet-compiling-with-tuned-kernels/4903
https://discuss.tvm.ai/t/arm-network-tuning/4868
I tried master tvm and v0.6 branch, same problems.
It seems problem arise because -device flag and winograd,spatial_pack are not "synced"
Please, any help 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services