AttributeError: Module has no function 'get_num_outputs' ,when deploy cross compile model



  • pytorch1.0.1
  • cuda9.0
  • tvm6.0
  • cross compile linaro7.4.1-x86_64-aarch64-linux-gnu
  • board:TX2

remote device**(TX2)**
jsi@jsi-desktop:~$python -m tvm.exec.rpc_server --host --port 9090
INFO:RPCServer:bind to
INFO:RPCServer:connection from (‘’,50308)
INFO:RPCServer:load_module /tmp/tmppjatvnp7/net.jar
INFO:RPCServer:Finish servering (‘’,50308)
local machine
When I run python on host, it occurs :
File /home1/marong/.tvm_test_data/data/cat.png exists, skip.
File /home1/marong/.tvm_test_data/data/imagenet1000_clsid_to_human.txt exists, skip.
Cannot find config for target=llvm -target=aarch64-linux-gnu, workload=(‘dense’, (1, 512, ‘float32’), (1000, 512, ‘float32’), 0, ‘float32’). A fallback configuration is used, which may bring great performance regression.
Traceback (most recent call last):
File “”, line 214, in
module = runtime.create(graph, rlib, ctx)
File “/home1/marong/tvm/python/tvm/contrib/”, line 56, in create
return GraphModule(fcreate(graph_json_str, hmod, *device_type_id))
File “/home1/marong/tvm/python/tvm/contrib/”, line 130, in init
self._get_num_outputs = module[“get_num_outputs”]
File “/home1/marong/tvm/python/tvm/_ffi/”, line 147, in getitem
return self.get_function(name)
File “/home1/marong/tvm/python/tvm/_ffi/”, line 131, in get_function
“Module has no function ‘%s’” % name)
AttributeError: Module has no function ‘get_num_outputs’

The only change in is setting my target with “llvm -target=aarch64-linux-gnu” and let “local_demo=False”.
And I have checked that the function ‘get_num_outputs’ does exists in tvm/python/tvm/_ffi/
Can anyone give me some advice? Thank U