From 531a48d67fadcf7c882eea7f6c6a8e22bd587481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=BE=E9=9B=A8=E9=AD=94=E7=90=86=E6=B2=99?= <lolisa@marisa.moe> Date: Tue, 13 Nov 2018 18:49:43 -0800 Subject: [PATCH] Fix error in fuse_ops.cc (#2098) --- src/relay/pass/fuse_ops.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/relay/pass/fuse_ops.cc b/src/relay/pass/fuse_ops.cc index 2503bd5f5..9d19d2e6c 100644 --- a/src/relay/pass/fuse_ops.cc +++ b/src/relay/pass/fuse_ops.cc @@ -322,7 +322,7 @@ class DominatorTree { * The combined edge pattern across all the parents. * \return The least common acenstor of thw two. */ - static Node* LeastCommonAcenstor( + static Node* LeastCommonAncestor( Node* lhs, Node* rhs, OpPatternKind* edge_pattern) { @@ -338,12 +338,12 @@ class DominatorTree { edge_pattern[0], lhs->pattern); lhs = lhs->parent; } else { - lhs = lhs->parent; - rhs = rhs->parent; edge_pattern[0] = CombinePattern( edge_pattern[0], lhs->pattern); edge_pattern[0] = CombinePattern( edge_pattern[0], rhs->pattern); + lhs = lhs->parent; + rhs = rhs->parent; } } return lhs; @@ -374,7 +374,7 @@ DominatorTree DominatorTree::PostDom(common::Arena* arena, Node* onode = tree.nodes[oindex]; CHECK(onode != nullptr); if (parent != nullptr) { - parent = LeastCommonAcenstor(parent, onode, &pattern); + parent = LeastCommonAncestor(parent, onode, &pattern); } else { parent = onode; } -- GitLab