You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SYCL] Bump native enqueue extension version (#18321)
In #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
```
0 commit comments