Skip to content

Commit

Permalink
add more code
Browse files Browse the repository at this point in the history
  • Loading branch information
MarisaKirisame committed Jan 23, 2019
1 parent 7226df5 commit 71a15f1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions python/tvm/relay/expr_functor.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ def visit(self, expr):
res = self.visit_constant(expr)
elif isinstance(expr, Op):
res = self.visit_op(expr)
elif isinstance(expr, RefNew):
res = self.visit_ref_new(expr)
elif isinstance(expr, RefRead):
res = self.visit_ref_read(expr)
elif isinstance(expr, RefWrite):
res = self.visit_ref_write(expr)
else:
raise Exception("warning unhandled case: {0}".format(type(expr)))

Expand Down Expand Up @@ -81,6 +87,14 @@ def visit_op(self, _):
def visit_constant(self, _):
raise NotImplementedError()

def visit_ref_new(self, _):
raise NotImplementedError()

def visit_ref_write(self, _):
raise NotImplementedError()

def visit_ref_read(self, _):
raise NotImplementedError()

class ExprMutator(ExprFunctor):
"""
Expand Down

0 comments on commit 71a15f1

Please sign in to comment.