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 <[email protected]>
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
 

Reply via email to