feature: Add Support for zeMemPutIpcHandle & zeMemGet IPC Handle converters

Related-To: LOCI-4172, LOCI-4305, LOCI-4306

- Create a new IPC Memory handle upon call to getIpcMemHandle if the
previous handle has been freed.
- Release the Ipc Memory Handle when zeMemPutIpcHandle is called.
- Create a new IPC Handle for tracking thru zeMemGetAllocProperties
when ze_external_memory_export_fd_t is used.
- Convert FD to opaque IPC handle and IPC Handle to FD.

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
This commit is contained in:
Spruit, Neil R
2023-04-07 02:57:37 +00:00
committed by Compute-Runtime-Automation
parent e2bbed2f06
commit 364c2da9fb
24 changed files with 881 additions and 13 deletions

View File

@@ -76,6 +76,8 @@ class WddmMemoryManager : public MemoryManager {
void releaseDeviceSpecificMemResources(uint32_t rootDeviceIndex) override{};
void createDeviceSpecificMemResources(uint32_t rootDeviceIndex) override{};
void registerAllocationInOs(GraphicsAllocation *allocation) override;
void closeInternalHandle(uint64_t &handle, uint32_t handleId, GraphicsAllocation *graphicsAllocation) override;
MOCKABLE_VIRTUAL NTSTATUS createInternalNTHandle(D3DKMT_HANDLE *resourceHandle, HANDLE *ntHandle, uint32_t rootDeviceIndex);
protected:
GraphicsAllocation *createGraphicsAllocation(OsHandleStorage &handleStorage, const AllocationData &allocationData) override;