Skip to content

Commit f9382a2

Browse files
committed
[SYCL] Bump native enqueue extension version
In intel#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. This is problematic for users that want to use the extension with graph support, but also use older oneAPI releases. ```cpp CGH.ext_codeplay_enqueue_native_command([=](sycl::interop_handle IH) { if (IH.ext_codeplay_has_graph() /* is this defined?*/) { // Graph path } else { // Eager path } CGH.host_task(...) ``` By bumping the feature test macro, users can write code that supports old DPC++ versions. ```cpp CGH.ext_codeplay_enqueue_native_command([=](sycl::interop_handle IH) { if (IH.ext_codeplay_has_graph() /* is this defined?*/) { // Graph path } else { // Eager path } CGH.host_task(...) ```
1 parent ea2dad3 commit f9382a2

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

sycl/doc/extensions/experimental/sycl_ext_codeplay_enqueue_native_command.asciidoc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,10 @@ implementation supports.
139139
|Description
140140

141141
|1
142-
|The APIs of this experimental extension are not versioned, so the
143-
feature-test macro always has this value.
142+
|Initial version defining `handler::ext_codeplay_enqueue_native_command()`.
143+
144+
|2
145+
|Addition of `interop_handler` methods for `sycl_ext_oneapi_graph` integration.
144146
|===
145147

146148
=== Additions to handler class
@@ -192,6 +194,11 @@ This section defines the interaction with the
192194
link:../experimental/sycl_ext_oneapi_graph.asciidoc[sycl_ext_oneapi_graph]
193195
extension.
194196

197+
The APIs defined in this section of the extension specification are only
198+
available from version 2 of the extension. Usage of the APIs can be guarded in
199+
user code by checking the value of the <<feature-test-macro,
200+
feature test macro>>.
201+
195202
The `interopCallable` object will be invoked during `command_graph::finalize()`
196203
when the backend object for the graph is available to give to the user as a
197204
handle. The user may then add nodes using native APIs to the backend graph

sycl/source/feature_test.hpp.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ inline namespace _V1 {
108108
#define SYCL_EXT_ONEAPI_ENQUEUE_FUNCTIONS 1
109109
#define SYCL_EXT_ONEAPI_RAW_KERNEL_ARG 1
110110
#define SYCL_EXT_ONEAPI_PROFILING_TAG 1
111-
#define SYCL_EXT_ONEAPI_ENQUEUE_NATIVE_COMMAND 1
111+
#define SYCL_EXT_ONEAPI_ENQUEUE_NATIVE_COMMAND 2
112112
#define SYCL_EXT_ONEAPI_GET_KERNEL_INFO 1
113113
#define SYCL_EXT_ONEAPI_WORK_GROUP_MEMORY 1
114114
#define SYCL_EXT_ONEAPI_WORK_GROUP_SCRATCH_MEMORY 1

0 commit comments

Comments
 (0)