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 2021/04/02 19:56:40 UTC

[GitHub] [tvm] zxybazh commented on a change in pull request #7791: [Target] Fix empty target and host for autotvm task

zxybazh commented on a change in pull request #7791:
URL: https://github.com/apache/tvm/pull/7791#discussion_r606395283



##########
File path: python/tvm/target/target.py
##########
@@ -182,6 +182,10 @@ def check_and_update_host_consist(target, host=None, target_is_dict_key=True):
         target_is_dict_key : Bool
             When the type of target is dict, whether Target is the key (Otherwise the value)
         """
+        if target is None:
+            if host is not None:
+                warnings.warn("Target host is not empty when target is empty.")

Review comment:
       Good point, should be an assertion. I fixed it.




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

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