Revert "Release host buffers after segment freeze."

This reverts commit 03a52655a8.

Change-Id: Idc7e568b2b54a226dbe4d189b25a78be3bd16eea
This commit is contained in:
Sean Keely
2022-04-11 20:41:25 -05:00
parent 4e9849034d
commit b3caf6782b
@@ -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();