This is an automated email from the ASF dual-hosted git repository. zhic pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git
The following commit(s) were added to refs/heads/master by this push: new 7902f76 Fixed typo and type mismatch (#5259) 7902f76 is described below commit 7902f7627fb364abc9c5913ab1838872d0dc1d7d Author: Adrian Muresan <adi_m...@yahoo.com> AuthorDate: Tue Apr 7 17:21:23 2020 +0200 Fixed typo and type mismatch (#5259) Co-authored-by: Adrian Muresan <muresan.adrian...@gmail.com> --- tutorials/dev/relay_pass_infra.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorials/dev/relay_pass_infra.py b/tutorials/dev/relay_pass_infra.py index b54ac13..6b844ff 100644 --- a/tutorials/dev/relay_pass_infra.py +++ b/tutorials/dev/relay_pass_infra.py @@ -216,13 +216,13 @@ class CustomPipeline: 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)