From e81be86a311d632144cb37a2e146579fd3f42e95 Mon Sep 17 00:00:00 2001 From: Honglei Huang Date: Tue, 24 Jun 2025 13:54:38 +0800 Subject: [PATCH] rocr: use driver interface for scratch memory deallocation Replace direct hsaKmtFreeMemory call with driver's FreeMemory interface in GpuAgent::ReleaseResources(). This change improves code abstraction by handling memory deallocation through the unified driver interface. Signed-off-by: Honglei Huang [ROCm/ROCR-Runtime commit: 8216787d4cd1397dcb45145fd68be1474bc851c4] --- .../runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp index 9d687df62f..9a0c621672 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp @@ -929,7 +929,7 @@ void GpuAgent::ReleaseResources() { scratch_cache_.free_reserve(); if (scratch_pool_.base() != NULL) { - HSAKMT_CALL(hsaKmtFreeMemory(scratch_pool_.base(), scratch_pool_.size())); + driver().FreeMemory(scratch_pool_.base(), scratch_pool_.size()); } for (int i = 0; i < QueueCount; i++)