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 2017/10/25 04:07:51 UTC

systemml git commit: [SYSTEMML-1903, 1968] Fix codegen row templates w/ partial unknowns

Repository: systemml
Updated Branches:
  refs/heads/master 70ab072ae -> 8f4ecdce2


[SYSTEMML-1903,1968] Fix codegen row templates w/ partial unknowns

After recent codegen optimizer changes, GLM was failing during initial
compilation when used through JMLC. The reason was an incorrect handling
of partial unknowns that led to vector operations although the output
was known to be scalar. 


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

Branch: refs/heads/master
Commit: 8f4ecdce23780a4b820cb79865322d05ba1b9411
Parents: 70ab072
Author: Matthias Boehm <mb...@gmail.com>
Authored: Tue Oct 24 20:39:22 2017 -0700
Committer: Matthias Boehm <mb...@gmail.com>
Committed: Tue Oct 24 20:39:22 2017 -0700

----------------------------------------------------------------------
 .../org/apache/sysml/hops/codegen/template/TemplateRow.java     | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/systemml/blob/8f4ecdce/src/main/java/org/apache/sysml/hops/codegen/template/TemplateRow.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/codegen/template/TemplateRow.java b/src/main/java/org/apache/sysml/hops/codegen/template/TemplateRow.java
index 9da04dc..e14fbd3 100644
--- a/src/main/java/org/apache/sysml/hops/codegen/template/TemplateRow.java
+++ b/src/main/java/org/apache/sysml/hops/codegen/template/TemplateRow.java
@@ -361,8 +361,9 @@ public class TemplateRow extends TemplateBase
 			// if one input is a matrix then we need to do vector by scalar operations
 			if( (hop.getInput().get(0).getDim1() > 1 && hop.getInput().get(0).getDim2() > 1)
 				|| (hop.getInput().get(1).getDim1() > 1 && hop.getInput().get(1).getDim2() > 1)
-				|| (!(hop.dimsKnown() && hop.getInput().get(0).dimsKnown() && hop.getInput().get(1).dimsKnown()) 
-						&& (cdata1.getDataType().isMatrix() || cdata2.getDataType().isMatrix())))
+				|| (!(hop.dimsKnown() && hop.getInput().get(0).dimsKnown() && hop.getInput().get(1).dimsKnown())
+					&& (hop.getDim2() != 1) //not a known vector output
+					&& (cdata1.getDataType().isMatrix() || cdata2.getDataType().isMatrix())))
 			{
 				if( HopRewriteUtils.isBinary(hop, SUPPORTED_VECT_BINARY) ) {
 					if( TemplateUtils.isMatrix(cdata1) && (TemplateUtils.isMatrix(cdata2)