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/08/03 22:40:47 UTC

systemml git commit: [SYSTEMML-2291] Fix build/estimate of layered graph sparsity estimator

Repository: systemml
Updated Branches:
  refs/heads/master c1917d84f -> c98e81581


[SYSTEMML-2291] Fix build/estimate of layered graph sparsity estimator

This patch fixes the build of the layered graph from dense matrix blocks
as well as issues with sparse layered graphs where certain rows/columns
are not represented at all. 


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

Branch: refs/heads/master
Commit: c98e815811f49df36c510446802b7c60681f3786
Parents: c1917d8
Author: Matthias Boehm <mb...@gmail.com>
Authored: Fri Aug 3 15:41:34 2018 -0700
Committer: Matthias Boehm <mb...@gmail.com>
Committed: Fri Aug 3 15:41:34 2018 -0700

----------------------------------------------------------------------
 .../org/apache/sysml/hops/estim/EstimatorLayeredGraph.java    | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/systemml/blob/c98e8158/src/main/java/org/apache/sysml/hops/estim/EstimatorLayeredGraph.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/estim/EstimatorLayeredGraph.java b/src/main/java/org/apache/sysml/hops/estim/EstimatorLayeredGraph.java
index dc79301..b646970 100644
--- a/src/main/java/org/apache/sysml/hops/estim/EstimatorLayeredGraph.java
+++ b/src/main/java/org/apache/sysml/hops/estim/EstimatorLayeredGraph.java
@@ -123,7 +123,7 @@ public class EstimatorLayeredGraph extends SparsityEstimator {
 				for (int i=0; i<m; i++) {
 					double[] avals = a.values(i);
 					int aix = a.pos(i);
-					for (int j=0; j<m; j++)
+					for (int j=0; j<n; j++)
 						if( avals[aix+j] != 0 )
 							cols[j].addInput(rows[i]);
 				}
@@ -159,6 +159,7 @@ public class EstimatorLayeredGraph extends SparsityEstimator {
 				return _input;
 			}
 			
+			@SuppressWarnings("unused")
 			public double[] getVector() {
 				return _rvect;
 			}
@@ -183,8 +184,8 @@ public class EstimatorLayeredGraph extends SparsityEstimator {
 					return _rvect = ltmp.get(0);
 				else {
 					double[] tmp = ltmp.get(0).clone();
-					for(int i=1; i<_input.size(); i++) {
-						double[] v2 = _input.get(i).getVector();
+					for(int i=1; i<ltmp.size(); i++) {
+						double[] v2 = ltmp.get(i);
 						for(int j=0; j<rounds; j++)
 							tmp[j] = Math.min(tmp[j], v2[j]);
 					}