From 40e6b4c6850d8097a0cf8404c567b94632e8b0af 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 [ROCm/clr commit: c5184d61b42ef2bd276d70e631fa4535e2200ef9] --- projects/clr/rocclr/platform/command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/clr/rocclr/platform/command.cpp b/projects/clr/rocclr/platform/command.cpp index e7a7e109bb..3930b9694a 100644 --- a/projects/clr/rocclr/platform/command.cpp +++ b/projects/clr/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) {