Skip to content

Commit 62a69a6

Browse files
authored
[TVMC] Stop printing a wall of warnings with tvmc tune (#13882)
A simple tvmc tune command currently results in a huge wall of warnings about target_host parameter being deprecated, even when the user hasn't provided a target-host cmd line argument. We can prevent that happening from just not providing the default target-host to tvmc. Also, ensure that when the user does provide target-host, we print the warning once, not 500 times.
1 parent 583f5ae commit 62a69a6

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

python/tvm/autotvm/measure/measure_methods.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ def _build_func_common(measure_input, runtime=None, checks=None, build_option=No
541541
instruments=current_pass_context.instruments,
542542
config=current_config,
543543
):
544-
func = build(s, args, target_host=task.target_host, runtime=runtime)
544+
func = build(s, args, target=target, runtime=runtime)
545545
return func, tuple((get_const_tuple(x.shape), x.dtype) for x in args)
546546

547547

python/tvm/driver/tvmc/autotuner.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ def add_tune_parser(subparsers, _, json_params):
112112
generate_target_args(parser)
113113
parser.add_argument(
114114
"--target-host",
115-
help="the host compilation target, defaults to 'llvm'",
116-
default="llvm",
115+
help="the host compilation target.",
117116
)
118117

119118
parser.add_argument("--timeout", type=int, default=10, help="compilation timeout, in seconds")

0 commit comments

Comments
 (0)