SWDEV-311270 - Add IPC support for memory pools

Initial implementation for hipMemPoolExportToShareableHandle,
hipMemPoolImportFromShareableHandle,
hipMemPoolExportPointer and hipMemPoolImportPointer

Change-Id: I0ebdc48e9163b394ded560adca6c38bbc5aee7d1


[ROCm/clr commit: 1a0c3e4dc4]
This commit is contained in:
German
2023-06-06 16:56:09 -04:00
committed by German Andryeyev
orang tua d6086f9d69
melakukan af5944dc71
13 mengubah file dengan 454 tambahan dan 40 penghapusan
@@ -1535,6 +1535,14 @@ void SvmBuffer::memFill(void* dst, const void* src, size_t srcSize, size_t times
}
}
// ================================================================================================
bool SvmBuffer::malloced(const void* ptr) { return Contains(reinterpret_cast<uintptr_t>(ptr)); }
// ================================================================================================
void IpcBuffer::initDeviceMemory() {
deviceMemories_ =
reinterpret_cast<DeviceMemory*>(reinterpret_cast<char*>(this) + sizeof(IpcBuffer));
memset(deviceMemories_, 0, NumDevicesWithP2P() * sizeof(DeviceMemory));
}
} // namespace amd