Skip to content

[UR][L0v2] Fork-join pattern#22333

Draft
KFilipek wants to merge 3 commits into
intel:syclfrom
KFilipek:worktree-urt-1059-fork-join
Draft

[UR][L0v2] Fork-join pattern#22333
KFilipek wants to merge 3 commits into
intel:syclfrom
KFilipek:worktree-urt-1059-fork-join

Conversation

@KFilipek

Copy link
Copy Markdown
Contributor

The L0v2 out-of-order queue uses 4 command list managers but records graph capture only on manager 0. Two paths broke the fork-join pattern:

  1. Routing — getNextCommandListId() round-robined operations to an arbitrary command list. An op waiting on an event from a capturing queue could land on a non-capture list, escaping
    capture, so queueIsGraphCaptureEnabledExp returned false. Fixed by routing such ops to the capture command list when any wait event comes from a capturing queue.
  2. Barrier — enqueueEventsWaitWithBarrier() cross-links all command lists via per-list barrier events. During capture this would fork the other lists without joining them back, producing a
    capture error. Fixed by applying the barrier on the capture list only while capture is active.

Removes the UUR_KNOWN_FAILURE_ON(LevelZeroV2) guard from the ForkJoinPattern conformance test.

@KFilipek KFilipek marked this pull request as ready for review June 22, 2026 12:48
@KFilipek KFilipek requested review from a team as code owners June 22, 2026 12:48
if (srcQueue->queueIsGraphCapteEnabledExp(&srcCaptureActive) ==
UR_RESULT_SUCCESS &&
srcCaptureActive) {
return captureCmdListManagerIdx;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't update the state of the out-of-order queue. Looking at the Record&Replay docs, I believe the secondary command list should temporarily enter the capturing state until the primary cmd list stopped recording via creating a graph.
Your current implementation ensures that only the operations with an event dependency from the primary queue would end up in the correct cmd list. Subsequent operations to secondary queue might not have the event dependancies, but they should also be recorded. Secondary queue exits temporary recording state when the primary queue finishes the graph.

@KFilipek KFilipek force-pushed the worktree-urt-1059-fork-join branch from be5b21e to ebf611a Compare June 23, 2026 13:22
@KFilipek KFilipek marked this pull request as draft June 23, 2026 13:30
KFilipek added 2 commits June 23, 2026 16:18
Route operations waiting on an event from a capturing queue to the capture
command list instead of an arbitrary one, so the fork is recorded.
Avoids forking the other command lists, which would never join back.
@KFilipek KFilipek force-pushed the worktree-urt-1059-fork-join branch 2 times, most recently from 49d0b8c to 3b32879 Compare June 24, 2026 08:19
@KFilipek KFilipek force-pushed the worktree-urt-1059-fork-join branch from 3b32879 to 581b5f4 Compare June 24, 2026 10:59
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