Skip to content

Commit 589649b

Browse files
committed
Completed implementation
1 parent be721e5 commit 589649b

File tree

2 files changed

+120
-12
lines changed

2 files changed

+120
-12
lines changed

unified-runtime/scripts/core/common.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,9 @@ etors:
284284
desc: "Device in question has `$X_DEVICE_INFO_AVAILABLE == false`"
285285
- name: ERROR_INVALID_SPEC_ID
286286
desc: "A specialization constant identifier is not valid."
287+
- name: ERROR_INVALID_GRAPH
288+
value: "0x7fff0002"
289+
desc: "A graph object is not valid."
287290
- name: ERROR_UNKNOWN
288291
value: "0x7ffffffe"
289292
desc: "Unknown or internal error"

unified-runtime/scripts/core/exp-graph.yml

Lines changed: 117 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
#
88
# See YaML.md for syntax definition
99
#
10+
# TODO:
11+
# ZE_RESULT_ERROR_INVALID_GRAPH
12+
# ZE_RESULT_QUERY_TRUE
13+
# ZE_RESULT_QUERY_FALSE
14+
#
1015
--- #--------------------------------------------------------------------------
1116
type: header
1217
desc: "Intel $OneApi Unified Runtime Experimental APIs for Graph Record and Replay"
@@ -39,7 +44,104 @@ params:
3944
name: pNext
4045
desc: "[out] pointer to extension-specific structure."
4146
returns:
42-
- $X_RESULT_ERROR_OUT_OF_RESOURCES
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
43145
--- #--------------------------------------------------------------------------
44146
type: function
45147
desc: "Destroy a recorded graph object."
@@ -50,8 +152,8 @@ params:
50152
name: hGraph
51153
desc: "[in] Handle of the graph object to destroy."
52154
returns:
53-
- $X_RESULT_ERROR_OUT_OF_HOST_MEMORY
54-
- $X_RESULT_ERROR_OUT_OF_RESOURCES
155+
- $X_RESULT_SUCCESS
156+
- $X_RESULT_ERROR_INVALID_ARGUMENT
55157
--- #--------------------------------------------------------------------------
56158
type: function
57159
desc: "Destroy an instantiated executable graph object."
@@ -62,20 +164,23 @@ params:
62164
name: hExecutableGraph
63165
desc: "[in] Handle of the executable graph object to destroy."
64166
returns:
65-
- $X_RESULT_ERROR_OUT_OF_HOST_MEMORY
66-
- $X_RESULT_ERROR_OUT_OF_RESOURCES
167+
- $X_RESULT_SUCCESS
168+
- $X_RESULT_ERROR_INVALID_ARGUMENT
67169
--- #--------------------------------------------------------------------------
68170
type: function
69-
desc: "Query whether graph capture is currently enabled on the given command-list."
70-
class: $xCommandList
171+
desc: "Query whether graph capture is currently enabled on the given queue."
172+
class: $xQueue
71173
name: IsGraphCaptureEnabledExp
72174
params:
73-
- type: $x_command_list_handle_t
74-
name: hCommandList
75-
desc: "[in] Native command list to query."
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."
76181
returns:
77-
- $X_RESULT_ERROR_OUT_OF_HOST_MEMORY
78-
- $X_RESULT_ERROR_OUT_OF_RESOURCES
182+
- $X_RESULT_SUCCESS
183+
- $X_RESULT_ERROR_INVALID_ARGUMENT
79184
--- #--------------------------------------------------------------------------
80185
type: function
81186
desc: "Return whether the given recorded graph contains any nodes."

0 commit comments

Comments
 (0)