From fefdc97c2aecae69298473649612390dcda857cc Mon Sep 17 00:00:00 2001 From: Saleel Kudchadker Date: Mon, 6 Apr 2020 16:46:50 -0500 Subject: [PATCH] Revert "Wake up commandQueue before returning" This reverts commit 67c6b46cf0e1dcf3e0a1a60066ce3274a507a3ae. Reason for revert: German advised againt this change. Change-Id: Ia1b1b9db60c965b2d9c006bd7d20012a9d7697e1 [ROCm/clr commit: 1b46f2622bfea304e3680c6e0f2b26052d3aceb6] --- projects/clr/hipamd/vdi/hip_event.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/projects/clr/hipamd/vdi/hip_event.cpp b/projects/clr/hipamd/vdi/hip_event.cpp index 6219f0c948..677becd67e 100644 --- a/projects/clr/hipamd/vdi/hip_event.cpp +++ b/projects/clr/hipamd/vdi/hip_event.cpp @@ -95,20 +95,12 @@ hipError_t Event::elapsedTime(Event& eStop, float& ms) { } hipError_t Event::streamWait(amd::HostQueue* hostQueue, uint flags) { - // Effective no-op if event is NULL - if (event_ == nullptr) { + if ((event_ == nullptr) || (event_->command().queue() == hostQueue)) { return hipSuccess; } amd::ScopedLock lock(lock_); - - if (event_->command().queue() == hostQueue) { - // Wake up commandQueue thread - if (!event_->notifyCmdQueue()) { - return hipErrorLaunchOutOfResources; - } - return hipSuccess; - } + bool retain = false; if (!event_->notifyCmdQueue()) { return hipErrorLaunchOutOfResources;