Skip to content

Commit 91c7814

Browse files
committed
fix threadpool allocation in RMM decompression
1 parent 825f834 commit 91c7814

File tree

2 files changed

+11
-20
lines changed

2 files changed

+11
-20
lines changed

src/main/java/org/apache/sysds/runtime/compress/lib/CLALibDecompress.java

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ private static MatrixBlock decompressExecute(CompressedMatrixBlock cmb, int k) {
237237
if(ret.isInSparseFormat())
238238
decompressSparseSingleThread(ret, filteredGroups, nRows, blklen);
239239
else
240-
decompressDenseSingleThread(ret, filteredGroups, nRows, blklen, constV, eps, nonZeros, overlapping);
240+
decompressDenseSingleThread(ret, filteredGroups, nRows, blklen, constV, eps, overlapping);
241241
}
242242
else if(ret.isInSparseFormat())
243243
decompressSparseMultiThread(ret, filteredGroups, nRows, blklen, k);
@@ -294,7 +294,7 @@ private static void decompressSparseSingleThread(MatrixBlock ret, List<AColGroup
294294
}
295295

296296
private static void decompressDenseSingleThread(MatrixBlock ret, List<AColGroup> filteredGroups, int rlen,
297-
int blklen, double[] constV, double eps, long nonZeros, boolean overlapping) {
297+
int blklen, double[] constV, double eps, boolean overlapping) {
298298

299299
final DenseBlock db = ret.getDenseBlock();
300300
final int nCol = ret.getNumColumns();
@@ -308,21 +308,19 @@ private static void decompressDenseSingleThread(MatrixBlock ret, List<AColGroup>
308308
}
309309
}
310310

311-
// private static void decompressDenseMultiThread(MatrixBlock ret, List<AColGroup> groups, double[] constV, int k,
312-
// boolean overlapping) {
313-
// final int nRows = ret.getNumRows();
314-
// final double eps = getEps(constV);
315-
// final int blklen = Math.max(nRows / k, 512);
316-
// decompressDenseMultiThread(ret, groups, nRows, blklen, constV, eps, k, overlapping);
317-
// }
318-
319-
protected static void decompressDenseMultiThread(MatrixBlock ret, List<AColGroup> groups, double[] constV,
311+
public static void decompressDense(MatrixBlock ret, List<AColGroup> groups, double[] constV,
320312
double eps, int k, boolean overlapping) {
321313

322314
Timing time = new Timing(true);
323315
final int nRows = ret.getNumRows();
324316
final int blklen = Math.max(nRows / k, 512);
325-
decompressDenseMultiThread(ret, groups, nRows, blklen, constV, eps, k, overlapping);
317+
if( k > 1)
318+
decompressDenseMultiThread(ret, groups, nRows, blklen, constV, eps, k, overlapping);
319+
else
320+
decompressDenseSingleThread(ret, groups, nRows, blklen, constV, eps, overlapping);
321+
322+
ret.recomputeNonZeros(k);
323+
326324
if(DMLScript.STATISTICS) {
327325
final double t = time.stop();
328326
DMLCompressionStatistics.addDecompressTime(t, k);

src/main/java/org/apache/sysds/runtime/compress/lib/CLALibRightMultBy.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,15 +189,8 @@ private static MatrixBlock RMM(CompressedMatrixBlock m1, MatrixBlock that, int k
189189
constV = mmTemp.isEmpty() ? null : mmTemp.getDenseBlockValues();
190190
}
191191

192-
final Timing time = new Timing(true);
193-
194192
ret = asyncRet(f);
195-
CLALibDecompress.decompressDenseMultiThread(ret, retCg, constV, 0, k, true);
196-
197-
if(DMLScript.STATISTICS) {
198-
final double t = time.stop();
199-
DMLCompressionStatistics.addDecompressTime(t, k);
200-
}
193+
CLALibDecompress.decompressDense(ret, retCg, constV, 0, k, true);
201194

202195
return ret;
203196
}

0 commit comments

Comments
 (0)