提交 36c89103 authored 作者: carriepl's avatar carriepl

Add scan_merge and scan_merge_inouts

上级 b7871cf2
...@@ -195,6 +195,7 @@ them, instead injecting the constants directly into the graph or the Scan ...@@ -195,6 +195,7 @@ them, instead injecting the constants directly into the graph or the Scan
Op's inner function. This will allow constant folding to happen inside the Op's inner function. This will allow constant folding to happen inside the
inner function. inner function.
PushOutNonSeqScan PushOutNonSeqScan
----------------- -----------------
...@@ -208,6 +209,26 @@ reduces the amount of computation that needs to be performed. ...@@ -208,6 +209,26 @@ reduces the amount of computation that needs to be performed.
ScanMerge
---------
This optimization attempts to fuse distinct Scan ops into a single Scan op
that performs all the computation. The main advantage of merging Scan ops
together comes from the possibility of both original ops having some
computation in common. In such a setting, this computation ends up being done
twice. The fused Scan op, however, would only need to do it once and could
therefore be more computationaly efficient.
scan_merge_inouts
-----------------
This optimization attempts to merge a Scan op's identical outer inputs as well
as merge its identical outer outputs (outputs that perform the same
computation on the same inputs). This can reduce the amount of computation as
well as result in a simpler graph for the inner function.
Helper classes and functions Helper classes and functions
============================ ============================
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论