Skip to content

Commit 4e6b5d3

Browse files
committed
[MINOR] Parallel Binary exam sparsity
1 parent ebe758d commit 4e6b5d3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/org/apache/sysds/runtime/instructions/cp/BinaryMatrixMatrixCPInstruction.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,10 @@ public void processInstruction(ExecutionContext ec) {
9393
// Release the memory occupied by input matrices
9494
ec.releaseMatrixInput(input1.getName(), input2.getName());
9595
// Ensure right dense/sparse output representation (guarded by released input memory)
96-
if(checkGuardedRepresentationChange(inBlock1, inBlock2, retBlock))
97-
retBlock.examSparsity();
96+
if(checkGuardedRepresentationChange(inBlock1, inBlock2, retBlock)){
97+
int k = (_optr instanceof BinaryOperator) ? ((BinaryOperator) _optr).getNumThreads() : 1;
98+
retBlock.examSparsity(k);
99+
}
98100
}
99101

100102
// Attach result matrix with MatrixObject associated with output_name

0 commit comments

Comments
 (0)