Skip to content

Commit f614f11

Browse files
committed
[SYCL][Doc] Forbid multiple kernel property lists
Updates the sycl_ext_oneapi_kernel_properties extension specification to align with both the current implementation and the behavior of the new sycl_ext_oneapi_enqueue_functions extension. Signed-off-by: John Pennycook <[email protected]>
1 parent 761d45d commit f614f11

File tree

1 file changed

+5
-19
lines changed

1 file changed

+5
-19
lines changed

sycl/doc/extensions/experimental/sycl_ext_oneapi_kernel_properties.asciidoc

+5-19
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
== Notice
2222

2323
[%hardbreaks]
24-
Copyright (C) 2021 Intel Corporation. All rights reserved.
24+
Copyright (C) 2024 Intel Corporation. All rights reserved.
2525

2626
Khronos(R) is a registered trademark and SYCL(TM) and SPIR(TM) are trademarks
2727
of The Khronos Group Inc. OpenCL(TM) is a trademark of Apple Inc. used by
@@ -37,7 +37,7 @@ https://github.com/intel/llvm/issues
3737

3838
== Dependencies
3939

40-
This extension is written against the SYCL 2020 specification, Revision 4 and
40+
This extension is written against the SYCL 2020 specification, Revision 9 and
4141
the following extensions:
4242

4343
- link:sycl_ext_oneapi_properties.asciidoc[sycl_ext_oneapi_properties]
@@ -387,12 +387,6 @@ class handler {
387387
}
388388
```
389389

390-
Passing a property list as an argument in this way allows properties to be
391-
associated with a kernel function without modifying its type. This enables
392-
the same kernel function (e.g. a lambda) to be submitted multiple times with
393-
different properties, or for libraries building on SYCL to add properties
394-
(e.g. for performance reasons) to user-provided kernel functions.
395-
396390
All the properties defined in this extension have compile-time values. However,
397391
an implementation may support additional properties which could have run-time
398392
values. When this occurs, the `properties` parameter may be a property list
@@ -412,18 +406,10 @@ q.parallel_for(range<2>{16, 16}, properties, [=](id<2> i) {
412406
}).wait();
413407
```
414408

415-
NOTE: It is currently not possible to use the same kernel function in two
416-
commands with different properties. For example, the following will result in an
417-
error at compile-time:
409+
A kernel function can only be associated with one set of kernel properties.
410+
If a kernel function is associated with more than one set of kernel properties,
411+
the implementation must issue a diagnostic.
418412

419-
```c++
420-
auto kernelFunc = [=](){};
421-
q.single_task(kernelFunc);
422-
q.single_task(
423-
sycl::ext::oneapi::experimental::properties{
424-
sycl::ext::oneapi::experimental::sub_group_size<8>},
425-
kernelFunc);
426-
```
427413

428414
== Embedding Properties into a Kernel
429415

0 commit comments

Comments
 (0)