You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/08/29 07:33:24 UTC

[GitHub] [tvm] rebel-jaehunryu commented on a diff in pull request #11499: Silence unnecessary 'host' deprecation warnings

rebel-jaehunryu commented on code in PR #11499:
URL: https://github.com/apache/tvm/pull/11499#discussion_r956985212


##########
python/tvm/driver/build_module.py:
##########
@@ -255,8 +257,13 @@ def build(
 
     annotated_mods, target_host = Target.canon_target_map_and_host(annotated_mods, target_host)
 
-    # TODO(mbs): CompilationConfig implements the same host target defaulting logic, but
-    # tir_to_runtime currently bypasses that.
+    # TODO(mbs): Both CompilationConfig and TIRToRuntime implement the same host target
+    #  defaulting logic, but there's currently no way to get back the decided host.
+    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:
   In ConstantFold pass, `target_host` is always not None.
   I think a deprecation warning made in build_module.py is a side effect.



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org