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:21:44 UTC

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

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



##########
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:
       Should this be a warning or an assertion, if target=None and host!=None doesn't make any sense?




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