Stream thread-safe checkpoint.

Moving data structures to critical / protected section.


[ROCm/hip commit: 3f18bab2c7]
This commit is contained in:
Ben Sander
2016-03-28 09:46:40 -05:00
parent 0f11beb328
commit 9e3ac64c54
5 changed files with 171 additions and 129 deletions
+2 -5
View File
@@ -307,17 +307,14 @@ hipError_t hipMemcpy(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind
hipError_t e = hipSuccess;
try {
stream->copySync(dst, src, sizeBytes, kind);
stream->locked_copySync(dst, src, sizeBytes, kind);
}
catch (ihipException ex) {
e = ex._code;
}
if (HIP_LAUNCH_BLOCKING) {
tprintf(DB_SYNC, "LAUNCH_BLOCKING for completion of hipMemcpy\n");
stream->wait();
}
return ihipLogStatus(e);
}