Repository: systemml
Updated Branches:
  refs/heads/master 79db07968 -> 2e6e02f0b


[MINOR] Fix robustness CSE leaf node merge (converted pread-tread)

This patch makes a minor extension of the common subexpression (CSE)
rewrite. In JMLC scenarios, persistent reads are converted to transient
reads which need to be properly treated as leaf nodes despite potential
parameters. 


Project: http://git-wip-us.apache.org/repos/asf/systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/systemml/commit/2e6e02f0
Tree: http://git-wip-us.apache.org/repos/asf/systemml/tree/2e6e02f0
Diff: http://git-wip-us.apache.org/repos/asf/systemml/diff/2e6e02f0

Branch: refs/heads/master
Commit: 2e6e02f0bc116786665a10dbe2deb0bb395876b4
Parents: 79db079
Author: Matthias Boehm <mboe...@gmail.com>
Authored: Sat Apr 14 20:38:18 2018 -0700
Committer: Matthias Boehm <mboe...@gmail.com>
Committed: Sat Apr 14 20:38:18 2018 -0700

----------------------------------------------------------------------
 .../hops/rewrite/RewriteCommonSubexpressionElimination.java      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/systemml/blob/2e6e02f0/src/main/java/org/apache/sysml/hops/rewrite/RewriteCommonSubexpressionElimination.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/sysml/hops/rewrite/RewriteCommonSubexpressionElimination.java
 
b/src/main/java/org/apache/sysml/hops/rewrite/RewriteCommonSubexpressionElimination.java
index 686c563..f0cc46e 100644
--- 
a/src/main/java/org/apache/sysml/hops/rewrite/RewriteCommonSubexpressionElimination.java
+++ 
b/src/main/java/org/apache/sysml/hops/rewrite/RewriteCommonSubexpressionElimination.java
@@ -25,6 +25,7 @@ import java.util.HashMap;
 import org.apache.sysml.hops.DataOp;
 import org.apache.sysml.hops.Hop;
 import org.apache.sysml.hops.LiteralOp;
+import org.apache.sysml.hops.Hop.DataOpTypes;
 
 /**
  * Rule: CommonSubexpressionElimination. For all statement blocks, 
@@ -99,7 +100,8 @@ public class RewriteCommonSubexpressionElimination extends 
HopRewriteRule
                if( hop.isVisited() )
                        return ret;
 
-               if( hop.getInput().isEmpty() ) //LEAF NODE
+               if( hop.getInput().isEmpty() //LEAF NODE
+                       || HopRewriteUtils.isData(hop, 
DataOpTypes.TRANSIENTREAD) )
                {
                        if( hop instanceof LiteralOp )
                        {

Reply via email to