Commit 255c3f1
Ewan Crawford
[SYCL] Bump native enqueue extension version (#18321)
In intel/llvm#16871 the
`sycl_ext_codeplay_enqueue_native_command` extensions was extended to
add new `interop_handler` APIs for working with SYCL-Graph.
However the extension macro was not bumped, which I think was an
oversight. This is problematic for users that want to use the extension
with graph support, but also use older oneAPI releases.
```cpp
#ifdef SYCL_EXT_ONEAPI_ENQUEUE_NATIVE_COMMAND
CGH.ext_codeplay_enqueue_native_command([=](sycl::interop_handle IH) {
if (IH.ext_codeplay_has_graph()) { // Is this API defined?
// Graph path
} else {
// Eager path
}
#else
CGH.host_task(...)
#endif
```
By bumping the feature test macro users can write code that supports old
DPC++ versions.
```cpp
#ifdef SYCL_EXT_ONEAPI_ENQUEUE_NATIVE_COMMAND
CGH.ext_codeplay_enqueue_native_command([=](sycl::interop_handle IH) {
#if SYCL_EXT_ONEAPI_ENQUEUE_NATIVE_COMMAND > 1
if (IH.ext_codeplay_has_graph()) {
// Graph path
} else
#endif
{
// Eager path
}
#else
CGH.host_task(...)
#endif
```1 parent b18e39d commit 255c3f1
2 files changed
Lines changed: 10 additions & 3 deletions
File tree
- sycl
- doc/extensions/experimental
- source
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
143 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
144 | 146 | | |
145 | 147 | | |
146 | 148 | | |
| |||
192 | 194 | | |
193 | 195 | | |
194 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
195 | 202 | | |
196 | 203 | | |
197 | 204 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
0 commit comments