You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemds.apache.org by mb...@apache.org on 2020/09/02 18:26:41 UTC

[systemds] branch master updated: [SYSTEMDS-2655] Fix parfor deep copy handling on eval, missing tests

This is an automated email from the ASF dual-hosted git repository.

mboehm7 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/systemds.git


The following commit(s) were added to refs/heads/master by this push:
     new 4a604b6  [SYSTEMDS-2655] Fix parfor deep copy handling on eval, missing tests
4a604b6 is described below

commit 4a604b66e6444902ef903866c6bbb9f15c3d666d
Author: Matthias Boehm <mb...@gmail.com>
AuthorDate: Wed Sep 2 20:26:04 2020 +0200

    [SYSTEMDS-2655] Fix parfor deep copy handling on eval, missing tests
    
    This patch fixes the currently failing test on pipeline enumeration and
    adds the two new packages 'pipelines', and 'privacy' to the github
    workflows.
---
 .github/workflows/functionsTests.yml                                  | 2 ++
 .../sysds/runtime/controlprogram/parfor/opt/OptTreeConverter.java     | 2 +-
 src/main/java/org/apache/sysds/runtime/util/ProgramConverter.java     | 4 +++-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/functionsTests.yml b/.github/workflows/functionsTests.yml
index 48cb62b..b9d4794 100644
--- a/.github/workflows/functionsTests.yml
+++ b/.github/workflows/functionsTests.yml
@@ -68,6 +68,8 @@ jobs:
           nary,
           paramserv,
           parfor,
+          pipelines,
+          privacy,
           quaternary,
           recompile,
           reorg,
diff --git a/src/main/java/org/apache/sysds/runtime/controlprogram/parfor/opt/OptTreeConverter.java b/src/main/java/org/apache/sysds/runtime/controlprogram/parfor/opt/OptTreeConverter.java
index 5d1f644..e97b73a 100644
--- a/src/main/java/org/apache/sysds/runtime/controlprogram/parfor/opt/OptTreeConverter.java
+++ b/src/main/java/org/apache/sysds/runtime/controlprogram/parfor/opt/OptTreeConverter.java
@@ -367,7 +367,7 @@ public class OptTreeConverter
 		}
 		else if( pb instanceof ParForProgramBlock && sb instanceof ParForStatementBlock )
 		{
-			ParForProgramBlock fpb = (ParForProgramBlock) pb;		
+			ParForProgramBlock fpb = (ParForProgramBlock) pb;
 			ParForStatementBlock fsb = (ParForStatementBlock)sb;
 			ParForStatement fs = (ParForStatement) fsb.getStatement(0);
 			node = new OptNode( NodeType.PARFOR );
diff --git a/src/main/java/org/apache/sysds/runtime/util/ProgramConverter.java b/src/main/java/org/apache/sysds/runtime/util/ProgramConverter.java
index 3bba363..7dad319 100644
--- a/src/main/java/org/apache/sysds/runtime/util/ProgramConverter.java
+++ b/src/main/java/org/apache/sysds/runtime/util/ProgramConverter.java
@@ -44,6 +44,7 @@ import org.apache.sysds.parser.FunctionStatement;
 import org.apache.sysds.parser.FunctionStatementBlock;
 import org.apache.sysds.parser.IfStatement;
 import org.apache.sysds.parser.IfStatementBlock;
+import org.apache.sysds.parser.ParForStatement;
 import org.apache.sysds.parser.ParForStatementBlock;
 import org.apache.sysds.parser.ParForStatementBlock.ResultVar;
 import org.apache.sysds.parser.StatementBlock;
@@ -543,7 +544,8 @@ public class ProgramConverter
 			ForStatementBlock orig = (ForStatementBlock) sb;
 			ForStatementBlock fsb = createForStatementBlockCopy(orig, true);
 			ForStatement origstmt = (ForStatement) orig.getStatement(0);
-			ForStatement fstmt = new ForStatement(); //only shallow
+			ForStatement fstmt = (origstmt instanceof ParForStatement) ?
+				new ParForStatement() : new ForStatement(); //only shallow
 			fstmt.setPredicate(origstmt.getIterablePredicate());
 			fsb.setStatements(CollectionUtils.asArrayList(fstmt));
 			for( StatementBlock c : origstmt.getBody() )