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


[SYSTEMML-2484] Fix codegen support for vector axpy in row templates

This patch fixes a very specific case of vector axpy in row templates.
So far we mistakenly compiled scalar axpy operations for both axpy
inputs with 1 or 2 columns although these scalar operations only apply
to column vectors.


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

Branch: refs/heads/master
Commit: 5d675151e38b161abfeccfdcd042e655e5ed1a4f
Parents: 93ebb38
Author: Matthias Boehm <[email protected]>
Authored: Fri Aug 3 13:41:51 2018 -0700
Committer: Matthias Boehm <[email protected]>
Committed: Fri Aug 3 13:41:51 2018 -0700

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


http://git-wip-us.apache.org/repos/asf/systemml/blob/5d675151/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 8f7ea1a..d9da27b 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
@@ -464,11 +464,11 @@ public class TemplateRow extends TemplateBase
                        CNode cdata2 = 
tmp.get(hop.getInput().get(1).getHopID());
                        CNode cdata3 = 
tmp.get(hop.getInput().get(2).getHopID());
                        
-                       if( hop.getDim2() > 2 ) { //row vectors
+                       if( hop.getDim2() >= 2 ) { //matrices
                                out = new CNodeBinary(cdata1, new 
CNodeBinary(cdata2, cdata3, BinType.VECT_MULT_SCALAR),
                                        top.getOp()==OpOp3.PLUS_MULT? 
BinType.VECT_PLUS : BinType.VECT_MINUS);
                        }
-                       else {
+                       else { //column vectors
                                //add lookups if required
                                cdata1 = 
TemplateUtils.wrapLookupIfNecessary(cdata1, hop.getInput().get(0));
                                cdata2 = 
TemplateUtils.wrapLookupIfNecessary(cdata2, hop.getInput().get(1));

Reply via email to