Repository: systemml Updated Branches: refs/heads/master 97f684d2b -> 111b29787
[SYSTEMML-2382] Fix robustness sparse-dense matrix mult (special case) This patch fixes runtime failures of sparse-dense block matrix multiplication for the special case of short left-hand-side inputs with sparsity skew or short right-hand-side. The issue showed up for cases where the row lower bound (wrt right-hand-side) of a thread was larger than the maximum non-zero column index. Project: http://git-wip-us.apache.org/repos/asf/systemml/repo Commit: http://git-wip-us.apache.org/repos/asf/systemml/commit/111b2978 Tree: http://git-wip-us.apache.org/repos/asf/systemml/tree/111b2978 Diff: http://git-wip-us.apache.org/repos/asf/systemml/diff/111b2978 Branch: refs/heads/master Commit: 111b29787dc458c0926afc43e1b8235f2b87d06e Parents: 97f684d Author: Matthias Boehm <mboe...@gmail.com> Authored: Mon Jun 11 19:52:39 2018 -0700 Committer: Matthias Boehm <mboe...@gmail.com> Committed: Mon Jun 11 19:52:39 2018 -0700 ---------------------------------------------------------------------- .../java/org/apache/sysml/runtime/matrix/data/LibMatrixMult.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/systemml/blob/111b2978/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixMult.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixMult.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixMult.java index 31f827b..0545ff0 100644 --- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixMult.java +++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixMult.java @@ -1301,7 +1301,7 @@ public class LibMatrixMult int k2 = (ru==cd) ? alen : a.posFIndexGTE(i, ru); k2 = (k2>=0) ? apos+k2 : apos+alen; - if( k1==k2 || b.isContiguous(aix[k1], aix[k2-1]) ) { + if( k1<apos+alen && b.isContiguous(aix[k1], aix[k2-1]) ) { double[] bvals = b.values(aix[k1]); int base = aix[k1]*n - b.pos(aix[k1]); //rest not aligned to blocks of 4 rows