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/07/18 02:41:35 UTC

systemml git commit: [SYSTEMML-2449] Fix memory estimates for list types, uni/bivar stats

Repository: systemml
Updated Branches:
  refs/heads/master 7f54592fe -> d6e48887e


[SYSTEMML-2449] Fix memory estimates for list types, uni/bivar stats

This patch fixes various aspects of memory estimates for operations that
produce or consume list types. All list operations are always executed
in CP and hence this did not show up before. However, it led to parfor
warnings and related issues in perftest univariate and bivariate stats.
 

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

Branch: refs/heads/master
Commit: d6e48887eaf2b33114bc5f0ecfeb6f05206c54fa
Parents: 7f54592
Author: Matthias Boehm <mb...@gmail.com>
Authored: Tue Jul 17 19:42:44 2018 -0700
Committer: Matthias Boehm <mb...@gmail.com>
Committed: Tue Jul 17 19:42:44 2018 -0700

----------------------------------------------------------------------
 src/main/java/org/apache/sysml/hops/Hop.java    | 4 ++--
 src/main/java/org/apache/sysml/hops/NaryOp.java | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/systemml/blob/d6e48887/src/main/java/org/apache/sysml/hops/Hop.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/Hop.java b/src/main/java/org/apache/sysml/hops/Hop.java
index d8f4424..41a32c3 100644
--- a/src/main/java/org/apache/sysml/hops/Hop.java
+++ b/src/main/java/org/apache/sysml/hops/Hop.java
@@ -613,6 +613,7 @@ public abstract class Hop implements ParseInfo
 			}
 			case FRAME:
 			case MATRIX:
+			case LIST:
 			{
 				//1a) mem estimate based on exactly known dimensions and sparsity
 				if( dimsKnown(true) ) { 
@@ -658,8 +659,7 @@ public abstract class Hop implements ParseInfo
 				break;
 			}
 			case OBJECT:
-			case UNKNOWN:
-			case LIST: {
+			case UNKNOWN: {
 				//memory estimate always unknown
 				_outputMemEstimate = OptimizerUtils.DEFAULT_SIZE;
 				break;

http://git-wip-us.apache.org/repos/asf/systemml/blob/d6e48887/src/main/java/org/apache/sysml/hops/NaryOp.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/NaryOp.java b/src/main/java/org/apache/sysml/hops/NaryOp.java
index db03a23..41a71e4 100644
--- a/src/main/java/org/apache/sysml/hops/NaryOp.java
+++ b/src/main/java/org/apache/sysml/hops/NaryOp.java
@@ -62,6 +62,7 @@ public class NaryOp extends Hop {
 			getInput().add(i, inputs[i]);
 			inputs[i].getParent().add(this);
 		}
+		refreshSizeInformation();
 	}
 
 	/** MultipleOp may have any number of inputs. */
@@ -199,6 +200,7 @@ public class NaryOp extends Hop {
 				case MAX: return new long[]{
 					HopRewriteUtils.getMaxInputDim(this, true),
 					HopRewriteUtils.getMaxInputDim(this, false), -1};
+				case LIST: return new long[]{getInput().size(), 1, -1};
 			}
 		}
 		return null; //do nothing