Repository: systemml
Updated Branches:
refs/heads/gh-pages bf0245c69 -> 4e22b91ea
[SYSTEMML-1828,1832] New rewrite for merging statement block sequences
This patch introduces a new statement block rewrite for merging DAGs of
subsequent last-level statement blocks. After constant folding and the
removal of unnecessary branches, we often end up with such sequences of
statement blocks. Since many rewrites and operator fusion work on the
granularity of individual DAGs, these unnecessary DAG cuts cause missed
optimization opportunities, especially in the context of operator fusion
(i.e., codegen). We now merge such sequences in awareness of rewrites
that explicitly split DAGs (to create recompilation points).
Apart from the new merge rewrite, this patch also fixes the IPA rewrite
pass that applies static rewrites per IPA round. The repeated
application of the statement block rewrite for injecting spark
checkpoints for variables used read-only in loops introduced redundant
statement blocks and checkpoints. The IPA rewrite pass now explicitly
excludes this rewrite.
Additionally, this patch also modifies the related tests to use
'while(FALSE){}' instead of 'if(1==1){}' as a DAG cut, and fixes some
minor compilation issues that showed up due to the increases
optimization scope.
Overall, there are many scripts and patterns that benefit from these
changes. For example, on 1 epoch of lenet w/ codegen, this patch
improved end-to-end performance from 328s to 297s due to increased
fusion opportunities and fewer compiled spark instructions (70 vs 82).
Project: http://git-wip-us.apache.org/repos/asf/systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/systemml/commit/16f72cff
Tree: http://git-wip-us.apache.org/repos/asf/systemml/tree/16f72cff
Diff: http://git-wip-us.apache.org/repos/asf/systemml/diff/16f72cff
Branch: refs/heads/gh-pages
Commit: 16f72cffb8d2a776bcde78d90df43622ee19d2eb
Parents: bf0245c
Author: Matthias Boehm <[email protected]>
Authored: Mon Aug 7 22:21:32 2017 -0700
Committer: Matthias Boehm <[email protected]>
Committed: Wed Aug 9 13:52:51 2017 -0700
----------------------------------------------------------------------
dml-language-reference.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/systemml/blob/16f72cff/dml-language-reference.md
----------------------------------------------------------------------
diff --git a/dml-language-reference.md b/dml-language-reference.md
index d5e200d..bd66a42 100644
--- a/dml-language-reference.md
+++ b/dml-language-reference.md
@@ -1782,7 +1782,7 @@ The following DML utilizes the `transformencode()`
function.
jspec = read("/user/ml/homes.tfspec_recode2.json", data_type="scalar",
value_type="string");
[X, M] = transformencode(target=F1, spec=jspec);
print(toString(X));
- if(1==1){}
+ while(FALSE){}
print(toString(M));
The transformed matrix X and output M are as follows.