[x86][relay] auto-tune mobilefacenet error using relay


#21

It is ok now using apply_history_best after remove “cpu”, but “tile_k” error is still using apply_graph_best


#22

2019-05-30 20:49:23,773 INFO Writing optimal schedules to mxnet_graph_opt.log successfully.
Compile…
Traceback (most recent call last):
File “tune_relay_x86.py”, line 217, in
tune_and_evaluate(tuning_option)
File “tune_relay_x86.py”, line 198, in tune_and_evaluate
net, target=target, params=params)
File “/home/tx/DL/tvm/python/tvm/relay/build_module.py”, line 284, in build
params)
File “/home/tx/DL/tvm/python/tvm/relay/build_module.py”, line 112, in build
self._build(func, target, target_host)
File “/home/tx/DL/tvm/python/tvm/_ffi/_ctypes/function.py”, line 209, in call
raise get_last_ffi_error()
tvm._ffi.base.TVMError: Traceback (most recent call last):
[bt] (8) /home/tx/DL/tvm/build/libtvm.so(+0xb3ac6e) [0x7f34e1aa0c6e]
[bt] (7) /home/tx/DL/tvm/build/libtvm.so(+0xb377ea) [0x7f34e1a9d7ea]
[bt] (6) /home/tx/DL/tvm/build/libtvm.so(+0xb30b34) [0x7f34e1a96b34]
[bt] (5) /home/tx/DL/tvm/build/libtvm.so(+0xb38035) [0x7f34e1a9e035]
[bt] (4) /home/tx/DL/tvm/build/libtvm.so(+0xb3ac6e) [0x7f34e1aa0c6e]
[bt] (3) /home/tx/DL/tvm/build/libtvm.so(+0xb377ea) [0x7f34e1a9d7ea]
[bt] (2) /home/tx/DL/tvm/build/libtvm.so(+0xb30b34) [0x7f34e1a96b34]
[bt] (1) /home/tx/DL/tvm/build/libtvm.so(+0xb3850d) [0x7f34e1a9e50d]
[bt] (0) /home/tx/DL/tvm/build/libtvm.so(+0xfbf67b) [0x7f34e1f2567b]
File “/home/tx/DL/tvm/python/tvm/_ffi/_ctypes/function.py”, line 71, in cfun
rv = local_pyfunc(*pyargs)
File “/home/tx/DL/tvm/python/tvm/relay/op/nn/_nn.py”, line 59, in compute_dense
return [topi.nn.dense(inputs[0], inputs[1], out_dtype=out_dtype)]
File “</home/tx/anaconda3/lib/python3.7/site-packages/decorator.py:decorator-gen-36>”, line 2, in dense
File “/home/tx/DL/tvm/python/tvm/target.py”, line 289, in dispatch_func
return generic_func_node(*args)
File “/home/tx/DL/tvm/python/tvm/target.py”, line 151, in call
return _api_internal._GenericFuncCallFunc(self, args)
File “/home/tx/DL/tvm/python/tvm/_ffi/_ctypes/function.py”, line 209, in call
raise get_last_ffi_error()
[bt] (3) /home/tx/DL/tvm/build/libtvm.so(TVMFuncCall+0x65) [0x7f34e1f2a655]
[bt] (2) /home/tx/DL/tvm/build/libtvm.so(+0x8c0fc7) [0x7f34e1826fc7]
[bt] (1) /home/tx/DL/tvm/build/libtvm.so(tvm::GenericFunc::CallPacked(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue
) const+0x163) [0x7f34e1826e13]
[bt] (0) /home/tx/DL/tvm/build/libtvm.so(+0xfbf67b) [0x7f34e1f2567b]
File “/home/tx/DL/tvm/python/tvm/_ffi/_ctypes/function.py”, line 71, in cfun
rv = local_pyfunc(*pyargs)
File “</home/tx/anaconda3/lib/python3.7/site-packages/decorator.py:decorator-gen-101>”, line 2, in config_dispatcher
File “/home/tx/DL/tvm/python/tvm/autotvm/task/dispatcher.py”, line 220, in dispatch_func
return dispatch_dict[cfg.template_key](cfg, *args, **kwargs)
File “/home/tx/DL/tvm/python/tvm/autotvm/task/topi_integration.py”, line 344, in template_call
node = f(cfg, *args, **kwargs)
File “/home/tx/DL/tvm/topi/python/topi/x86/dense.py”, line 36, in _declaration_dense
return _declaration_dense_nopack(cfg, data, weight, bias, out_dtype)
File “/home/tx/DL/tvm/topi/python/topi/x86/dense.py”, line 86, in _declaration_dense_nopack
vec = cfg[“tile_k”].size[-1]
File “/home/tx/DL/tvm/python/tvm/autotvm/task/space.py”, line 773, in getitem
return self._entity_map[name]
KeyError: ‘tile_k’


#23

https://github.com/dmlc/tvm/pull/3264 This patch should fix it.


#24

thank you so much! This PR fix it.