P4 to Git Change 1788615 by cpaquot@cpaquot-ocl-lc-lnx on 2019/05/28 18:54:55

SWDEV-190565 - [HIP] Allow null stream as argument to hipStreamWaitEvent.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_context.cpp#19 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_stream.cpp#19 edit
This commit is contained in:
foreman
2019-05-28 19:06:58 -04:00
parent 60bfcb7d64
commit 397ad08fae
2 changed files with 17 additions and 13 deletions
+5 -1
View File
@@ -188,7 +188,11 @@ hipError_t hipStreamDestroy(hipStream_t stream) {
hipError_t hipStreamWaitEvent(hipStream_t stream, hipEvent_t event, unsigned int flags) {
HIP_INIT_API(stream, event, flags);
if (stream == nullptr || event == nullptr) {
if (stream == nullptr) {
stream = reinterpret_cast<hipStream_t>(as_cl(hip::getNullStream()));
}
if (event == nullptr) {
HIP_RETURN(hipErrorInvalidResourceHandle);
}