From 6622fe0163541c6227a09cb689d9d424947a0d61 Mon Sep 17 00:00:00 2001 From: Sean Keely Date: Mon, 11 Apr 2022 20:41:25 -0500 Subject: [PATCH] Revert "Release host buffers after segment freeze." This reverts commit cf3f4416250a3b8f75c76a88fa2a7c3f0c163e62. Change-Id: Idc7e568b2b54a226dbe4d189b25a78be3bd16eea [ROCm/ROCR-Runtime commit: b3caf6782b91108e7bf912869c5e310ee66aa5f6] --- .../runtime/hsa-runtime/core/runtime/amd_loader_context.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_loader_context.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_loader_context.cpp index ad3d7ad831..72c71fa5fc 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_loader_context.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_loader_context.cpp @@ -358,10 +358,6 @@ bool RegionMemory::Freeze() { memcpy(ptr_, host_ptr_, size_); } - // Free host buffer - HSA::hsa_memory_free(host_ptr_); - host_ptr_ = nullptr; - // Invalidate agent caches which may hold lines of the new allocation. if (is_code_ && (region_->owner()->device_type() == core::Agent::kAmdGpuDevice)) ((AMD::GpuAgent*)region_->owner())->InvalidateCodeCaches();