zxybazh commented on a change in pull request #9497:
URL: https://github.com/apache/tvm/pull/9497#discussion_r748084042
##########
File path: python/tvm/autotvm/task/relay_integration.py
##########
@@ -77,6 +78,11 @@ def extract_from_program(mod, params, target,
target_host=None, ops=None):
task: Array of autotvm.task.Task
collected tasks
"""
+ if target_host is not None:
+ warnings.warn(
+ "target_host parameter is going to be deprecated. "
+ "Please pass in tvm.target.Target(target, host=target_host)
instead."
+ )
Review comment:
Shall we also add the warning to `extract_from_multiple_program`?
##########
File path: python/tvm/relay/build_module.py
##########
@@ -332,16 +337,23 @@ def build(ir_mod, target=None, target_host=None,
params=None, mod_name="default"
"instead of deprecated parameter mod
(tvm.relay.function.Function)",
DeprecationWarning,
)
+
+ if target_host is not None:
+ warnings.warn(
+ "target_host parameter is going to be deprecated. "
+ "Please pass in tvm.target.Target(target, host=target_host)
instead."
+ )
+
+ target, target_host = Target.check_and_update_host_consist(
+ target, target_host, target_is_dict_key=False
+ )
+
target = build_target_by_device_type_map(target)
if isinstance(target_host, (str, Target)):
target_host = Target(target_host)
elif target_host:
raise ValueError("target host must be the type of str, " +
"tvm.target.Target, or None")
Review comment:
This part seems to be obsolete after the change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]