You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by lr...@apache.org on 2015/11/19 21:47:21 UTC

[39/50] [abbrv] incubator-systemml git commit: Fix operator selection spark binary (prevent spark if single block)

Fix operator selection spark binary (prevent spark if single block)

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

Branch: refs/heads/master
Commit: d21b1c3e8b16885c6e9fc36c0bd9962708032893
Parents: 60d8444
Author: Matthias Boehm <mb...@us.ibm.com>
Authored: Sun Nov 8 19:43:01 2015 -0800
Committer: Matthias Boehm <mb...@us.ibm.com>
Committed: Sun Nov 8 19:43:01 2015 -0800

----------------------------------------------------------------------
 src/main/java/com/ibm/bi/dml/hops/BinaryOp.java          |  2 ++
 .../com/ibm/bi/dml/hops/rewrite/HopRewriteUtils.java     | 11 +++++++++++
 2 files changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/d21b1c3e/src/main/java/com/ibm/bi/dml/hops/BinaryOp.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/ibm/bi/dml/hops/BinaryOp.java b/src/main/java/com/ibm/bi/dml/hops/BinaryOp.java
index da7a72f..9d6d6fb 100644
--- a/src/main/java/com/ibm/bi/dml/hops/BinaryOp.java
+++ b/src/main/java/com/ibm/bi/dml/hops/BinaryOp.java
@@ -17,6 +17,7 @@
 
 package com.ibm.bi.dml.hops;
 
+import com.ibm.bi.dml.hops.rewrite.HopRewriteUtils;
 import com.ibm.bi.dml.lops.Aggregate;
 import com.ibm.bi.dml.lops.AppendGAlignedSP;
 import com.ibm.bi.dml.lops.AppendM;
@@ -986,6 +987,7 @@ public class BinaryOp extends Hop
 			&& supportsMatrixScalarOperations()                          //scalar operations
 			&& !(getInput().get(dt1.isScalar()?1:0) instanceof DataOp)   //input is not checkpoint
 			&& getInput().get(dt1.isScalar()?1:0).getParent().size()==1  //unary scalar is only parent
+			&& !HopRewriteUtils.isSingleBlock(getInput().get(dt1.isScalar()?1:0)) //single block triggered exec
 			&& getInput().get(dt1.isScalar()?1:0).optFindExecType() == ExecType.SPARK )					
 		{
 			//pull unary scalar operation into spark 

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/d21b1c3e/src/main/java/com/ibm/bi/dml/hops/rewrite/HopRewriteUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/ibm/bi/dml/hops/rewrite/HopRewriteUtils.java b/src/main/java/com/ibm/bi/dml/hops/rewrite/HopRewriteUtils.java
index 1ca124d..3d7e830 100644
--- a/src/main/java/com/ibm/bi/dml/hops/rewrite/HopRewriteUtils.java
+++ b/src/main/java/com/ibm/bi/dml/hops/rewrite/HopRewriteUtils.java
@@ -693,6 +693,17 @@ public class HopRewriteUtils
 	}
 	
 	/**
+	 * 
+	 * @param hop
+	 * @return
+	 */
+	public static boolean isSingleBlock( Hop hop ) {
+		return isSingleBlock(hop, true)
+			&& isSingleBlock(hop, false);
+	}
+	
+	
+	/**
 	 * Checks our BLOCKSIZE CONSTRAINT, w/ awareness of forced single node
 	 * execution mode.
 	 *