diff --git a/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp b/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp index 32b8ac9e8f..46a7af0b11 100644 --- a/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp +++ b/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp @@ -234,6 +234,9 @@ GpuAgent::~GpuAgent() { hsaKmtFreeMemory(scratch_pool_.base(), scratch_pool_.size()); } + for (int i = 0; i < QueueCount; i++) + queues_[i].reset(); + system_deallocator()(doorbell_queue_map_); if (trap_code_buf_ != NULL) {