From 7ff1e207cc7feda9e752b4fa1abc1912e0e45c01 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) (cherry picked from commit f6be4d69703afac399072f36b8e000ebbe034f6b) --- 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 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])