From 0587fb7450057f63a7d427110a754051f369c6d0 Mon Sep 17 00:00:00 2001 From: German Andryeyev Date: Fri, 19 Feb 2021 16:15:54 -0500 Subject: [PATCH] SWDEV-272496 - Disable notification for the previous notify Direct disaptch doesn't insert extra barriers for Markers if AQL barrier was the last issued command already. Change-Id: I00fbc658547d83dd3ee64ec391ed50e5f8a08e30 --- rocclr/platform/command.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rocclr/platform/command.cpp b/rocclr/platform/command.cpp index 8bd79a8cc1..13f8428e3c 100644 --- a/rocclr/platform/command.cpp +++ b/rocclr/platform/command.cpp @@ -220,7 +220,10 @@ bool Event::awaitCompletion() { Command* Event::notifyCmdQueue(bool retain) { HostQueue* queue = command().queue(); - if ((status() > CL_COMPLETE) && (NULL != queue) && !notified_.test_and_set()) { + if ((status() > CL_COMPLETE) && + // Don't need to send notify for notifications, which have 0 type + (command().type() != 0) && + (nullptr != queue) && !notified_.test_and_set()) { // Make sure the queue is draining the enqueued commands. amd::Command* internalCommand = new amd::Marker(*queue, false, nullWaitList, this); if (internalCommand == NULL) {