Ensure IPC imports always create an allocation map entry.
Simplifies behavior. A memory type now either always generates an
entry or never does.
Change-Id: Ie98cddea01e801308ac0ba650795fdef92b7e47d
[ROCm/ROCR-Runtime commit: 0ba9b162db]
This commit is contained in:
@@ -947,9 +947,10 @@ hsa_status_t Runtime::IPCAttach(const hsa_amd_ipc_memory_t* handle, size_t len,
|
||||
uint32_t fragOffset = 0;
|
||||
|
||||
auto fixFragment = [&]() {
|
||||
if (!isFragment) return;
|
||||
importAddress = reinterpret_cast<uint8_t*>(importAddress) + fragOffset;
|
||||
len = Min(len, importSize - fragOffset);
|
||||
if (isFragment) {
|
||||
importAddress = reinterpret_cast<uint8_t*>(importAddress) + fragOffset;
|
||||
len = Min(len, importSize - fragOffset);
|
||||
}
|
||||
ScopedAcquire<KernelSharedMutex> lock(&memory_lock_);
|
||||
allocation_map_[importAddress] = AllocationRegion(nullptr, len);
|
||||
};
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user