This is an automated email from the ASF dual-hosted git repository. tlopex pushed a commit to branch cleanup-testing-plugin-unused in repository https://gitbox.apache.org/repos/asf/tvm.git
commit e3cae8a87378954f8332457add4318051b53a8ef Author: tlopex <[email protected]> AuthorDate: Fri Jun 19 16:16:26 2026 -0400 Clean unused tvm.testing helpers --- python/tvm/testing/plugin.py | 18 ------------------ python/tvm/testing/runner.py | 31 ++++++++++++++----------------- 2 files changed, 14 insertions(+), 35 deletions(-) diff --git a/python/tvm/testing/plugin.py b/python/tvm/testing/plugin.py index aacbc3f4c5..595ecb6f92 100644 --- a/python/tvm/testing/plugin.py +++ b/python/tvm/testing/plugin.py @@ -35,8 +35,6 @@ directory as the test scripts. import _pytest import pytest -from tvm.testing import utils - try: from xdist.scheduler.loadscope import LoadScopeScheduling @@ -45,22 +43,6 @@ except ImportError: HAVE_XDIST = False -def pytest_configure(config): - """Runs at pytest configure time. - - Hardware/feature markers are declared statically in pyproject.toml; this - hook only reports the active target configuration. - """ - - print( - "enabled targets:", - "; ".join( - map(lambda x: str(x[0]) if isinstance(x[0], dict) else x[0], utils.enabled_targets()) - ), - ) - print("pytest marker:", config.option.markexpr) - - def pytest_collection_modifyitems(config, items): """Called after all tests are chosen, currently used for bookkeeping.""" # pylint: disable=unused-argument diff --git a/python/tvm/testing/runner.py b/python/tvm/testing/runner.py index c9353a96d9..de14d717e1 100644 --- a/python/tvm/testing/runner.py +++ b/python/tvm/testing/runner.py @@ -128,23 +128,20 @@ def local_run( # pylint: disable=too-many-arguments,too-many-locals export_func(mod, artifact_path) device: Device = device(device_type, 0) - try: - args = _args_to_device(args, device) - remote_mod = load_module(artifact_path) - profile_result = remote_mod.time_evaluator( - func_name=remote_mod.entry_name, - dev=device, - number=evaluator_config.number, - repeat=evaluator_config.repeat, - min_repeat_ms=evaluator_config.min_repeat_ms, - f_preproc="cache_flush_cpu_non_first_arg" - if evaluator_config.enable_cpu_cache_flush - else "", - )(*args) - remote_mod(*args) - args = _args_to_numpy(args) - finally: - pass + args = _args_to_device(args, device) + remote_mod = load_module(artifact_path) + profile_result = remote_mod.time_evaluator( + func_name=remote_mod.entry_name, + dev=device, + number=evaluator_config.number, + repeat=evaluator_config.repeat, + min_repeat_ms=evaluator_config.min_repeat_ms, + f_preproc="cache_flush_cpu_non_first_arg" + if evaluator_config.enable_cpu_cache_flush + else "", + )(*args) + remote_mod(*args) + args = _args_to_numpy(args) return args, profile_result
