You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by ju...@apache.org on 2022/09/12 08:07:07 UTC

[tvm] branch main updated: [MetaSchedule] Fix typo of compare between GlobalVar and str (#12704)

This is an automated email from the ASF dual-hosted git repository.

junrushao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new a63d03a116 [MetaSchedule] Fix typo of compare between GlobalVar and str (#12704)
a63d03a116 is described below

commit a63d03a116e6b8a3a80b96a90519a96ca63e16b9
Author: wrongtest <wr...@gmail.com>
AuthorDate: Mon Sep 12 16:07:00 2022 +0800

    [MetaSchedule] Fix typo of compare between GlobalVar and str (#12704)
    
    fix typo of compare between GlobalVar and str
---
 python/tvm/meta_schedule/default_config.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/tvm/meta_schedule/default_config.py b/python/tvm/meta_schedule/default_config.py
index 652f09261b..ac4028ec50 100644
--- a/python/tvm/meta_schedule/default_config.py
+++ b/python/tvm/meta_schedule/default_config.py
@@ -53,7 +53,7 @@ def mod(mod: Union[PrimFunc, IRModule]) -> IRModule:  # pylint: disable=redefine
         raise TypeError(f"Expected `mod` to be PrimFunc or IRModule, but gets: {mod}")
     func_names = mod.get_global_vars()
     (func_name,) = func_names
-    if len(func_names) == 1 and func_name != "main":
+    if len(func_names) == 1 and func_name.name_hint != "main":
         mod = IRModule({"main": mod[func_name]})
     return mod