Skip to content

[DEBUG] Devel#22092

Draft
ldorau wants to merge 4 commits into
intel:syclfrom
ldorau:IPC_ldorau
Draft

[DEBUG] Devel#22092
ldorau wants to merge 4 commits into
intel:syclfrom
ldorau:IPC_ldorau

Conversation

@ldorau
Copy link
Copy Markdown
Contributor

@ldorau ldorau commented May 22, 2026

No description provided.

@ldorau ldorau force-pushed the IPC_ldorau branch 7 times, most recently from 5ea25c6 to e3e9186 Compare May 27, 2026 11:13
ldorau added 4 commits May 27, 2026 11:47
Add four new function specs to exp-inter-process-communication.yml
and update registry.yml to support IPC operations on physical memory
objects:
- urIPCGetPhysMemHandleExp: export an IPC handle for a physical_mem
- urIPCPutPhysMemHandleExp: release the exported IPC handle
- urIPCOpenPhysMemHandleExp: import an IPC handle into a physical_mem
- urIPCClosePhysMemHandleExp: close the imported physical_mem

Also add ENABLE_IPC flag to ur_physical_mem_flags_t in virtual_memory.yml
to allow allocating physical memory that can be shared via IPC handles.

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Add auto-generated files based on the IPC physical_mem spec changes
(urIPCGetPhysMemHandleExp, urIPCPutPhysMemHandleExp,
urIPCOpenPhysMemHandleExp, urIPCClosePhysMemHandleExp,
UR_PHYSICAL_MEM_FLAG_ENABLE_IPC, UR_DEVICE_INFO_IPC_PHYSICAL_MEMORY_SUPPORT_EXP):

- ur_api.h, ur_api_funcs.def, ur_ddi.h: function declarations
- ur_print.h/hpp, ur_print.cpp: printing support
- ur_api.cpp: API dispatch stubs
- ur_ldrddi.cpp, ur_libapi.cpp: loader implementations
- ur_trcddi.cpp, ur_valddi.cpp: tracing and validation layers
- ur_mockddi.cpp: mock adapter
- loader.def.in, loader.map.in: loader symbol exports
- level_zero ur_interface_loader.cpp/.hpp: Level-Zero DDI table entries
- opencl common.hpp: updated generated include
- urinfo.hpp: updated urinfo tool

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Implement urIPCGetPhysMemHandleExp, urIPCPutPhysMemHandleExp,
urIPCOpenPhysMemHandleExp, and urIPCClosePhysMemHandleExp across all
adapters.

Level Zero adapter (full implementation, Linux only):
- physical_mem.hpp: extend ur_physical_mem_handle_t_ with Device, Size,
  EnableIpc fields; add ZeIPCPhysMemHandleData struct (pid + DMA-BUF fd
  + size) for cross-process handle exchange via pidfd_getfd(2)
- physical_mem.cpp: chain ze_external_memory_export_desc_t in
  urPhysicalMemCreate when ENABLE_IPC flag is set; extend
  urPhysicalMemGetInfo to return context, device, size and properties;
  implement the four IPC functions using ZeIPCPhysMemHandleData
- memory.cpp, v2/memory.cpp: add physical_mem.hpp and Linux syscall
  includes needed by physical_mem.cpp
- device.cpp: report UR_DEVICE_INFO_IPC_PHYSICAL_MEMORY_SUPPORT_EXP
  as true on Linux, false on Windows

Other adapters (CUDA, HIP, OpenCL, Native CPU, Offload):
- Return UR_RESULT_ERROR_UNSUPPORTED_FEATURE from all four functions
- Register function pointers in ur_interface_loader.cpp
- Report UR_DEVICE_INFO_IPC_PHYSICAL_MEMORY_SUPPORT_EXP as false

Conformance tests:
- Add urIPCGetPhysMemHandleExp.cpp, urIPCPutPhysMemHandleExp.cpp,
  urIPCOpenPhysMemHandleExp.cpp, urIPCClosePhysMemHandleExp.cpp
  with shared fixtures in urIPCPhysMemHandleExpFixtures.hpp
- Update urPhysicalMemCreate.cpp to cover the ENABLE_IPC flag

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant