Revert "SWDEV-492049 - Remove the handle of Phy Mem from Memobj" (#72)

This reverts commit dabe311bd8.

[ROCm/clr commit: 2259a8c01c]
This commit is contained in:
Godavarthy Surya, Anusha
2025-03-19 21:16:51 +05:30
committed by GitHub
orang tua 5c7c86f66d
melakukan 35a15ca3b2
2 mengubah file dengan 0 tambahan dan 6 penghapusan
@@ -2328,10 +2328,6 @@ class GraphMemAllocNode final : public GraphNode {
memory_ = getMemoryObject(dptr, offset);
// Retain memory object because command release will release it
memory_->retain();
// Remove because the entry is not needed in MemObjMap after the memory_ has been saved.
// The Phy mem obj will be saved in virtual memory object during VirtualMapCommand::submit.
amd::MemObjMap::RemoveMemObj(dptr);
size_ = aligned_size;
// Execute the original mapping command
VirtualMapCommand::submit(device);
@@ -226,8 +226,6 @@ void* MemoryPool::AllocateMemory(size_t size, Stream* stream, void* dptr) {
}
} else {
dev_ptr = memory->getSvmPtr();
if (!amd::MemObjMap::FindMemObj(dev_ptr))
amd::MemObjMap::AddMemObj(dev_ptr, memory);
}
// Place the allocated memory into the busy heap
ts.AddSafeStream(stream);