From 7b3dbd6d9e0af80c03b2f72b659b45f67f8a2303 Mon Sep 17 00:00:00 2001 From: Shweta Khatri Date: Fri, 16 Feb 2024 12:31:15 -0500 Subject: [PATCH] Avoid releasing scratch for blit queues At hsa_shutdown(), scratch_lock_ may be gone. Blit queues don't need it. Change-Id: Ic132ac8a6be31fb2f0623137115608b0b222f077 [ROCm/ROCR-Runtime commit: 24633c7a850a7802b9312287b92c615cf07699f6] --- .../runtime/hsa-runtime/core/runtime/amd_aql_queue.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_aql_queue.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_aql_queue.cpp index fd2891531f..da1cf091b1 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_aql_queue.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_aql_queue.cpp @@ -363,8 +363,9 @@ AqlQueue::~AqlQueue() { } Inactivate(); - agent_->ReleaseQueueMainScratch(queue_scratch_); - agent_->ReleaseQueueAltScratch(queue_scratch_); + + if (queue_scratch_.main_queue_base) agent_->ReleaseQueueMainScratch(queue_scratch_); + if (queue_scratch_.alt_queue_base) agent_->ReleaseQueueAltScratch(queue_scratch_); FreeRegisteredRingBuffer(); exception_signal_->DestroySignal();