From f6be4d69703afac399072f36b8e000ebbe034f6b Mon Sep 17 00:00:00 2001 From: Jared Roesch Date: Mon, 18 Feb 2019 14:18:57 -0800 Subject: [PATCH] Fix issue mutating if expressions (#2601) --- python/tvm/relay/expr_functor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/tvm/relay/expr_functor.py b/python/tvm/relay/expr_functor.py index 199d66baa45a..02829b016385 100644 --- a/python/tvm/relay/expr_functor.py +++ b/python/tvm/relay/expr_functor.py @@ -143,9 +143,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])