From b3caf6782b91108e7bf912869c5e310ee66aa5f6 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 03a52655a83af14f0b80023df711a33cec420a0b. Change-Id: Idc7e568b2b54a226dbe4d189b25a78be3bd16eea --- runtime/hsa-runtime/core/runtime/amd_loader_context.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/runtime/hsa-runtime/core/runtime/amd_loader_context.cpp b/runtime/hsa-runtime/core/runtime/amd_loader_context.cpp index ad3d7ad831..72c71fa5fc 100644 --- a/runtime/hsa-runtime/core/runtime/amd_loader_context.cpp +++ b/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();