Stream thread-safe checkpoint.

Moving data structures to critical / protected section.
此提交包含在:
Ben Sander
2016-03-28 09:46:40 -05:00
父節點 4f8786c66a
當前提交 6cab7862ae
共有 5 個檔案被更改,包括 171 行新增 和 129 行删除
+3 -3
查看文件
@@ -82,7 +82,7 @@ hipError_t hipStreamWaitEvent(hipStream_t stream, hipEvent_t event, unsigned int
// TODO-hcc Convert to use create_blocking_marker(...) functionality.
// Currently we have a super-conservative version of this - block on host, and drain the queue.
// This should create a barrier packet in the target queue.
stream->wait();
stream->locked_wait();
e = hipSuccess;
}
@@ -101,7 +101,7 @@ hipError_t hipStreamSynchronize(hipStream_t stream)
ihipDevice_t *device = ihipGetTlsDefaultDevice();
device->locked_syncDefaultStream(true/*waitOnSelf*/);
} else {
stream->wait();
stream->locked_wait();
e = hipSuccess;
}
@@ -125,7 +125,7 @@ hipError_t hipStreamDestroy(hipStream_t stream)
ihipDevice_t *device = ihipGetTlsDefaultDevice();
device->locked_syncDefaultStream(true/*waitOnSelf*/);
} else {
stream->wait();
stream->locked_wait();
e = hipSuccess;
}