1+ #
2+ # Copyright (C) 2025 Intel Corporation
3+ #
4+ # Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
5+ # See LICENSE.TXT
6+ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7+ #
8+ # See YaML.md for syntax definition
9+ #
10+ # TODO:
11+ # ZE_RESULT_ERROR_INVALID_GRAPH
12+ # ZE_RESULT_QUERY_TRUE
13+ # ZE_RESULT_QUERY_FALSE
14+ #
15+ --- # --------------------------------------------------------------------------
16+ type : header
17+ desc : " Intel $OneApi Unified Runtime Experimental APIs for Graph Record and Replay"
18+ --- # --------------------------------------------------------------------------
19+ type : handle
20+ desc : " Handle of record & replay graph object"
21+ class : $xGraph
22+ name : " $x_exp_graph_handle_t"
23+ --- # --------------------------------------------------------------------------
24+ type : handle
25+ desc : " Handle of record & replay executable graph object"
26+ class : $xGraph
27+ name : " $x_exp_executable_graph_handle_t"
28+ --- # --------------------------------------------------------------------------
29+ type : function
30+ desc : " Create a new record & replay graph instance explicitly."
31+ class : $xGraph
32+ name : CreateExp
33+ decl : static
34+ details :
35+ - " Create a new record & replay graph instance explicitly."
36+ params :
37+ - type : $x_context_handle_t
38+ name : hContext
39+ desc : " [in] Handle of the context object."
40+ - type : $x_exp_graph_handle_t*
41+ name : phGraph
42+ desc : " [out] Pointer to the handle of the created graph object."
43+ - type : void*
44+ name : pNext
45+ desc : " [out] pointer to extension-specific structure."
46+ returns :
47+ - $X_RESULT_SUCCESS
48+ - $X_RESULT_ERROR_INVALID_ARGUMENT
49+ --- # ------------------------------------------k--------------------------------
50+ type : function
51+ desc : " Begin graph capture on the specified immediate command list."
52+ class : $xQueue
53+ name : BeginGraphCaptureExp
54+ params :
55+ - type : $x_queue_handle_t
56+ name : hQueue
57+ desc : " [in] Handle of the queue on which to begin graph capture."
58+ - type : void*
59+ name : pNext
60+ desc : " [in][optional] pointer to extension-specific structure."
61+ returns :
62+ - $X_RESULT_SUCCESS
63+ - $X_RESULT_ERROR_INVALID_ARGUMENT
64+ --- # --------------------------------------------------------------------------
65+ type : function
66+ desc : " Begin capturing commands into an existing graph on the specified immediate command list."
67+ class : $xQueue
68+ name : BeginCaptureIntoGraphExp
69+ params :
70+ - type : $x_queue_handle_t
71+ name : hQueue
72+ desc : " [in] Handle of the queue on which to begin graph capture."
73+ - type : $x_exp_graph_handle_t
74+ name : hGraph
75+ desc : " [in] Handle of the graph object to capture into."
76+ - type : void*
77+ name : pNext
78+ desc : " [in][optional] pointer to extension-specific structure."
79+ returns :
80+ - $X_RESULT_SUCCESS
81+ - $X_RESULT_ERROR_INVALID_ARGUMENT
82+ --- # --------------------------------------------------------------------------
83+ type : function
84+ desc : " End graph capture on the specified immediate command list."
85+ class : $xQueue
86+ name : EndGraphCaptureExp
87+ params :
88+ - type : $x_queue_handle_t
89+ name : hQueue
90+ desc : " [in] Handle of the queue on which to end graph capture."
91+ - type : $x_exp_graph_handle_t*
92+ name : phGraph
93+ desc : " [out] Pointer to the handle of the captured graph object."
94+ - type : void*
95+ name : pNext
96+ desc : " [out][optional] pointer to extension-specific structure."
97+ returns :
98+ - $X_RESULT_SUCCESS
99+ - $X_RESULT_ERROR_INVALID_ARGUMENT
100+ --- # --------------------------------------------------------------------------
101+ type : function
102+ desc : " Instantiate an executable graph from a recorded graph."
103+ class : $xQueue
104+ name : InstantiateGraphExp
105+ params :
106+ - type : $x_exp_graph_handle_t
107+ name : hGraph
108+ desc : " [in] Handle of the recorded graph to instantiate."
109+ - type : $x_exp_executable_graph_handle_t*
110+ name : phExecutableGraph
111+ desc : " [out] Pointer to the handle of the instantiated executable graph."
112+ - type : void*
113+ name : pNext
114+ desc : " [out][optional] pointer to extension-specific structure."
115+ returns :
116+ - $X_RESULT_SUCCESS
117+ - $X_RESULT_ERROR_INVALID_ARGUMENT
118+ --- # --------------------------------------------------------------------------
119+ type : function
120+ desc : " Append an executable graph to the queue."
121+ class : $xQueue
122+ name : AppendGraphExp
123+ params :
124+ - type : $x_queue_handle_t
125+ name : hQueue
126+ desc : " [in] Handle of the queue to append the graph to."
127+ - type : $x_exp_executable_graph_handle_t
128+ name : hGraph
129+ desc : " [in] Handle of the executable graph to append."
130+ - type : void*
131+ name : pNext
132+ desc : " [in][optional] pointer to extension-specific structure."
133+ - type : $x_event_handle_t
134+ name : hSignalEvent
135+ desc : " [in][optional] Event to be signaled on completion."
136+ - type : uint32_t
137+ name : numWaitEvents
138+ desc : " [in][optional] Number of events to wait on before executing."
139+ - type : $x_event_handle_t*
140+ name : phWaitEvents
141+ desc : " [in][optional][range(0, numWaitEvents)] Pointer to an array of events to wait on."
142+ returns :
143+ - $X_RESULT_SUCCESS
144+ - $X_RESULT_ERROR_INVALID_ARGUMENT
145+ --- # --------------------------------------------------------------------------
146+ type : function
147+ desc : " Destroy a recorded graph object."
148+ class : $xGraph
149+ name : DestroyExp
150+ params :
151+ - type : $x_exp_graph_handle_t
152+ name : hGraph
153+ desc : " [in] Handle of the graph object to destroy."
154+ returns :
155+ - $X_RESULT_SUCCESS
156+ - $X_RESULT_ERROR_INVALID_ARGUMENT
157+ --- # --------------------------------------------------------------------------
158+ type : function
159+ desc : " Destroy an instantiated executable graph object."
160+ class : $xGraph
161+ name : ExecutableGraphDestroyExp
162+ params :
163+ - type : $x_exp_executable_graph_handle_t
164+ name : hExecutableGraph
165+ desc : " [in] Handle of the executable graph object to destroy."
166+ returns :
167+ - $X_RESULT_SUCCESS
168+ - $X_RESULT_ERROR_INVALID_ARGUMENT
169+ --- # --------------------------------------------------------------------------
170+ type : function
171+ desc : " Query whether graph capture is currently enabled on the given queue."
172+ class : $xQueue
173+ name : IsGraphCaptureEnabledExp
174+ params :
175+ - type : $x_queue_handle_t
176+ name : hQueue
177+ desc : " [in] Native queue to query."
178+ - type : bool*
179+ name : hResult
180+ desc : " [out] Pointer to a boolean where the result will be stored."
181+ returns :
182+ - $X_RESULT_SUCCESS
183+ - $X_RESULT_ERROR_INVALID_ARGUMENT
184+ --- # --------------------------------------------------------------------------
185+ type : function
186+ desc : " Return whether the given recorded graph contains any nodes."
187+ class : $xGraph
188+ name : IsEmptyExp
189+ params :
190+ - type : $x_exp_graph_handle_t
191+ name : hGraph
192+ desc : " [in] Handle of the graph to query."
193+ returns :
194+ - $X_RESULT_ERROR_OUT_OF_HOST_MEMORY
195+ - $X_RESULT_ERROR_OUT_OF_RESOURCES
196+ --- # --------------------------------------------------------------------------
197+ type : function
198+ desc : " Dump the contents of the recorded graph to the provided file path."
199+ class : $xGraph
200+ name : DumpContentsExp
201+ params :
202+ - type : $x_exp_graph_handle_t
203+ name : hGraph
204+ desc : " [in] Handle of the graph to dump."
205+ - type : const char*
206+ name : filePath
207+ desc : " [in] Path to the file to write the dumped graph contents."
208+ - type : void*
209+ name : pNext
210+ desc : " [in][optional] pointer to extension-specific structure."
211+ returns :
212+ - $X_RESULT_ERROR_INVALID_VALUE
213+ - $X_RESULT_ERROR_OUT_OF_HOST_MEMORY
214+ - $X_RESULT_ERROR_OUT_OF_RESOURCES
0 commit comments