Commit 312802f3 by Haichen Shen Committed by Tianqi Chen

Add simplify pass in the Relay interpreter (#2417)

parent 547a0913
......@@ -218,7 +218,9 @@ class Interpreter(Executor):
"""
# TODO: We need to move this optimization code into the optimizer/pass manager
ck_expr = ir_pass.infer_type(expr, mod=self.mod)
fused_expr = ir_pass.fuse_ops(ck_expr)
simp_expr = ir_pass.simplify_inference(ck_expr)
ck_simp = ir_pass.infer_type(simp_expr, mod=self.mod)
fused_expr = ir_pass.fuse_ops(ck_simp)
ck_fused = ir_pass.infer_type(fused_expr, mod=self.mod)
return ck_fused
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment