This is an automated email from the ASF dual-hosted git repository.
mboehm7 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/systemds.git
The following commit(s) were added to refs/heads/master by this push:
new 59267c9 [SYSTEMDS-3091] Fix performance federated ctable (sparse
accumulation)
59267c9 is described below
commit 59267c983bc7632f7c779618f4824114dd6ff4e4
Author: ywcb00 <[email protected]>
AuthorDate: Fri Aug 13 23:35:15 2021 +0200
[SYSTEMDS-3091] Fix performance federated ctable (sparse accumulation)
Closes #1362.
---
.../sysds/runtime/instructions/fed/CtableFEDInstruction.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
a/src/main/java/org/apache/sysds/runtime/instructions/fed/CtableFEDInstruction.java
b/src/main/java/org/apache/sysds/runtime/instructions/fed/CtableFEDInstruction.java
index a5f81f1..a7d4cb6 100644
---
a/src/main/java/org/apache/sysds/runtime/instructions/fed/CtableFEDInstruction.java
+++
b/src/main/java/org/apache/sysds/runtime/instructions/fed/CtableFEDInstruction.java
@@ -197,7 +197,7 @@ public class CtableFEDInstruction extends
ComputationFEDInstruction {
continue;
// check intersect with AND and compare number
of nnz
- MatrixBlock prevExtend = new
MatrixBlock(curr.getNumRows(), curr.getNumColumns(), 0.0);
+ MatrixBlock prevExtend = new
MatrixBlock(curr.getNumRows(), curr.getNumColumns(), true, 0);
prevExtend.copy(0, prev.getNumRows()-1, 0,
prev.getNumColumns()-1, prev, true);
MatrixBlock intersect =
curr.binaryOperationsInPlace(new BinaryOperator(And.getAndFnObject()),
prevExtend);
@@ -240,7 +240,7 @@ public class CtableFEDInstruction extends
ComputationFEDInstruction {
}
private static MatrixBlock aggResult(Future<FederatedResponse>[] ffr) {
- MatrixBlock resultBlock = new MatrixBlock(1, 1, 0);
+ MatrixBlock resultBlock = new MatrixBlock(1, 1, true, 0);
int dim1 = 0, dim2 = 0;
for(int i = 0; i < ffr.length; i++) {
try {
@@ -249,10 +249,10 @@ public class CtableFEDInstruction extends
ComputationFEDInstruction {
dim2 = mb.getNumColumns() > dim2 ?
mb.getNumColumns() : dim2;
// set next and prev to same output dimensions
- MatrixBlock prev = new MatrixBlock(dim1, dim2,
0.0);
+ MatrixBlock prev = new MatrixBlock(dim1, dim2,
true, 0);
prev.copy(0, resultBlock.getNumRows()-1, 0,
resultBlock.getNumColumns()-1, resultBlock, true);
- MatrixBlock next = new MatrixBlock(dim1, dim2,
0.0);
+ MatrixBlock next = new MatrixBlock(dim1, dim2,
true, 0);
next.copy(0, mb.getNumRows()-1, 0,
mb.getNumColumns()-1, mb, true);
// add worker results