You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by mb...@apache.org on 2018/02/17 04:00:56 UTC

systemml git commit: [SYSTEMML-2153] Fix robustness parfor check for block partitioning

Repository: systemml
Updated Branches:
  refs/heads/master a640e57b0 -> 3d5dbe429


[SYSTEMML-2153] Fix robustness parfor check for block partitioning

This patch fixes the robustness of the parfor optimizer (for validating
a potential input block partitioning) and dependency analysis with
regard to null variable names in index expressions.


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

Branch: refs/heads/master
Commit: 3d5dbe42979004fec95cdf01fd63bd065a7ccc99
Parents: a640e57
Author: Matthias Boehm <mb...@gmail.com>
Authored: Fri Feb 16 20:00:36 2018 -0800
Committer: Matthias Boehm <mb...@gmail.com>
Committed: Fri Feb 16 20:00:36 2018 -0800

----------------------------------------------------------------------
 .../java/org/apache/sysml/parser/ParForStatementBlock.java  | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/systemml/blob/3d5dbe42/src/main/java/org/apache/sysml/parser/ParForStatementBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/parser/ParForStatementBlock.java b/src/main/java/org/apache/sysml/parser/ParForStatementBlock.java
index cc33352..d209c36 100644
--- a/src/main/java/org/apache/sysml/parser/ParForStatementBlock.java
+++ b/src/main/java/org/apache/sysml/parser/ParForStatementBlock.java
@@ -1956,9 +1956,12 @@ public class ParForStatementBlock extends ForStatementBlock
 			boolean ret = ( _b.length == f2._b.length );
 			for( int i=0; i<_b.length && ret; i++ ) {
 				ret &= (_b[i] == f2._b[i] );
-				ret &= (_vars[i].equals(f2._vars[i])
-					||(_vars[i].startsWith(INTERAL_FN_INDEX_ROW) && f2._vars[i].startsWith(INTERAL_FN_INDEX_ROW))
-					||(_vars[i].startsWith(INTERAL_FN_INDEX_COL) && f2._vars[i].startsWith(INTERAL_FN_INDEX_COL)) )  ;
+				//note robustness for null var names 
+				String var1 = String.valueOf(_vars[i]);
+				String var2 = String.valueOf(f2._vars[i]);
+				ret &= (var1.equals(var2)
+					||(var1.startsWith(INTERAL_FN_INDEX_ROW) && var2.startsWith(INTERAL_FN_INDEX_ROW))
+					||(var1.startsWith(INTERAL_FN_INDEX_COL) && var2.startsWith(INTERAL_FN_INDEX_COL)));
 			}
 			return ret;
 		}