In my code, want to use debug_executor
to extrace the cost time for each ops.
my code is kind of the following, and remote
means tvm rpc apk
from tvm.contrib.debugger import debug_executor as graph_executor
with tvm.transform.PassContext(opt_level=3, config={"relay.backend.use_auto_scheduler": True}):
lib = relay.build(ir_mod, target=config.target, params=params)
rlib = remote.load_module(os.path.basename(lib_file_path))
mod = debug_executor.create(lib.get_graph_json(), rlib["debug_create"]("default", dev),
dev)
# set inputs
m.set_input('data', tvm.nd.array(data.astype(dtype)))
# execute
m.run()
but got errors:
---------------------------------------------------------------
An error occurred during the execution of TVM.
For more information, please see: https://tvm.apache.org/docs/errors.html
---------------------------------------------------------------
Check failed: (pf != nullptr) is false: Cannot find function tvm.graph_executor_debug.create in registry. Do you enable debug graph executor build?
I have already build runtime with
set(USE_RELAY_DEBUG ON)
set(USE_GRAPH_RUNTIME_DEBUG ON)
set(USE_GRAPH_EXECUTOR_DEBUG ON)
any idea to do it?