No-Op for allow access on imported IPC

If hsa_amd_agents_allow_access is called for an imported IPC handle,
ignore the request as this pointer will already have these pointers
mapped to other GPUs during IPCAttach()

Change-Id: I4bf33ed57e93b5a3ead749d4f87ab6f2750bed58
Šī revīzija ir iekļauta:
David Yat Sin
2022-10-25 22:38:47 +00:00
vecāks 18547173e9
revīzija b4f26534eb
@@ -555,6 +555,12 @@ hsa_status_t Runtime::AllowAccess(uint32_t num_agents,
}
amd_region = reinterpret_cast<const AMD::MemoryRegion*>(it->second.region);
// Imported IPC handle entries inside allocation_map_ do not have an amd_region because they
// were allocated in the other process. Access is already granted during IPCAttach().
if (!amd_region)
return HSA_STATUS_SUCCESS;
alloc_size = it->second.size;
}