[SYCL][Graph] Introduce native recording mode feature#21626
Open
adamfidel wants to merge 61 commits intointel:syclfrom
Open
[SYCL][Graph] Introduce native recording mode feature#21626adamfidel wants to merge 61 commits intointel:syclfrom
adamfidel wants to merge 61 commits intointel:syclfrom
Conversation
Co-authored-by: Wang, Zhiming <zhiming.wang@intel.com>
* add empty method on graph * applied review comments * windows ABI update * Linux ABI change
* Add native recording print graph functionality * Update doxygen comment for print graph Co-authored-by: Adam Fidel <adam.fidel@intel.com> --------- Co-authored-by: Adam Fidel <adam.fidel@intel.com>
Co-authored-by: Adam Fidel <adam.fidel@intel.com>
bf2fe13 to
23784d7
Compare
slawekptak
reviewed
Mar 26, 2026
| DeviceImpl.getHandleRef(), | ||
| UR_DEVICE_INFO_GRAPH_RECORD_AND_REPLAY_SUPPORT_EXP, | ||
| sizeof(ur_bool_t), &SupportsGraphRecordReplay, nullptr); | ||
| if (Result == UR_RESULT_SUCCESS && !SupportsGraphRecordReplay) { |
Contributor
There was a problem hiding this comment.
Do we need to handle an error here?
| }; | ||
|
|
||
| /// Get whether native recording is enabled for this graph. | ||
| /// @return True if native recording is enabled, false otherwise. |
Contributor
There was a problem hiding this comment.
Missing param description.
pbalcer
reviewed
Mar 26, 2026
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; | ||
|
|
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-Bufferabstraction. 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_recordingproperty 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:
empty()to the graph: [SYCL][GRAPH] Add empty method on graph #21554