diff --git a/docs/dev/debugger.rst b/docs/dev/debugger.rst index d3559feadb68e..f1bd004717b48 100644 --- a/docs/dev/debugger.rst +++ b/docs/dev/debugger.rst @@ -134,12 +134,12 @@ How to use Debugger? 3. In frontend script file instead of ``from tvm.contrib import graph_executor`` import the - ``debug_runtime`` - ``from tvm.contrib.debugger import debug_runtime as graph_executor`` + ``debug_executor`` + ``from tvm.contrib.debugger import debug_executor as graph_executor`` :: - from tvm.contrib.debugger import debug_runtime as graph_executor + from tvm.contrib.debugger import debug_executor as graph_executor m = graph_executor.create(graph, lib, dev, dump_root="/tmp/tvmdbg") # set inputs m.set_input('data', tvm.nd.array(data.astype(dtype))) diff --git a/python/tvm/contrib/cuda_graph/cuda_graph_executor.py b/python/tvm/contrib/cuda_graph/cuda_graph_executor.py index 3e382dc0de83e..3c8b89c39cfbf 100644 --- a/python/tvm/contrib/cuda_graph/cuda_graph_executor.py +++ b/python/tvm/contrib/cuda_graph/cuda_graph_executor.py @@ -131,4 +131,4 @@ def debug_get_output(self, node, out): out : NDArray The output array container """ - raise NotImplementedError("Please use debugger.debug_runtime as graph_executor instead.") + raise NotImplementedError("Please use debugger.debug_executor as graph_executor instead.") diff --git a/python/tvm/contrib/graph_executor.py b/python/tvm/contrib/graph_executor.py index f9d54b8834971..a4bc85905f5e7 100644 --- a/python/tvm/contrib/graph_executor.py +++ b/python/tvm/contrib/graph_executor.py @@ -270,7 +270,7 @@ def debug_get_output(self, node, out): out : NDArray The output array container """ - raise NotImplementedError("Please use debugger.debug_runtime as graph_executor instead.") + raise NotImplementedError("Please use debugger.debug_executor as graph_executor instead.") def load_params(self, params_bytes): """Load parameters from serialized byte array of parameter dict. diff --git a/python/tvm/driver/tvmc/runner.py b/python/tvm/driver/tvmc/runner.py index 84f1a03273495..4f84590d5a9fe 100644 --- a/python/tvm/driver/tvmc/runner.py +++ b/python/tvm/driver/tvmc/runner.py @@ -27,7 +27,7 @@ from tvm import rpc from tvm.autotvm.measure import request_remote from tvm.contrib import graph_executor as runtime -from tvm.contrib.debugger import debug_runtime +from tvm.contrib.debugger import debug_executor from tvm.relay import load_param_dict from . import common @@ -370,7 +370,7 @@ def run_module( if profile: logger.debug("creating runtime with profiling enabled") - module = debug_runtime.create(graph, lib, dev, dump_root="./prof") + module = debug_executor.create(graph, lib, dev, dump_root="./prof") else: logger.debug("creating runtime with profiling disabled") module = runtime.create(graph, lib, dev) diff --git a/python/tvm/micro/__init__.py b/python/tvm/micro/__init__.py index a75df56839664..a70cb96d9b135 100644 --- a/python/tvm/micro/__init__.py +++ b/python/tvm/micro/__init__.py @@ -26,7 +26,7 @@ from .model_library_format import export_model_library_format, UnsupportedInModelLibraryFormatError from .session import ( create_local_graph_executor, - create_local_debug_runtime, + create_local_debug_executor, Session, SessionTerminatedError, ) diff --git a/python/tvm/micro/session.py b/python/tvm/micro/session.py index 9573db2095bbd..78bf033799397 100644 --- a/python/tvm/micro/session.py +++ b/python/tvm/micro/session.py @@ -23,7 +23,7 @@ from ..error import register_error from .._ffi import get_global_func from ..contrib import graph_executor -from ..contrib.debugger import debug_runtime +from ..contrib.debugger import debug_executor from ..rpc import RPCSession from .transport import IoTimeoutError from .transport import TransportLogger @@ -218,7 +218,7 @@ def create_local_graph_executor(graph_json_str, mod, device): ) -def create_local_debug_runtime(graph_json_str, mod, device, dump_root=None): +def create_local_debug_executor(graph_json_str, mod, device, dump_root=None): """Create a local debug runtime driving execution on the remote CPU device given. Parameters @@ -242,7 +242,7 @@ def create_local_debug_runtime(graph_json_str, mod, device, dump_root=None): """ device_type_id = [device.device_type, device.device_id] fcreate = get_global_func("tvm.graph_executor_debug.create") - return debug_runtime.GraphModuleDebug( + return debug_executor.GraphModuleDebug( fcreate(graph_json_str, mod, lookup_remote_linked_param, *device_type_id), [device], graph_json_str, diff --git a/tests/python/unittest/test_runtime_graph_debug.py b/tests/python/unittest/test_runtime_graph_debug.py index b0173d1e7b7f2..6cab75d9b9fcf 100644 --- a/tests/python/unittest/test_runtime_graph_debug.py +++ b/tests/python/unittest/test_runtime_graph_debug.py @@ -28,7 +28,7 @@ import numpy as np from tvm import rpc from tvm.contrib import utils -from tvm.contrib.debugger import debug_runtime +from tvm.contrib.debugger import debug_executor @tvm.testing.requires_llvm @@ -75,7 +75,7 @@ def myadd(*args): mlib_proxy = tvm.support.FrontendTestModule() mlib_proxy["myadd"] = myadd try: - mod = debug_runtime.create(graph, mlib_proxy, tvm.cpu(0)) + mod = debug_executor.create(graph, mlib_proxy, tvm.cpu(0)) except ValueError: return @@ -171,7 +171,7 @@ def check_remote(): remote.upload(path_dso) mlib = remote.load_module("dev_lib.so") try: - mod = debug_runtime.create(graph, mlib, remote.cpu(0)) + mod = debug_executor.create(graph, mlib, remote.cpu(0)) except ValueError: print("Skip because debug runtime not enabled") return diff --git a/tests/python/unittest/test_runtime_module_based_interface.py b/tests/python/unittest/test_runtime_module_based_interface.py index bf062afdb701e..766338de35580 100644 --- a/tests/python/unittest/test_runtime_module_based_interface.py +++ b/tests/python/unittest/test_runtime_module_based_interface.py @@ -19,7 +19,7 @@ from tvm.relay import testing import tvm from tvm.contrib import graph_executor -from tvm.contrib.debugger import debug_runtime +from tvm.contrib.debugger import debug_executor from tvm.contrib.cuda_graph import cuda_graph_executor import tvm.testing @@ -527,7 +527,7 @@ def test_debug_graph_executor(): tvm.testing.assert_allclose(out, verify(data), atol=1e-5) # debug graph executor wrapper - debug_g_mod = debug_runtime.GraphModuleDebug( + debug_g_mod = debug_executor.GraphModuleDebug( complied_graph_lib["debug_create"]("default", dev), [dev], complied_graph_lib.get_json(), diff --git a/vta/scripts/tune_resnet.py b/vta/scripts/tune_resnet.py index f3246ebcd2983..dfb74b1297180 100644 --- a/vta/scripts/tune_resnet.py +++ b/vta/scripts/tune_resnet.py @@ -29,7 +29,7 @@ from tvm.autotvm.measure.measure_methods import request_remote from tvm.autotvm.tuner import XGBTuner, GATuner, RandomTuner, GridSearchTuner from tvm.contrib import graph_executor, utils, download -from tvm.contrib.debugger import debug_runtime +from tvm.contrib.debugger import debug_executor import vta from vta.testing import simulator from vta.top import graph_pack @@ -325,7 +325,7 @@ def tune_tasks( # If detailed runtime info is needed build with debug runtime if opt.debug_profile: - m = debug_runtime.create(graph, lib, ctx) + m = debug_executor.create(graph, lib, ctx) else: m = graph_executor.create(graph, lib, ctx) diff --git a/vta/tutorials/frontend/deploy_classification.py b/vta/tutorials/frontend/deploy_classification.py index 2c4121e525ad3..90ac5542c371b 100644 --- a/vta/tutorials/frontend/deploy_classification.py +++ b/vta/tutorials/frontend/deploy_classification.py @@ -53,7 +53,7 @@ from tvm import te from tvm import rpc, autotvm, relay from tvm.contrib import graph_executor, utils, download -from tvm.contrib.debugger import debug_runtime +from tvm.contrib.debugger import debug_executor from tvm.relay import transform import vta