Skip to content

Commit ae1ba36

Browse files
MarisaKirisametmoreau89
authored andcommitted
fix (#3769)
1 parent 83bef9f commit ae1ba36

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

python/tvm/relay/expr_functor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def visit_constructor(self, con):
249249
return con
250250

251251
def visit_match(self, m):
252-
return Match(self.visit(m.data), [Clause(c.lhs, self.visit(c.rhs)) for c in m.pattern])
252+
return Match(self.visit(m.data), [Clause(c.lhs, self.visit(c.rhs)) for c in m.clauses])
253253

254254
def visit_ref_create(self, r):
255255
return RefCreate(self.visit(r.value))

tests/python/relay/test_expr_functor.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ def test_memo():
121121
check_visit(expr)
122122

123123

124+
def test_match():
125+
p = relay.prelude.Prelude()
126+
check_visit(p.mod[p.map])
127+
124128
if __name__ == "__main__":
125129
test_constant()
126130
test_tuple()
@@ -134,3 +138,4 @@ def test_memo():
134138
test_ref_read()
135139
test_ref_write()
136140
test_memo()
141+
test_match()

0 commit comments

Comments
 (0)