Revert "SWDEV-492049 - Remove the handle of Phy Mem from Memobj" (#72)
This reverts commitdabe311bd8. [ROCm/clr commit:2259a8c01c]
This commit is contained in:
committed by
GitHub
orang tua
5c7c86f66d
melakukan
35a15ca3b2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user