Skip to content

Commit

Permalink
Fixed typo and type mismatch (apache#5259)
Browse files Browse the repository at this point in the history
Co-authored-by: Adrian Muresan <[email protected]>
  • Loading branch information
adi-muresan and Adrian Muresan authored Apr 7, 2020
1 parent 8df97ff commit 7902f76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tutorials/dev/relay_pass_infra.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,13 @@ def transform_function(self, func, mod, ctx):
obj = self

class ReplaceConstant(tvm.relay.ExprMutator):
def visit_const(self, c):
def visit_constant(self, c):
return relay.multiply(obj.multiplier, c)
return ReplaceConstant().visit(func)

f = example()
mod = tvm.IRModule.from_expr(f)
custom_pass = CustomPipeline(multiplier=relay.const(3, "float"))
custom_pass = CustomPipeline(multiplier=relay.const(3, "float32"))
assert custom_pass.info.name == "CustomPipeline"
mod3 = custom_pass(mod)
print(mod3)
Expand Down

0 comments on commit 7902f76

Please sign in to comment.