From 52ea1c1e91971d7db3e13c51ef03212d6273c403 Mon Sep 17 00:00:00 2001 From: German Andryeyev Date: Wed, 24 Feb 2021 17:27:00 -0500 Subject: [PATCH] SWDEV-272496 - Fix a regression in PAL Skip notification for markers with direct dispatch only, since they are blocking always Change-Id: I6bb17650f73371dae6e29c59fd6bb2012cc062fd [ROCm/clr commit: a9b0e20d2681836850244669ef31588c3f7a0b4f] --- projects/clr/rocclr/platform/command.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/projects/clr/rocclr/platform/command.cpp b/projects/clr/rocclr/platform/command.cpp index df0673f14a..24764754dd 100644 --- a/projects/clr/rocclr/platform/command.cpp +++ b/projects/clr/rocclr/platform/command.cpp @@ -210,11 +210,15 @@ bool Event::awaitCompletion() { return status() == CL_COMPLETE; } +// ================================================================================================ bool Event::notifyCmdQueue() { HostQueue* queue = command().queue(); if ((status() > CL_COMPLETE) && - // Don't need to send notify for notifications, which have 0 type - (command().type() != 0) && + // Don't need to notify any marker with direct dispatch, + // because all markers are blocking + (!AMD_DIRECT_DISPATCH || + ((command().type() != CL_COMMAND_MARKER) && + (command().type() != 0))) && (nullptr != queue) && !notified_.test_and_set()) { // Make sure the queue is draining the enqueued commands. amd::Command* command = new amd::Marker(*queue, false, nullWaitList, this);