This is an automated email from the ASF dual-hosted git repository.

baunsgaard 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 4e6b5d34e2 [MINOR] Parallel Binary exam sparsity
4e6b5d34e2 is described below

commit 4e6b5d34e2216724a89e20a6f33487c4c674f485
Author: Sebastian Baunsgaard <[email protected]>
AuthorDate: Mon Feb 3 15:31:41 2025 +0100

    [MINOR] Parallel Binary exam sparsity
---
 .../runtime/instructions/cp/BinaryMatrixMatrixCPInstruction.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/src/main/java/org/apache/sysds/runtime/instructions/cp/BinaryMatrixMatrixCPInstruction.java
 
b/src/main/java/org/apache/sysds/runtime/instructions/cp/BinaryMatrixMatrixCPInstruction.java
index cff0650235..2ec2303738 100644
--- 
a/src/main/java/org/apache/sysds/runtime/instructions/cp/BinaryMatrixMatrixCPInstruction.java
+++ 
b/src/main/java/org/apache/sysds/runtime/instructions/cp/BinaryMatrixMatrixCPInstruction.java
@@ -93,8 +93,10 @@ public class BinaryMatrixMatrixCPInstruction extends 
BinaryCPInstruction {
                        // Release the memory occupied by input matrices
                        ec.releaseMatrixInput(input1.getName(), 
input2.getName());
                        // Ensure right dense/sparse output representation 
(guarded by released input memory)
-                       if(checkGuardedRepresentationChange(inBlock1, inBlock2, 
retBlock))
-                               retBlock.examSparsity();
+                       if(checkGuardedRepresentationChange(inBlock1, inBlock2, 
retBlock)){
+                               int k = (_optr instanceof BinaryOperator) ? 
((BinaryOperator) _optr).getNumThreads() : 1; 
+                               retBlock.examSparsity(k);
+                       }
                }
 
                // Attach result matrix with MatrixObject associated with 
output_name

Reply via email to