Record interop mapped object in allocation_map_
This allows the VA to be recorded in ROCr so that they are not
treated as an invalid pointer in future API calls.
Change-Id: I8d1d8ef9816a984c89d30a2179b0ce8940fef1da
[ROCm/ROCR-Runtime commit: f2006d6899]
Αυτή η υποβολή περιλαμβάνεται σε:
υποβλήθηκε από
David Yat Sin
γονέας
c85e1dc4cd
υποβολή
a0ebf06e6e
@@ -833,6 +833,10 @@ hsa_status_t Runtime::InteropMap(uint32_t num_agents, Agent** agents,
|
|||||||
*size = info.SizeInBytes;
|
*size = info.SizeInBytes;
|
||||||
*ptr = info.MemoryAddress;
|
*ptr = info.MemoryAddress;
|
||||||
|
|
||||||
|
ScopedAcquire<KernelSharedMutex> lock(&memory_lock_);
|
||||||
|
allocation_map_[info.MemoryAddress] = AllocationRegion(
|
||||||
|
nullptr, info.SizeInBytes, info.SizeInBytes, core::MemoryRegion::AllocateNoFlags);
|
||||||
|
|
||||||
return HSA_STATUS_SUCCESS;
|
return HSA_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Αναφορά σε νέο ζήτημα
Block a user