Skip to content

[UR][L0v2] Add graph support for batched queue#21324

Draft
KFilipek wants to merge 13 commits intointel:syclfrom
KFilipek:07-graph_for_batched
Draft

[UR][L0v2] Add graph support for batched queue#21324
KFilipek wants to merge 13 commits intointel:syclfrom
KFilipek:07-graph_for_batched

Conversation

@KFilipek
Copy link
Copy Markdown
Contributor

This PR adds support for graph capture and execution in the Level Zero v2 batched queue implementation.

Changes:

  • Add command list determination mechanism that switches between immediate and regular command lists based on graph
    capture state
  • Implement previously unsupported graph API methods:
    • queueBeginGraphCapteExp() - begin graph capture
    • queueBeginCapteIntoGraphExp() - begin capture into existing graph
    • queueEndGraphCapteExp() - end graph capture
    • queueIsGraphCapteEnabledExp() - check capture status
    • enqueueGraphExp() - execute captured graph
  • Update operations to use appropriate command list and event pool during graph capture

@KFilipek KFilipek requested a review from a team as a code owner February 19, 2026 13:07
@KFilipek KFilipek marked this pull request as draft February 19, 2026 13:07
@KFilipek KFilipek self-assigned this Feb 19, 2026
@KFilipek KFilipek force-pushed the 07-graph_for_batched branch from 560edb4 to 7c9779b Compare February 19, 2026 13:12
@KFilipek KFilipek force-pushed the 07-graph_for_batched branch from 09eaf7d to 2200aa5 Compare February 20, 2026 10:43
@KFilipek KFilipek force-pushed the 07-graph_for_batched branch from 2200aa5 to 3f6298f Compare February 20, 2026 10:53
Comment thread unified-runtime/source/adapters/level_zero/v2/queue_batched.cpp
Comment thread unified-runtime/source/adapters/level_zero/v2/queue_batched.cpp Outdated
Comment thread unified-runtime/source/adapters/level_zero/v2/queue_batched.hpp
Comment thread unified-runtime/source/adapters/level_zero/v2/queue_batched.cpp Outdated
Comment thread unified-runtime/source/adapters/level_zero/v2/queue_batched.cpp Outdated
Comment thread unified-runtime/source/adapters/level_zero/v2/queue_batched.cpp Outdated
Comment thread unified-runtime/source/adapters/level_zero/v2/queue_batched.hpp
Comment thread unified-runtime/source/adapters/level_zero/v2/queue_batched.cpp Outdated
Comment thread unified-runtime/source/adapters/level_zero/v2/queue_batched.hpp Outdated
Comment thread unified-runtime/source/adapters/level_zero/v2/queue_batched.hpp Outdated
Comment thread unified-runtime/source/adapters/level_zero/v2/queue_batched.hpp Outdated
@KFilipek KFilipek force-pushed the 07-graph_for_batched branch 2 times, most recently from cb286b4 to 375088d Compare April 13, 2026 10:36
@KFilipek
Copy link
Copy Markdown
Contributor Author

Rebased

@KFilipek KFilipek force-pushed the 07-graph_for_batched branch from 375088d to a1f61c9 Compare April 15, 2026 09:46
@KFilipek KFilipek force-pushed the 07-graph_for_batched branch from 6a3c0a3 to dd7775c Compare April 16, 2026 11:07
Before beginning graph capture, enqueue the current batch (regular command
list) to preserve operation order. This ensures the queue is empty before
switching to immediate list mode for graph capture, similar to command
buffer handling.

Apply to both queueBeginGraphCapteExp and queueBeginCapteIntoGraphExp.
During graph capture, operations are recorded to the immediate command
list. Synchronization and flushing operations don't apply to graph
recording, so return early when graph capture is active.

Also added a clarifying comment in queueIsGraphCapteEnabledExp about
the returned command list.
This ensures consistency with other enqueue methods and provides proper
context for event handling during graph capture.
@KFilipek KFilipek force-pushed the 07-graph_for_batched branch 5 times, most recently from d5e9643 to 781af05 Compare April 17, 2026 14:31
@KFilipek KFilipek requested a review from a team as a code owner April 17, 2026 14:31
Comment thread .github/workflows/ur-precommit.yml Dismissed
Comment thread .github/workflows/ur-precommit.yml Dismissed
Comment thread .github/workflows/ur-precommit.yml Dismissed
Comment thread .github/workflows/ur-precommit.yml Outdated
@KFilipek KFilipek force-pushed the 07-graph_for_batched branch from 781af05 to 57feff1 Compare April 17, 2026 14:37
@KFilipek KFilipek marked this pull request as draft April 17, 2026 14:38
@KFilipek KFilipek force-pushed the 07-graph_for_batched branch from 57feff1 to b6e8727 Compare April 17, 2026 14:58
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.

6 participants