This is an automated email from the ASF dual-hosted git repository.
markd 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 7901109 [MINOR][BUGFIX] Correctly counting device to host transfers
if dense pointer was cleared along the way
7901109 is described below
commit 79011098016d5f35259edd2b204c313f1cd852c5
Author: Mark Dokter <[email protected]>
AuthorDate: Sat Apr 17 00:42:53 2021 +0200
[MINOR][BUGFIX] Correctly counting device to host transfers if dense
pointer was cleared along the way
---
.../apache/sysds/runtime/instructions/gpu/context/GPUObject.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git
a/src/main/java/org/apache/sysds/runtime/instructions/gpu/context/GPUObject.java
b/src/main/java/org/apache/sysds/runtime/instructions/gpu/context/GPUObject.java
index df8e2c0..829f953 100644
---
a/src/main/java/org/apache/sysds/runtime/instructions/gpu/context/GPUObject.java
+++
b/src/main/java/org/apache/sysds/runtime/instructions/gpu/context/GPUObject.java
@@ -935,7 +935,9 @@ public class GPUObject {
mat.release();
return;
}
-
+ boolean sparse = false;
+ if(isDensePointerNull())
+ sparse = true;
MatrixBlock tmp = null;
long start = DMLScript.STATISTICS ? System.nanoTime() : 0;
if (!isDensePointerNull()) {
@@ -965,7 +967,7 @@ public class GPUObject {
if (DMLScript.STATISTICS && !isEviction) {
// Eviction time measure in malloc
long totalTime = System.nanoTime() - start;
- int count = !isDensePointerNull() ? 1 : 3;
+ int count = sparse ? 3 : 1;
GPUStatistics.cudaFromDevTime.add(totalTime);
GPUStatistics.cudaFromDevCount.add(count);
}