Skip to content

Commit 6edd3c8

Browse files
committed
address comments
Signed-off-by: Sergey V Maslov <[email protected]>
1 parent 90792cd commit 6edd3c8

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

sycl/doc/extensions/LevelZeroBackend/LevelZeroBackend.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ backend_input_t<backend::ext_oneapi_level_zero,
101101
struct {
102102
ze_context_handle_t NativeHandle;
103103
std::vector<device> DeviceList;
104-
ext::oneapi::level_zero::ownership Ownership;
104+
ext::oneapi::level_zero::ownership Ownership{
105+
ext::oneapi::level_zero::ownership::transfer};
105106
}
106107
```
107108
</td>
@@ -113,7 +114,8 @@ struct {
113114
``` C++
114115
struct {
115116
ze_command_queue_handle_t NativeHandle;
116-
ext::oneapi::level_zero::ownership Ownership;
117+
ext::oneapi::level_zero::ownership Ownership{
118+
ext::oneapi::level_zero::ownership::transfer};
117119
}
118120
```
119121
</td>
@@ -125,7 +127,8 @@ struct {
125127
``` C++
126128
struct {
127129
ze_event_handle_t NativeHandle;
128-
ext::oneapi::level_zero::ownership Ownership;
130+
ext::oneapi::level_zero::ownership Ownership{
131+
ext::oneapi::level_zero::ownership::transfer};
129132
}
130133
```
131134
</td>
@@ -142,7 +145,8 @@ std::vector<ze_module_handle_t>
142145
``` C++
143146
struct {
144147
ze_module_handle_t NativeHandle;
145-
ext::oneapi::level_zero::ownership Ownership;
148+
ext::oneapi::level_zero::ownership Ownership{
149+
ext::oneapi::level_zero::ownership::transfer};
146150
}
147151
```
148152
</td>
@@ -234,7 +238,20 @@ make_kernel_bundle<backend::ext_oneapi_level_zero,
234238
const context &Context)
235239
```
236240
</td>
237-
<td>Constructs a SYCL kernel_bundle instance from a Level-Zero <code>ze_module_handle_t</code>. The <code>Context</code> argument must be a valid SYCL context encapsulating a Level-Zero context. The Level-Zero module should be created on the same context. The Level-Zero module must be fully linked (i.e. not require further linking through <a href="https://spec.oneapi.com/level-zero/latest/core/api.html?highlight=zemoduledynamiclink#_CPPv419zeModuleDynamicLink8uint32_tP18ze_module_handle_tP28ze_module_build_log_handle_t"><code>zeModuleDynamicLink</code></a>), and thus the SYCL kernel_bundle is created in the "executable" state. The <code>Ownership</code> input structure member specifies if the SYCL runtime should take ownership of the passed native handle. The default behavior is to transfer the ownership to the SYCL runtime. See section 4.4 for details. If the behavior is "transfer" then runtime is going to destroy the input Level-Zero module, and hence the application must not to have any outstanding <code>ze_kernel_handle_t</code> handles to the underlying <code>ze_module_handle_t</code> by the time this interoperability <code>kernel_bundle</code> destructor is called.</td>
241+
<td>Constructs a SYCL kernel_bundle instance from a Level-Zero
242+
<code>ze_module_handle_t</code>. The <code>Context</code> argument must be a
243+
valid SYCL context encapsulating a Level-Zero context, and the Level-Zero
244+
module must be created on the same context. The Level-Zero module must be
245+
fully linked (i.e. not require further linking through <a href="https://spec.oneapi.com/level-zero/latest/core/api.html?highlight=zemoduledynamiclink#_CPPv419zeModuleDynamicLink8uint32_tP18ze_module_handle_tP28ze_module_build_log_handle_t">
246+
<code>zeModuleDynamicLink</code></a>), and thus the SYCL kernel_bundle is
247+
created in the "executable" state. The <code>Ownership</code> input structure
248+
member specifies if the SYCL runtime should take ownership of the passed
249+
native handle. The default behavior is to transfer the ownership to the SYCL
250+
runtime. See section 4.4 for details. If the behavior is "transfer" then the
251+
runtime is going to destroy the input Level-Zero module, and hence the
252+
application must not to have any outstanding <code>ze_kernel_handle_t</code>
253+
handles to the underlying <code>ze_module_handle_t</code> by the time this
254+
interoperability <code>kernel_bundle</code> destructor is called.</td>
238255
</tr>
239256
</table>
240257

0 commit comments

Comments
 (0)