Skip to content

Commit e39e8eb

Browse files
[SYCL][Docs] Move sycl_ext_oneapi_kernel_properties to experimental (#7190)
This commit moves the sycl_ext_oneapi_kernel_properties extension from proposal to experimental. As part of the move, the extension is transitioned to the new extension template. Additionally it adds a note about the current order limitation of `SYCL_EXT_ONEAPI_FUNCTION_PROPERTY` and `SYCL_EXTERNAL` in the current implementation. Signed-off-by: Larsen, Steffen <[email protected]>
1 parent 1fda2a3 commit e39e8eb

File tree

2 files changed

+56
-54
lines changed

2 files changed

+56
-54
lines changed

sycl/doc/extensions/proposed/sycl_ext_oneapi_kernel_properties.asciidoc renamed to sycl/doc/extensions/experimental/sycl_ext_oneapi_kernel_properties.asciidoc

Lines changed: 55 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
:toc: left
99
:encoding: utf-8
1010
:lang: en
11+
:dpcpp: pass:[DPC++]
1112

1213
:blank: pass:[ +]
1314

@@ -16,42 +17,23 @@
1617
// docbook uses c++ and html5 uses cpp.
1718
:language: {basebackend@docbook:c++:cpp}
1819

19-
== Introduction
20-
IMPORTANT: This specification is a draft.
21-
22-
NOTE: Khronos(R) is a registered trademark and SYCL(TM) and SPIR(TM) are
23-
trademarks of The Khronos Group Inc. OpenCL(TM) is a trademark of Apple Inc.
24-
used by permission by Khronos.
25-
26-
This extension introduces a replacement for the kernel attributes defined in
27-
Section 5.8.1 of the SYCL 2020 specification, in the form of a property list
28-
accepting properties with compile-time constant values.
2920

3021
== Notice
3122

32-
Copyright (c) 2021-2022 Intel Corporation. All rights reserved.
23+
[%hardbreaks]
24+
Copyright (C) 2021-2022 Intel Corporation. All rights reserved.
3325

34-
== Status
26+
Khronos(R) is a registered trademark and SYCL(TM) and SPIR(TM) are trademarks
27+
of The Khronos Group Inc. OpenCL(TM) is a trademark of Apple Inc. used by
28+
permission by Khronos.
3529

36-
Working Draft
3730

38-
This is a proposed extension specification, intended to gather community
39-
feedback. Interfaces defined in this specification may not be implemented yet
40-
or may be in a preliminary state. The specification itself may also change in
41-
incompatible ways before it is finalized. Shipping software products should not
42-
rely on APIs defined in this specification.
31+
== Contact
4332

44-
== Version
33+
To report problems with this extension, please open a new issue at:
4534

46-
Revision: 1
47-
48-
== Contributors
35+
https://github.com/intel/llvm/issues
4936

50-
Jessica Davies, Intel +
51-
Joe Garvey, Intel +
52-
Greg Lueck, Intel +
53-
John Pennycook, Intel +
54-
Roland Schulz, Intel
5537

5638
== Dependencies
5739

@@ -60,21 +42,23 @@ the following extensions:
6042

6143
- link:sycl_ext_oneapi_properties.asciidoc[sycl_ext_oneapi_properties]
6244

63-
== Feature Test Macro
6445

65-
This extension provides a feature-test macro as described in the core SYCL
66-
specification section 6.3.3 "Feature test macros". Therefore, an
67-
implementation supporting this extension must predefine the macro
68-
`SYCL_EXT_ONEAPI_KERNEL_PROPERTIES` to one of the values defined in the table
69-
below. Applications can test for the existence of this macro to determine if
70-
the implementation supports this feature, or applications can test the macro's
71-
value to determine which of the extension's APIs the implementation supports.
46+
== Status
7247

73-
[%header,cols="1,5"]
74-
|===
75-
|Value |Description
76-
|1 |Initial extension version. Base features are supported.
77-
|===
48+
This is an experimental extension specification, intended to provide early
49+
access to features and gather community feedback. Interfaces defined in this
50+
specification are implemented in {dpcpp}, but they are not finalized and may
51+
change incompatibly in future versions of {dpcpp} without prior notice.
52+
*Shipping software products should not rely on APIs defined in this
53+
specification.*
54+
55+
== Contributors
56+
57+
Jessica Davies, Intel +
58+
Joe Garvey, Intel +
59+
Greg Lueck, Intel +
60+
John Pennycook, Intel +
61+
Roland Schulz, Intel
7862

7963
== Overview
8064

@@ -107,7 +91,30 @@ This extension proposes a replacement for these kernel attributes, in the form
10791
of a property list accepting properties with compile-time constant
10892
values, to address several of these issues.
10993

110-
== Kernel Properties
94+
95+
== Specification
96+
97+
=== Feature test macro
98+
99+
This extension provides a feature-test macro as described in the core SYCL
100+
specification. An implementation supporting this extension must predefine the
101+
macro `SYCL_EXT_ONEAPI_KERNEL_PROPERTIES` to one of the values defined in the
102+
table below. Applications can test for the existence of this macro to determine
103+
if the implementation supports this feature, or applications can test the
104+
macro's value to determine which of the extension's features the implementation
105+
supports.
106+
107+
[%header,cols="1,5"]
108+
|===
109+
|Value
110+
|Description
111+
112+
|1
113+
|The APIs of this experimental extension are not versioned, so the
114+
feature-test macro always has this value.
115+
|===
116+
117+
=== Kernel Properties
111118

112119
The kernel properties below correspond to kernel attributes defined in
113120
Section 5.8.1 of the SYCL 2020 specification. Note that deprecated attributes
@@ -225,7 +232,7 @@ SYCL implementations may introduce additional kernel properties. If any
225232
combinations of kernel attributes are invalid, this must be clearly documented
226233
as part of the new kernel property definition.
227234

228-
== Adding a Property List to a Kernel Launch
235+
=== Adding a Property List to a Kernel Launch
229236

230237
To enable properties to be associated with kernels, this extension adds
231238
new overloads to each of the variants of `single_task`, `parallel_for` and
@@ -431,15 +438,15 @@ diagnostic; invalid combinations that can only be detected at run-time should
431438
result in an implementation throwing an `exception` with the `errc::invalid`
432439
error code.
433440

434-
== Querying Properties in a Compiled Kernel
441+
=== Querying Properties in a Compiled Kernel
435442

436443
Any properties embedded into a kernel type via a property list are reflected
437444
in the results of a call to `kernel::get_info` with the
438445
`info::kernel::attributes` information descriptor, as if the corresponding
439446
attribute from the SYCL 2020 specification had been applied to the kernel
440447
function.
441448

442-
== Device Functions
449+
=== Device Functions
443450

444451
The SYCL 2020 `sycl::device_has` attribute can be applied to the declaration
445452
of a non-kernel device function, to assert that the device function uses a
@@ -486,6 +493,10 @@ units that declare that same function _F_ must list the same set of properties
486493
_P_ via the `SYCL_EXT_ONEAPI_FUNCTION_PROPERTY` macro. Programs which fail to do this
487494
are ill-formed, but no diagnostic is required.
488495

496+
NOTE: Due to a restriction on attribute ordering in Clang it is only currently
497+
possible to use `SYCL_EXT_ONEAPI_FUNCTION_PROPERTY` before `SYCL_EXTERNAL` in
498+
{dpcpp}.
499+
489500
== Issues
490501

491502
. How should we handle kernels supporting more than one set of device aspects?
@@ -514,13 +525,3 @@ would increase implementation complexity.
514525
//--
515526
//*RESOLUTION*: Not resolved.
516527
//--
517-
518-
== Revision History
519-
520-
[cols="5,15,15,70"]
521-
[grid="rows"]
522-
[options="header"]
523-
|========================================
524-
|Rev|Date|Author|Changes
525-
|1|2021-08-06|John Pennycook|*Initial public working draft*
526-
|========================================

sycl/include/sycl/feature_test.hpp.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ __SYCL_INLINE_VER_NAMESPACE(_V1) {
6565
#define SYCL_EXT_INTEL_RUNTIME_BUFFER_LOCATION 1
6666
#define SYCL_EXT_ONEAPI_BACKEND_LEVEL_ZERO 3
6767
#define SYCL_EXT_ONEAPI_USM_DEVICE_READ_ONLY 1
68+
#define SYCL_EXT_ONEAPI_KERNEL_PROPERTIES 1
6869
#cmakedefine01 SYCL_BUILD_PI_CUDA
6970
#if SYCL_BUILD_PI_CUDA
7071
#define SYCL_EXT_ONEAPI_BACKEND_CUDA 1

0 commit comments

Comments
 (0)