This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new bb32ff7188 [Tests] Clean unused tvm.testing helpers (#19846)
bb32ff7188 is described below
commit bb32ff7188e1fe333df93de519ac0e73e548d0f8
Author: Shushi Hong <[email protected]>
AuthorDate: Fri Jun 19 20:32:43 2026 -0400
[Tests] Clean unused tvm.testing helpers (#19846)
This PR removes a small amount of unused/no-op code from `tvm.testing`.
---
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