From 77ff1613247c542974312ea09f0c011663d1b206 Mon Sep 17 00:00:00 2001 From: German Andryeyev Date: Fri, 21 Feb 2020 16:43:21 -0500 Subject: [PATCH] SWDEV-193956 - [hipclang-vdi-rocm][perf] Retain command before a wait. Change-Id: I0ab8f1352af32c96567dad9e31b3687bdf407bf6 --- rocclr/platform/commandqueue.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rocclr/platform/commandqueue.cpp b/rocclr/platform/commandqueue.cpp index 63252fb455..2cc9a75078 100644 --- a/rocclr/platform/commandqueue.cpp +++ b/rocclr/platform/commandqueue.cpp @@ -88,9 +88,10 @@ bool HostQueue::terminate() { void HostQueue::finish() { Command* command = nullptr; if (IS_HIP) { - command = getLastQueuedCommand(false); + command = getLastQueuedCommand(true); if (nullptr != command) { command->awaitCompletion(); + command->release(); } } if (nullptr == command) {