Skip to content

[UR] Add IPC event-sharing API to inter-process communication extension#22366

Open
againull wants to merge 3 commits into
experimental-oneapi-spec-reusable-events_mirrorfrom
ur-spec-ipc-events
Open

[UR] Add IPC event-sharing API to inter-process communication extension#22366
againull wants to merge 3 commits into
experimental-oneapi-spec-reusable-events_mirrorfrom
ur-spec-ipc-events

Conversation

@againull

@againull againull commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Define UR APIs for sharing event objects between processes.

  • Added the IPC_EVENT_SUPPORT_EXP device info query.
  • Extended ur_exp_event_flags_t (from the reusable events extension) with
    UR_EXP_EVENT_FLAG_IPC_EXP, requested via ur_exp_event_desc_t::flags at
    urEventCreateExp time so SYCL's enable_ipc property can be expressed.
  • Added urIPCGetEventHandleExp / urIPCPutEventHandleExp /
    urIPCOpenEventHandleExp.

Sharing is bidirectional: an event opened with urIPCOpenEventHandleExp shares
state with the source event, so a state change made through either event is
observable through the other and either event can be signaled, waited on, or
queried. Events created with profiling/timestamping enabled cannot be shared.

The event returned by urIPCOpenEventHandleExp is a normal ur_event_handle_t
released through urEventRelease; there is no separate IPC event close entry
point. Although Level Zero exposes zeEventCounterBasedCloseIpcHandle, a dedicated
UR close API would add a second public release path for the same handle and
break the uniform reference-counted lifetime of UR events. The adapter instead
records that the event was opened from an IPC handle and, on the final
urEventRelease, selects the IPC-specific native teardown rather than the normal
event cleanup path.

Assisted-By: Claude

againull added 3 commits June 18, 2026 15:37
Define UR APIs for sharing event objects between processes.

  * Added the IPC_EVENT_SUPPORT_EXP device info query.
  * Extended ur_exp_event_flags_t (from the reusable events extension) with
    UR_EXP_EVENT_FLAG_IPC_EXP, requested via ur_exp_event_desc_t::flags at
    urEventCreateExp time so SYCL's enable_ipc property can be expressed.
  * Added urIPCGetEventHandleExp / urIPCPutEventHandleExp /
    urIPCOpenEventHandleExp.

Sharing is bidirectional: an event opened with urIPCOpenEventHandleExp shares
state with the source event, so a state change made through either event is
observable through the other and either event can be signaled, waited on, or
queried. Events created with profiling/timestamping enabled cannot be shared.

The event returned by urIPCOpenEventHandleExp is a normal ur_event_handle_t
released through urEventRelease; there is no separate IPC event close entry
point. Although Level Zero exposes zeEventCounterBasedCloseIpcHandle, a dedicated
UR close API would add a second public release path for the same handle and
break the uniform reference-counted lifetime of UR events. The adapter instead
records that the event was opened from an IPC handle and, on the final
urEventRelease, selects the IPC-specific native teardown rather than the normal
event cleanup path.

This commit updates only the yml definitions and rst documentation.

Assisted-By: Claude
@againull againull marked this pull request as ready for review June 19, 2026 06:19
@againull againull requested review from a team as code owners June 19, 2026 06:20
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.

2 participants