From 4223d3ecb4d056043acde3c47347cfd97e4ed57a Mon Sep 17 00:00:00 2001 From: Sourabh Betigeri Date: Thu, 18 Mar 2021 10:34:54 -0700 Subject: [PATCH] SWDEV-274727 - The callback associated with the event was being processed after the event is destroyed. Commit after resolving merge conflict. Change-Id: Ia7383c83318ca0c2a4f21f7aaf22b1cebd828cf0 --- tests/src/runtimeApi/event/hipEventIpc.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/src/runtimeApi/event/hipEventIpc.cpp b/tests/src/runtimeApi/event/hipEventIpc.cpp index bd8db4c9f2..d63482a6ca 100644 --- a/tests/src/runtimeApi/event/hipEventIpc.cpp +++ b/tests/src/runtimeApi/event/hipEventIpc.cpp @@ -96,9 +96,10 @@ int main(int argc, char* argv[]) { HIPCHECK(hipEventSynchronize(ipc_event)); - HIPCHECK(hipEventDestroy(ipc_event)); + HIPCHECK(hipMemcpy(C_h, C_d, Nbytes, hipMemcpyDeviceToHost)); #ifndef __HIP_PLATFORM_AMD__ + HIPCHECK(hipEventDestroy(ipc_event)); HIPCHECK(hipEventDestroy(start)); HIPCHECK(hipEventDestroy(stop)); #endif @@ -113,6 +114,7 @@ int main(int argc, char* argv[]) { // happen in above hipMemcpy(). If hipEventInterprocess is officially // implemented, we should revisit here and move these back to match cuda // event behavior. + HIPCHECK(hipEventDestroy(ipc_event)); HIPCHECK(hipEventDestroy(start)); HIPCHECK(hipEventDestroy(stop)); #endif