From c5184d61b42ef2bd276d70e631fa4535e2200ef9 Mon Sep 17 00:00:00 2001 From: Jason Tang Date: Wed, 7 Oct 2020 17:20:20 -0400 Subject: [PATCH] SWDEV-252150 - No need to send a Marker if the event is completed in Event::notifyCmdQueue() Change-Id: Iaa1c550ce0849c12298a24812604345dbf877a5e --- rocclr/platform/command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rocclr/platform/command.cpp b/rocclr/platform/command.cpp index e7a7e109bb..3930b9694a 100644 --- a/rocclr/platform/command.cpp +++ b/rocclr/platform/command.cpp @@ -212,7 +212,7 @@ bool Event::awaitCompletion() { bool Event::notifyCmdQueue() { HostQueue* queue = command().queue(); - if ((NULL != queue) && !notified_.test_and_set()) { + if ((status() > CL_COMPLETE) && (NULL != queue) && !notified_.test_and_set()) { // Make sure the queue is draining the enqueued commands. amd::Command* command = new amd::Marker(*queue, false, nullWaitList, this); if (command == NULL) {