diff --git a/docs/dev/debugger.rst b/docs/dev/debugger.rst index 8cd1237bdeba4..c12dddaa8f270 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, ctx, 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 33232b09c624e..f7b2dbf784c97 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 b199ac8505547..5920800f130e7 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 a5e39a9e4233b..f6052eec7bd13 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, ctx, dump_root="./prof") + module = debug_executor.create(graph, lib, ctx, dump_root="./prof") else: logger.debug("creating runtime with profiling disabled") module = runtime.create(graph, lib, ctx) 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 16b8e375acee0..358cc664c0619 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, ctx): ) -def create_local_debug_runtime(graph_json_str, mod, ctx, dump_root=None): +def create_local_debug_executor(graph_json_str, mod, ctx, dump_root=None): """Create a local debug runtime driving execution on the remote CPU context given. Parameters @@ -242,7 +242,7 @@ def create_local_debug_runtime(graph_json_str, mod, ctx, dump_root=None): """ device_type_id = [ctx.device_type, ctx.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), [ctx], graph_json_str, diff --git a/tests/python/unittest/test_runtime_graph_debug.py b/tests/python/unittest/test_runtime_graph_debug.py index 996d426efaa99..bf8c3cb5278ce 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 d7f690ac4e513..f27fec01b8c15 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", ctx), [ctx], 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 10515455c5ee1..a8b02de512692 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