diff --git a/python/tvm/relay/testing/py_converter.py b/python/tvm/relay/testing/py_converter.py index 61a04ec392dd4..89c3393408f53 100644 --- a/python/tvm/relay/testing/py_converter.py +++ b/python/tvm/relay/testing/py_converter.py @@ -190,7 +190,7 @@ def convert_func_node(self, func: Function, name_var=None): if name_var is None: func_name = self.generate_function_name('_anon_func') if isinstance(name_var, GlobalVar): - func_name = name_var.name_hint + func_name = str(name_var.name_hint) if isinstance(name_var, Var): func_name = self.get_var_name(name_var) @@ -411,7 +411,7 @@ def visit_var(self, var: Expr): def visit_global_var(self, gvar: Expr): # we don't need to add numbers to global var names because # the *names* are checked for uniqueness in the mod - return (Name(gvar.name_hint, Load()), []) + return (Name(str(gvar.name_hint), Load()), []) def visit_let(self, letexp: Expr):