From bbef85714ec31829cdc737aaa8b5aa5e4e7a960a Mon Sep 17 00:00:00 2001 From: Saleel Kudchadker Date: Thu, 27 Jun 2024 01:09:31 +0000 Subject: [PATCH] SWDEV-470008 - Fix AMD_SERIALIZE_KERNEL - awaitCompletion code may do a endless spin wait for cases where we dont submit a handler. One such case can be the hipExt*Launch API which takes a stop event. In that case we optimize the stop event by attaching a signal to the dispatch packet but dont submit a handler when we attach the signal. That means if awaitCompletion() is called after that, we would keep on waiting on command status on the host rather than simply checking signal value. Change-Id: Ie8bf175aeefa3f9e4299b1ae7ae9108dad67e283 [ROCm/clr commit: 561fb8a45979ffb0a1fabaebaedaff864d93b8cd] --- 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 9829290b02..2c98c4563d 100644 --- a/projects/clr/rocclr/platform/command.cpp +++ b/projects/clr/rocclr/platform/command.cpp @@ -388,7 +388,7 @@ void Command::enqueue() { if ((queue_->device().settings().waitCommand_ && (type_ != 0)) || ((commandWaitBits_ & 0x2) != 0)) { - awaitCompletion(); + queue_->finish(); } // set this queue status is active