From 23fc10365213df4aa1d79abb6374a0bd069cc342 Mon Sep 17 00:00:00 2001 From: German Date: Fri, 21 Oct 2022 11:17:41 -0400 Subject: [PATCH] SWDEV-363602 - Notify cmd queue about callback wait Remove extra barrier, since ROCR backend in DD mode blocks HW queue now when a callback is injected Add a notificaiton for MT mode about possible waiter for a callback Change-Id: Ifd70ce5597e1ba868e4197ad1850ace11a4f90ae [ROCm/clr commit: 413cc757af90653329ea6ef93621ad23d5a17017] --- projects/clr/hipamd/src/hip_stream.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/projects/clr/hipamd/src/hip_stream.cpp b/projects/clr/hipamd/src/hip_stream.cpp index 1896ae3c10..b47ed8fa26 100644 --- a/projects/clr/hipamd/src/hip_stream.cpp +++ b/projects/clr/hipamd/src/hip_stream.cpp @@ -587,17 +587,10 @@ hipError_t streamCallback_common(hipStream_t stream, StreamCallback* cbo, void* if (last_command != nullptr) { last_command->release(); } - // Add the new barrier to stall the stream, until the callback is done - eventWaitList.clear(); - eventWaitList.push_back(command); - amd::Command* block_command = new amd::Marker(*hostQueue, !kMarkerDisableFlush, eventWaitList); - if (block_command == nullptr) { - return hipErrorInvalidValue; - } - block_command->enqueue(); - block_command->release(); // Release the callback marker command->release(); + // Notify the command queue about a possible waiter for the calback + command->notifyCmdQueue(); return hipSuccess; }