You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by ni...@apache.org on 2018/09/17 18:14:05 UTC
systemml git commit: [SYSTEMML-445] Acquire read lock before copying
from host to device
Repository: systemml
Updated Branches:
refs/heads/master 4d8df33cc -> 1d2f4b630
[SYSTEMML-445] Acquire read lock before copying from host to device
Project: http://git-wip-us.apache.org/repos/asf/systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/systemml/commit/1d2f4b63
Tree: http://git-wip-us.apache.org/repos/asf/systemml/tree/1d2f4b63
Diff: http://git-wip-us.apache.org/repos/asf/systemml/diff/1d2f4b63
Branch: refs/heads/master
Commit: 1d2f4b630ebf800be5009b182880b03682077ccd
Parents: 4d8df33
Author: Niketan Pansare <np...@us.ibm.com>
Authored: Mon Sep 17 11:12:26 2018 -0700
Committer: Niketan Pansare <np...@us.ibm.com>
Committed: Mon Sep 17 11:12:26 2018 -0700
----------------------------------------------------------------------
.../apache/sysml/runtime/instructions/gpu/context/GPUObject.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/systemml/blob/1d2f4b63/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUObject.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUObject.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUObject.java
index 1564f48..552ee3b 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUObject.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUObject.java
@@ -570,6 +570,7 @@ public class GPUObject {
LOG.trace("GPU : acquireDeviceRead on " + this);
}
boolean transferred = false;
+ addReadLock();
if (!isAllocated()) {
if(LOG.isTraceEnabled()) {
LOG.trace("GPU : in acquireDeviceRead, data is not allocated, copying from host, on " + this + ", GPUContext="
@@ -578,7 +579,6 @@ public class GPUObject {
copyFromHostToDevice(opcode);
transferred = true;
}
- addReadLock();
if (!isAllocated())
throw new DMLRuntimeException("Expected device data to be allocated");
return transferred;