Skip to content

[SYCL][Graph] Introduce native recording mode feature#21626

Open
adamfidel wants to merge 65 commits intointel:syclfrom
adamfidel:pablo/graph-native-recording-prototype-v2-rebase
Open

[SYCL][Graph] Introduce native recording mode feature#21626
adamfidel wants to merge 65 commits intointel:syclfrom
adamfidel:pablo/graph-native-recording-prototype-v2-rebase

Conversation

@adamfidel
Copy link
Copy Markdown
Member

Native recording enables SYCL Graph to directly leverage the new Unified Runtime graph API (and thus the native backend graph API, e.g. level zero graph) during record-and-replay, rather than going through Unified Runtime’s Command-Buffer abstraction. When native recording is enabled, all commands, whether submitted via SYCL or directly via a backend such as level zero, are captured by the backend and finalized into an executable native graph.

It is enabled with a new enable_native_recording property being passed to the property list.

exp_ext::command_graph graph{
    queue.get_context(), queue.get_device(),
    {exp_ext::property::graph::enable_native_recording{}}};

There are some functional limitations of the native mode, which are outlined in the changes to the SYCL Graph spec in PR #21616.

Related PRs:

@adamfidel adamfidel requested review from a team as code owners March 25, 2026 14:20
@adamfidel adamfidel force-pushed the pablo/graph-native-recording-prototype-v2-rebase branch from bf2fe13 to 23784d7 Compare March 25, 2026 21:31
Comment on lines 53 to 58
if (queueType == QUEUE_IMMEDIATE) {
zeFlags |= ZEX_COUNTER_BASED_EVENT_FLAG_IMMEDIATE;
} else {
zeFlags |= ZEX_COUNTER_BASED_EVENT_FLAG_NON_IMMEDIATE;
}
// Always set non immediate flag for compatibility with graph record & replay
zeFlags |= ZEX_COUNTER_BASED_EVENT_FLAG_NON_IMMEDIATE;

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.

We should check if this doesn't have performance implications for the eager path. I suggest creating a draft PR with just this change and running perf CI.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I made a draft PR for this change at #21662.

@mmichel11
Copy link
Copy Markdown
Contributor

Can you update the feature test macro to 2 to align with the spec change?

adamfidel and others added 3 commits April 1, 2026 13:17
- async memory allocs now throw invalid instead of feature_not_supported
- throw for get_nodes / get_root_nodes in native mode
- throw if a command with buffers is enqueued
Co-authored-by: Matthew Michel <matthew.michel@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.

7 participants