JKANG94 edited a comment on issue #9423: URL: https://github.com/apache/tvm/issues/9423#issuecomment-972612749
@mehrdadh I also met this problem. I used micro tvm to run tflitemodel on x86 host just like this http://tvm.apache.org/docs/how_to/work_with_microtvm/micro_tflite.html#sphx-glr-download-how-to-work-with-microtvm-micro-tflite-py, but I used the create_local_debug_executo for getting the running time of the executor. with tvm.micro.Session(generated_project.transport()) as session: debug_module = tvm.micro.create_local_debug_executor( module.get_graph_json(), session.get_system_lib(), session.device ) debug_module.set_input(**module.get_params()) debug_module.set_input(input_tensor, tvm.nd.array(np.array([0.5], dtype="float32"))) print("########## Build untuning ##########") debug_module.run() del debug_module Traceback (most recent call last): File "micro_tflite.py", line 324, in <module> debug_module.run() File "/workspace/tvm/python/tvm/contrib/debugger/debug_executor.py", line 260, in run self._run_debug() File "/workspace/tvm/python/tvm/contrib/debugger/debug_executor.py", line 217, in _run_debug self.debug_datum._time_list = [[float(t)] for t in self.run_individual(10, 1, 1)] File "/workspace/tvm/python/tvm/contrib/debugger/debug_executor.py", line 269, in run_individual ret = self._run_individual(number, repeat, min_repeat_ms) File "/workspace/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 237, in __call__ raise get_last_ffi_error() tvm.error.RPCError: Traceback (most recent call last): 13: TVMFuncCall 12: std::_Function_handler<void (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*), tvm::runtime::GraphExecutorDebug::GetFunction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, tvm::runtime::ObjectPtr<tvm::runtime::Object> const&)::{lambda(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)#4}>::_M_invoke(std::_Any_data const&, tvm::runtime::TVMArgs&&, tvm::runtime::TVMRetValue*&&) 11: tvm::runtime::GraphExecutorDebug::RunIndividual[abi:cxx11](int, int, int) 10: tvm::runtime::GraphExecutorDebug::RunOpRPC(int, int, int, int) 9: tvm::runtime::TypedPackedFunc<tvm::runtime::PackedFunc (tvm::runtime::Optional<tvm::runtime::Module>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int, int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)>::AssignTypedLambda<tvm::runtime::{lambda(tvm::runtime::Optional<tvm::runtime::Module>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int, int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)#1}>(tvm::runtime::{lambda(tvm::runtime::Optional<tvm::runtime::Module>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int, int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)#1}, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::{lambda(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)#1}::operator()( tvm::runtime::TVMArgs const, tvm::runtime::TVMRetValue) const 8: tvm::runtime::RPCModuleNode::GetTimeEvaluator(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, DLDevice, int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) 7: _ZNSt17_Function_handlerIFvN3tvm7runtime7TVMArgsEPNS1_11 6: tvm::runtime::RPCWrappedFunc::operator()(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const 5: tvm::runtime::RPCClientSession::CallFunc(void*, TVMValue const*, int const*, int, std::function<void (tvm::runtime::TVMArgs)> const&) 4: tvm::runtime::RPCEndpoint::CallFunc(void*, TVMValue const*, int const*, int, std::function<void (tvm::runtime::TVMArgs)>) 3: tvm::runtime::RPCEndpoint::HandleUntilReturnEvent(bool, std::function<void (tvm::runtime::TVMArgs)>) 2: tvm::runtime::RPCEndpoint::EventHandler::HandleNextEvent(bool, bool, std::function<void (tvm::runtime::TVMArgs)>) 1: tvm::runtime::RPCEndpoint::EventHandler::HandleProcessPacket(std::function<void (tvm::runtime::TVMArgs)>) 0: tvm::runtime::RPCEndpoint::EventHandler::HandleReturn(tvm::runtime::RPCCode, std::function<void (tvm::runtime::TVMArgs)>) File "/workspace/tvm/src/runtime/rpc/rpc_endpoint.cc", line 376 RPCError: Error caught from RPC call: Can you see it? Thank you! I try to use create_local_graph_executor, it can run model and get the output correctly. But it's hard to get the time of executor when running model on board such as stm32f407. -- 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]
