From 911a2f42c1094454ede11a4af57ea21842333749 Mon Sep 17 00:00:00 2001 From: cfreeamd <166262151+cfreeamd@users.noreply.github.com> Date: Fri, 17 Oct 2025 10:36:06 -0500 Subject: [PATCH] Revert "rocr: Don't assert in hsa_shut_down when no agents (#1115)" (#1312) This reverts commit fb8ab442b68cb3715c5580caab8e03bb383237fd. --- .../rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp index da7be89994..518b7f125b 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp @@ -2316,12 +2316,12 @@ void Runtime::Unload() { mapped_handle_map_.clear(); memory_handle_map_.clear(); + DestroyAgents(); + CloseTools(); AMD::Unload(); - DestroyAgents(); - DestroyDrivers(); thunkLoader_->DestroyThunkInstance();