From 23e7e7a9de5e6bb6ede25082d1575c69dda65587 Mon Sep 17 00:00:00 2001 From: foreman Date: Mon, 19 Nov 2018 15:46:09 -0500 Subject: [PATCH] P4 to Git Change 1709028 by skudchad@skudchad_test2_win_opencl on 2018/11/19 15:15:09 SWDEV-145570 - [HIP] Fix a bug in event tracking ReviewBoardURL = http://ocltc.amd.com/reviews/r/16182/diff/ Affected files ... ... //depot/stg/opencl/drivers/opencl/api/hip/hip_event.cpp#8 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/commandqueue.cpp#29 edit [ROCm/clr commit: 271ec46a6b0d5c9593686e8e4590c33ff6d0650a] --- projects/clr/hipamd/api/hip/hip_event.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/clr/hipamd/api/hip/hip_event.cpp b/projects/clr/hipamd/api/hip/hip_event.cpp index 0bde2150f8..317e0edc90 100644 --- a/projects/clr/hipamd/api/hip/hip_event.cpp +++ b/projects/clr/hipamd/api/hip/hip_event.cpp @@ -142,6 +142,11 @@ hipError_t hipEventRecord(hipEvent_t event, hipStream_t stream) { amd::Command* command = e->stream_->getLastQueuedCommand(true); + if (command == nullptr) { + command = new amd::Marker(*e->stream_, true); + command->enqueue(); + } + if (e->event_ != nullptr) { e->event_->release(); }