Commit 851d8da7 by Zhi Committed by Tianqi Chen

Remove redundant FoldConstant pass (#2387)

parent 194a2e7c
...@@ -153,6 +153,8 @@ def optimize(func, target, params=None): ...@@ -153,6 +153,8 @@ def optimize(func, target, params=None):
func = ir_pass.infer_type(func) func = ir_pass.infer_type(func)
func = ir_pass.combine_parallel_conv2d(func) func = ir_pass.combine_parallel_conv2d(func)
# The constant folding pass is necessary because FoldScaleAxis pass needs
# to check the constantness and positiveness of scales.
if cfg.pass_enabled("FoldConstant"): if cfg.pass_enabled("FoldConstant"):
func = ir_pass.fold_constant(func) func = ir_pass.fold_constant(func)
......
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