This is an automated email from the ASF dual-hosted git repository.
mboehm7 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/systemds.git
The following commit(s) were added to refs/heads/main by this push:
new 3e1eeb534d [SYSTEMDS-3769] Fix sparse-dense matrix multiplication edge
cases
3e1eeb534d is described below
commit 3e1eeb534d18a11fef634bbb2c42c78b45683400
Author: Matthias Boehm <[email protected]>
AuthorDate: Fri Sep 13 15:36:23 2024 +0200
[SYSTEMDS-3769] Fix sparse-dense matrix multiplication edge cases
This patch fixes index-out-of-bounds issues of our LibMatrixMult for
parallel sparse-dense operations with 13x8K mm 8Kx1 matrices which
uses a matrix-vector multiplication kernel that does not support pm2
parallelization (where we parallelize over the rhs matrix).
---
src/main/java/org/apache/sysds/runtime/matrix/data/LibMatrixMult.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/src/main/java/org/apache/sysds/runtime/matrix/data/LibMatrixMult.java
b/src/main/java/org/apache/sysds/runtime/matrix/data/LibMatrixMult.java
index 3ea882abe3..061c09ea3d 100644
--- a/src/main/java/org/apache/sysds/runtime/matrix/data/LibMatrixMult.java
+++ b/src/main/java/org/apache/sysds/runtime/matrix/data/LibMatrixMult.java
@@ -4332,7 +4332,7 @@ public class LibMatrixMult
//parallelize over rows in rhs matrix if number of rows in
lhs/output is very small
double jvmMem = InfrastructureAnalyzer.getLocalMaxMemory();
return (m1.rlen==1 && !(m1.isUltraSparse()||m2.isUltraSparse()))
- || (m1.rlen<=16 && m2.rlen > m1.rlen
+ || (m1.rlen<=16 && m2.rlen > m1.rlen && (!m1.sparse |
m2.clen > 1)
&& ( !m1.isUltraSparse() && !(m1.sparse & m2.sparse)
) //dense-dense / sparse-dense / dense-sparse
&& (long)k * 8 * m1.rlen * m2.clen <
Math.max(MEM_OVERHEAD_THRESHOLD,0.01*jvmMem) );
}