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/05/27 22:36:40 UTC

[GitHub] [tvm] mbs-octoml opened a new pull request, #11499: Silence unnecessary 'host' deprecation warnings

mbs-octoml opened a new pull request, #11499:
URL: https://github.com/apache/tvm/pull/11499

   It turns out build_module.py will manufacture a host out of thin air, in which case the
   warning is Target.canon_target_map_and_host is wrong headed.
   
   Also make sure we only complain if the passed target host is actually used.
   


-- 
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


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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
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.(default host is not None)
   So warning meg is always printed at build.
   
   



-- 
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


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

Posted by GitBox <gi...@apache.org>.
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:
   @mbs-octoml  
   In `ConstantFold pass`, `target_host` is always not None.(host is not None)
   So warning message is printed on build time.
   I think the above meg is not intended to warn the target which made in internal pass.
   
   I am not perfectly understand `canon_target_map_and_host`, 
   So could you check this code block, when applied in constantFold pass.
   Thanks!



-- 
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


[GitHub] [tvm] jwfromm merged pull request #11499: Silence unnecessary 'host' deprecation warnings

Posted by GitBox <gi...@apache.org>.
jwfromm merged PR #11499:
URL: https://github.com/apache/tvm/pull/11499


-- 
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


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

Posted by GitBox <gi...@apache.org>.
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.(default host is not None)
   I think this is a reason, why warning meg is always printed at build. 
   



-- 
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


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

Posted by GitBox <gi...@apache.org>.
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:
   @mbs-octoml  
   In `ConstantFold pass`, `target_host` is always not None.(host is not None)
   So warning message is printed on build time.
   I think the above meg is not intended to warn the target made in internal pass.
   
   I am not perfectly understand `canon_target_map_and_host`, 
   So could you check this code block in  constantFold pass
   Thanks!



-- 
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