Repository: systemml Updated Branches: refs/heads/master 4c7640b87 -> 54c52ab3c
[HOTFIX][SYSTEMML-2259] Fix correctness new dense-sparse MV mult ops This patch fixes the newly introduced dense-sparse MV mult special case, for inputs where the dense input has a rows of varing number of non-zeros (instead of a mix of empty and full dense rows). Project: http://git-wip-us.apache.org/repos/asf/systemml/repo Commit: http://git-wip-us.apache.org/repos/asf/systemml/commit/a1513d3a Tree: http://git-wip-us.apache.org/repos/asf/systemml/tree/a1513d3a Diff: http://git-wip-us.apache.org/repos/asf/systemml/diff/a1513d3a Branch: refs/heads/master Commit: a1513d3a1f1e11c89e6dc3644df8fa29769e382e Parents: 4c7640b Author: Matthias Boehm <[email protected]> Authored: Fri Apr 20 17:19:03 2018 -0700 Committer: Matthias Boehm <[email protected]> Committed: Fri Apr 20 17:19:03 2018 -0700 ---------------------------------------------------------------------- .../org/apache/sysml/runtime/matrix/data/LibMatrixBincell.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/systemml/blob/a1513d3a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixBincell.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixBincell.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixBincell.java index 79b4c36..8310e72 100644 --- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixBincell.java +++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixBincell.java @@ -470,8 +470,10 @@ public class LibMatrixBincell double bval = b[i]; if( bval != 0 ) { for( int j=0; j<clen; j++ ) { + double aval = a[aix+j]; + if( aval == 0 ) continue; indexes[pos] = j; - vals[pos] = a[aix+j] * bval; + vals[pos] = aval * bval; pos++; } }
