提交 37172bad authored 作者: Frederic Bastien's avatar Frederic Bastien

Make sure ScanSaveMem is applied a max of once per Scan node.

上级 6bfc2ac9
......@@ -2266,6 +2266,7 @@ optdb.register('scan_eqopt1', scan_eqopt1, .05, 'fast_run', 'scan')
# We run before blas opt at 1.7 and specialize 2.0
# but after stabilize at 1.5. Should we put it before stabilize?
optdb.register('scan_eqopt2', scan_eqopt2, 1.6, 'fast_run', 'scan')
optdb.register('scanOp_save_mem', ScanSaveMem(), 1.61, 'fast_run', 'scan')
optdb.register('scanOp_make_inplace',
ScanInplaceOptimizer(typeInfer=None,
gpu_flag=False),
......@@ -2359,15 +2360,6 @@ scan_eqopt2.register('scanOp_merge_inouts',
'fast_run',
'scan')
# Just before specialize to have the other optimization
# like constant folding being applied
# This don't introduce inplace.
scan_eqopt2.register('scanOp_save_mem',
ScanSaveMem(),
7,
'fast_run',
'scan')
# After everything else
scan_eqopt2.register('scanOp_remove_constants_and_unused_inputs3',
opt.in2out(remove_constants_and_unused_inputs_scan,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论