From 657b7c33fcc122d0e0aa41f20914dfbf8aacfe47 Mon Sep 17 00:00:00 2001 From: "Kornev, Nikita" Date: Wed, 4 Mar 2026 15:09:58 +0100 Subject: [PATCH 1/2] [SYCL][Doc] Define host_task free enqueue function CMPLRLLVM-73206 --- ...sycl_ext_oneapi_enqueue_functions.asciidoc | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/sycl/doc/extensions/experimental/sycl_ext_oneapi_enqueue_functions.asciidoc b/sycl/doc/extensions/experimental/sycl_ext_oneapi_enqueue_functions.asciidoc index 2f6b7c6b56e64..c8027b79c559f 100644 --- a/sycl/doc/extensions/experimental/sycl_ext_oneapi_enqueue_functions.asciidoc +++ b/sycl/doc/extensions/experimental/sycl_ext_oneapi_enqueue_functions.asciidoc @@ -317,6 +317,36 @@ order. |==== +==== Host tasks + +|==== +a| +[frame=all,grid=none] +!==== +a! +[source,c++] +---- +namespace sycl::ext::oneapi::experimental { + +template +void host_task(sycl::queue q, T&& hostTaskCallable); + +template +void host_task(sycl::handler &h, T&& hostTaskCallable); + +} +---- +!==== +_Preconditions_: The callable function `hostTaskCallable` does not call any +function in the `sycl` namespace. + +_Effects_: Enqueues an implementation-defined command to the SYCL runtime to +invoke hostTaskCallable exactly once. + + +|==== + + ==== Basic kernels |==== From a860dc6081bc3b3374293edd096a113489762784 Mon Sep 17 00:00:00 2001 From: "Kornev, Nikita" Date: Thu, 5 Mar 2026 11:14:06 +0100 Subject: [PATCH 2/2] apply suggestions --- ...sycl_ext_oneapi_enqueue_functions.asciidoc | 59 +++++++++---------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/sycl/doc/extensions/experimental/sycl_ext_oneapi_enqueue_functions.asciidoc b/sycl/doc/extensions/experimental/sycl_ext_oneapi_enqueue_functions.asciidoc index c8027b79c559f..a01b9504a5f28 100644 --- a/sycl/doc/extensions/experimental/sycl_ext_oneapi_enqueue_functions.asciidoc +++ b/sycl/doc/extensions/experimental/sycl_ext_oneapi_enqueue_functions.asciidoc @@ -317,36 +317,6 @@ order. |==== -==== Host tasks - -|==== -a| -[frame=all,grid=none] -!==== -a! -[source,c++] ----- -namespace sycl::ext::oneapi::experimental { - -template -void host_task(sycl::queue q, T&& hostTaskCallable); - -template -void host_task(sycl::handler &h, T&& hostTaskCallable); - -} ----- -!==== -_Preconditions_: The callable function `hostTaskCallable` does not call any -function in the `sycl` namespace. - -_Effects_: Enqueues an implementation-defined command to the SYCL runtime to -invoke hostTaskCallable exactly once. - - -|==== - - ==== Basic kernels |==== @@ -576,6 +546,35 @@ order. |==== +==== Host tasks + +|==== +a| +[frame=all,grid=none] +!==== +a! +[source,c++] +---- +namespace sycl::ext::oneapi::experimental { + +template +void host_task(sycl::queue q, T&& hostTaskCallable); + +template +void host_task(sycl::handler &h, T&& hostTaskCallable); + +} +---- +!==== +_Preconditions_: The callable function `hostTaskCallable` does not call any +function in the `sycl` namespace. + +_Effects_: Enqueues a command to the `sycl::queue` or `sycl::handler` that +executes `hostTaskCallable` exactly once on an unspecified host thread. + +|==== + + ==== Memory operations |====