From 821a1d89b023ec4368ccfd3c9df27eee2d6f6945 Mon Sep 17 00:00:00 2001 From: "Patel, Jaydeepkumar" Date: Wed, 25 Jun 2025 20:59:17 +0530 Subject: [PATCH] SWDEV-536226 - Avoid waiting for lastCommand completion if GPU has already reported an error otherwise it causes hang due to status of cmd is not becoming CL_COMPLETE. (#478) [ROCm/clr commit: a60212b9b47cc5f05421d8078fb467d7b41b6e46] --- projects/clr/rocclr/platform/commandqueue.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/clr/rocclr/platform/commandqueue.cpp b/projects/clr/rocclr/platform/commandqueue.cpp index 1e150f08c7..1f47483bdd 100644 --- a/projects/clr/rocclr/platform/commandqueue.cpp +++ b/projects/clr/rocclr/platform/commandqueue.cpp @@ -79,7 +79,9 @@ bool HostQueue::terminate() { lastCommand = command; } } - lastCommand->awaitCompletion(); + if (device_.gpu_error_ == CL_SUCCESS) { + lastCommand->awaitCompletion(); + } // Note that if lastCommand isn't a marker, it may not be lastEnqueueCommand_ now // after lastCommand->awaitCompletion() is called. if (lastEnqueueCommand_ != nullptr) {