From 805c54f996fdfdd0e4882fe8f053921357a6d4ed Mon Sep 17 00:00:00 2001 From: Xiyou Zhou Date: Thu, 16 Jun 2022 15:33:09 -0700 Subject: [PATCH 1/3] Add describe func. --- python/tvm/auto_scheduler/testing/tune_onnx.py | 2 ++ python/tvm/auto_scheduler/testing/tune_relay.py | 5 ++++- python/tvm/meta_schedule/testing/tune_onnx.py | 2 ++ python/tvm/meta_schedule/testing/tune_relay.py | 4 +++- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/python/tvm/auto_scheduler/testing/tune_onnx.py b/python/tvm/auto_scheduler/testing/tune_onnx.py index 2e6b9e5924e6..84ab1b48f8d2 100644 --- a/python/tvm/auto_scheduler/testing/tune_onnx.py +++ b/python/tvm/auto_scheduler/testing/tune_onnx.py @@ -27,6 +27,7 @@ from tvm import relay from tvm.meta_schedule.testing.custom_builder_runner import run_module_via_rpc from tvm.relay.frontend import from_onnx +from tvm.support import describe def _parse_args(): @@ -152,6 +153,7 @@ def main(): else: raise NotImplementedError(f"Unsupported target {ARGS.target}") + describe() print(f"Workload: {ARGS.model_name}") onnx_model = onnx.load(ARGS.onnx_path) shape_dict = {} diff --git a/python/tvm/auto_scheduler/testing/tune_relay.py b/python/tvm/auto_scheduler/testing/tune_relay.py index 48ed44ef19b7..2bd78139993b 100644 --- a/python/tvm/auto_scheduler/testing/tune_relay.py +++ b/python/tvm/auto_scheduler/testing/tune_relay.py @@ -26,6 +26,7 @@ from tvm import relay from tvm.meta_schedule.testing.custom_builder_runner import run_module_via_rpc from tvm.meta_schedule.testing.relay_workload import get_network +from tvm.support import describe def _parse_args(): @@ -149,6 +150,9 @@ def main(): ) else: raise NotImplementedError(f"Unsupported target {ARGS.target}") + + describe() + print(f"Workload: {ARGS.workload}") mod, params, (input_name, input_shape, input_dtype) = get_network( ARGS.workload, ARGS.input_shape, @@ -156,7 +160,6 @@ def main(): ) input_info = {input_name: input_shape} input_data = {} - print(f"Workload: {ARGS.workload}") for input_name, input_shape in input_info.items(): print(f" input_name: {input_name}") print(f" input_shape: {input_shape}") diff --git a/python/tvm/meta_schedule/testing/tune_onnx.py b/python/tvm/meta_schedule/testing/tune_onnx.py index 3a1b4cd5fe20..1a51622b5cde 100644 --- a/python/tvm/meta_schedule/testing/tune_onnx.py +++ b/python/tvm/meta_schedule/testing/tune_onnx.py @@ -25,6 +25,7 @@ from tvm import meta_schedule as ms from tvm.meta_schedule.testing.custom_builder_runner import run_module_via_rpc from tvm.relay.frontend import from_onnx +from tvm.support import describe def _parse_args(): @@ -120,6 +121,7 @@ def _parse_args(): def main(): + describe() print(f"Workload: {ARGS.model_name}") onnx_model = onnx.load(ARGS.onnx_path) shape_dict = {} diff --git a/python/tvm/meta_schedule/testing/tune_relay.py b/python/tvm/meta_schedule/testing/tune_relay.py index 8663eb460c4a..6188e124fde8 100644 --- a/python/tvm/meta_schedule/testing/tune_relay.py +++ b/python/tvm/meta_schedule/testing/tune_relay.py @@ -24,6 +24,7 @@ from tvm import meta_schedule as ms from tvm.meta_schedule.testing.custom_builder_runner import run_module_via_rpc from tvm.meta_schedule.testing.relay_workload import get_network +from tvm.support import describe def _parse_args(): @@ -118,6 +119,8 @@ def _parse_args(): def main(): + describe() + print(f"Workload: {ARGS.workload}") mod, params, (input_name, input_shape, input_dtype) = get_network( ARGS.workload, ARGS.input_shape, @@ -125,7 +128,6 @@ def main(): ) input_info = {input_name: input_shape} input_data = {} - print(f"Workload: {ARGS.workload}") for input_name, input_shape in input_info.items(): print(f" input_name: {input_name}") print(f" input_shape: {input_shape}") From 2adab4724efa00007834c9612bfef9abb83a1c82 Mon Sep 17 00:00:00 2001 From: Xiyou Zhou Date: Fri, 17 Jun 2022 01:16:09 -0700 Subject: [PATCH 2/3] Add tune_te. --- python/tvm/auto_scheduler/testing/tune_te.py | 3 +++ python/tvm/meta_schedule/testing/tune_te.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/python/tvm/auto_scheduler/testing/tune_te.py b/python/tvm/auto_scheduler/testing/tune_te.py index b02a6059e23d..2eaddbbc081e 100644 --- a/python/tvm/auto_scheduler/testing/tune_te.py +++ b/python/tvm/auto_scheduler/testing/tune_te.py @@ -21,6 +21,7 @@ import tvm from tvm import auto_scheduler from tvm.meta_schedule.testing.te_workload import CONFIGS +from tvm.support import describe def _parse_args(): @@ -94,6 +95,8 @@ def _parse_args(): def main(): + describe() + print(f"Workload: {ARGS.workload}") log_file = os.path.join(ARGS.work_dir, f"{ARGS.workload}.json") workload_func, params = CONFIGS[ARGS.workload] params = params[0] # type: ignore diff --git a/python/tvm/meta_schedule/testing/tune_te.py b/python/tvm/meta_schedule/testing/tune_te.py index b2649564bfa9..cbc310f999ad 100644 --- a/python/tvm/meta_schedule/testing/tune_te.py +++ b/python/tvm/meta_schedule/testing/tune_te.py @@ -24,6 +24,7 @@ from tvm import meta_schedule as ms from tvm import tir from tvm.meta_schedule.testing.te_workload import create_te_workload +from tvm.support import describe def _parse_args(): @@ -107,6 +108,8 @@ def _parse_args(): def main(): + describe() + print(f"Workload: {ARGS.workload}") runner = ms.runner.RPCRunner( rpc_config=ARGS.rpc_config, evaluator_config=ms.runner.EvaluatorConfig( From afbd4d7e3768f793c918ef4b7d084fcf97385d97 Mon Sep 17 00:00:00 2001 From: Xiyou Zhou Date: Fri, 17 Jun 2022 10:18:53 -0700 Subject: [PATCH 3/3] Retrigger CI.