When i try to measure the end to end running time on an android device using:
from tvm.contrib import graph_executor
module = graph_executor.GraphModule(lib["default"](device))
module.set_input(**tvm_dummy)
res = module.benchmark(device, end_to_end=True)
i get the following error:
Traceback (most recent call last):
File "/Users/nkaminsky/code/TVM/tvm_benchmarking.py", line 224, in <module>
_main()
File "/Users/nkaminsky/code/TVM/tvm_benchmarking.py", line 199, in _main
runtime_args["test_settings"],
File "/Users/nkaminsky/code/TVM/tvm_benchmarking.py", line 121, in _measure_inference_time
res = module.benchmark(device, end_to_end=True)
File "/Users/nkaminsky/code/my-tvm-new/python/tvm/contrib/graph_executor.py", line 404, in benchmark
)(device.device_type, device.device_id, *args)
File "/Users/nkaminsky/code/my-tvm-new/python/tvm/runtime/module.py", line 292, in evaluator
blob = feval(*args)
File "/Users/nkaminsky/code/my-tvm-new/python/tvm/_ffi/_ctypes/packed_func.py", line 237, in __call__
raise get_last_ffi_error()
tvm.error.RPCError: Traceback (most recent call last):
[bt] (8) 9 libtvm.dylib 0x000000011725e126 tvm::runtime::RPCWrappedFunc::operator()(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const + 1158
[bt] (7) 8 libtvm.dylib 0x0000000117256c2c tvm::runtime::RPCClientSession::CallFunc(void*, TVMValue const*, int const*, int, std::__1::function<void (tvm::runtime::TVMArgs)> const&) + 124
[bt] (6) 7 libtvm.dylib 0x000000011724ecad tvm::runtime::RPCEndpoint::CallFunc(void*, TVMValue const*, int const*, int, std::__1::function<void (tvm::runtime::TVMArgs)>) + 333
[bt] (5) 6 libtvm.dylib 0x000000011724d4ce tvm::runtime::RPCEndpoint::HandleUntilReturnEvent(bool, std::__1::function<void (tvm::runtime::TVMArgs)>) + 622
[bt] (4) 5 libtvm.dylib 0x000000011724d76e tvm::runtime::RPCEndpoint::EventHandler::HandleNextEvent(bool, bool, std::__1::function<void (tvm::runtime::TVMArgs)>) + 494
[bt] (3) 4 libtvm.dylib 0x0000000117251879 tvm::runtime::RPCEndpoint::EventHandler::HandleProcessPacket(std::__1::function<void (tvm::runtime::TVMArgs)>) + 393
[bt] (2) 3 libtvm.dylib 0x0000000117253815 tvm::runtime::RPCEndpoint::EventHandler::HandleReturn(tvm::runtime::RPCCode, std::__1::function<void (tvm::runtime::TVMArgs)>) + 213
[bt] (1) 2 libtvm.dylib 0x0000000115e19639 tvm::runtime::detail::LogFatal::Entry::Finalize() + 89
[bt] (0) 1 libtvm.dylib 0x00000001171ed2c8 tvm::runtime::Backtrace() + 24
File "/Users/nkaminsky/code/my-tvm-new/src/runtime/rpc/rpc_endpoint.cc", line 376
RPCError: Error caught from RPC call:
[18:51:23] /Users/nkaminsky/code/my-tvm-new/apps/android_rpc/app/src/main/jni/../../../../../../include/../src/runtime/c_runtime_api.cc:131:
---------------------------------------------------------------
An error occurred during the execution of TVM.
For more information, please see: https://tvm.apache.org/docs/errors.html
---------------------------------------------------------------
Check failed: (allow_missing) is false: Device API rpc is not enabled.
this happens only when end_to_end is set to True. can somebody help me please?