Skip to content

Commit 2259a8c

Browse files
author
Godavarthy Surya, Anusha
authored
Revert "SWDEV-492049 - Remove the handle of Phy Mem from Memobj" (#72)
This reverts commit 231b241.
1 parent 2896798 commit 2259a8c

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

hipamd/src/hip_graph_internal.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2328,10 +2328,6 @@ class GraphMemAllocNode final : public GraphNode {
23282328
memory_ = getMemoryObject(dptr, offset);
23292329
// Retain memory object because command release will release it
23302330
memory_->retain();
2331-
2332-
// Remove because the entry is not needed in MemObjMap after the memory_ has been saved.
2333-
// The Phy mem obj will be saved in virtual memory object during VirtualMapCommand::submit.
2334-
amd::MemObjMap::RemoveMemObj(dptr);
23352331
size_ = aligned_size;
23362332
// Execute the original mapping command
23372333
VirtualMapCommand::submit(device);

hipamd/src/hip_mempool_impl.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,6 @@ void* MemoryPool::AllocateMemory(size_t size, Stream* stream, void* dptr) {
226226
}
227227
} else {
228228
dev_ptr = memory->getSvmPtr();
229-
if (!amd::MemObjMap::FindMemObj(dev_ptr))
230-
amd::MemObjMap::AddMemObj(dev_ptr, memory);
231229
}
232230
// Place the allocated memory into the busy heap
233231
ts.AddSafeStream(stream);

0 commit comments

Comments
 (0)