diff --git a/projects/clr/rocclr/platform/commandqueue.cpp b/projects/clr/rocclr/platform/commandqueue.cpp index e575a5c649..f9df497add 100644 --- a/projects/clr/rocclr/platform/commandqueue.cpp +++ b/projects/clr/rocclr/platform/commandqueue.cpp @@ -192,12 +192,10 @@ void HostQueue::finish(bool cpu_wait) { device_.removeFromActiveQueues(this); lastEnqueueCommand_->release(); lastEnqueueCommand_ = nullptr; + vdev()->ReleaseHwQueue(); // we can only release HwQueue when no commmand in quque. } } } - // Release HW queue to the pool for dynamic management if enabled - vdev()->ReleaseHwQueue(); - command->release(); ClPrint(LOG_DEBUG, LOG_CMD, "All commands finished for host queue : %p", this); }