diff --git a/python/tvm/relay/expr_functor.py b/python/tvm/relay/expr_functor.py index b22a4e7562e2e..8c37315db7331 100644 --- a/python/tvm/relay/expr_functor.py +++ b/python/tvm/relay/expr_functor.py @@ -131,9 +131,9 @@ def visit_global_id(self, global_var): def visit_if(self, ite): return If( - self.visit(ite.guard), - self.visit(ite.true_b), - self.visit(ite.false_b)) + self.visit(ite.cond), + self.visit(ite.true_branch), + self.visit(ite.false_branch)) def visit_tuple(self, tup): return Tuple([self.visit(field) for field in tup.fields])