8
8
:toc: left
9
9
:encoding: utf-8
10
10
:lang: en
11
+ :dpcpp: pass:[DPC++]
11
12
12
13
:blank: pass:[ +]
13
14
16
17
// docbook uses c++ and html5 uses cpp.
17
18
:language: {basebackend@docbook:c++:cpp}
18
19
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.
29
20
30
21
== Notice
31
22
32
- Copyright (c) 2021-2022 Intel Corporation. All rights reserved.
23
+ [%hardbreaks]
24
+ Copyright (C) 2021-2022 Intel Corporation. All rights reserved.
33
25
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.
35
29
36
- Working Draft
37
30
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
43
32
44
- == Version
33
+ To report problems with this extension, please open a new issue at:
45
34
46
- Revision: 1
47
-
48
- == Contributors
35
+ https://github.com/intel/llvm/issues
49
36
50
- Jessica Davies, Intel +
51
- Joe Garvey, Intel +
52
- Greg Lueck, Intel +
53
- John Pennycook, Intel +
54
- Roland Schulz, Intel
55
37
56
38
== Dependencies
57
39
@@ -60,21 +42,23 @@ the following extensions:
60
42
61
43
- link:sycl_ext_oneapi_properties.asciidoc[sycl_ext_oneapi_properties]
62
44
63
- == Feature Test Macro
64
45
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
72
47
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
78
62
79
63
== Overview
80
64
@@ -107,7 +91,30 @@ This extension proposes a replacement for these kernel attributes, in the form
107
91
of a property list accepting properties with compile-time constant
108
92
values, to address several of these issues.
109
93
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
111
118
112
119
The kernel properties below correspond to kernel attributes defined in
113
120
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
225
232
combinations of kernel attributes are invalid, this must be clearly documented
226
233
as part of the new kernel property definition.
227
234
228
- == Adding a Property List to a Kernel Launch
235
+ === Adding a Property List to a Kernel Launch
229
236
230
237
To enable properties to be associated with kernels, this extension adds
231
238
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
431
438
result in an implementation throwing an `exception` with the `errc::invalid`
432
439
error code.
433
440
434
- == Querying Properties in a Compiled Kernel
441
+ === Querying Properties in a Compiled Kernel
435
442
436
443
Any properties embedded into a kernel type via a property list are reflected
437
444
in the results of a call to `kernel::get_info` with the
438
445
`info::kernel::attributes` information descriptor, as if the corresponding
439
446
attribute from the SYCL 2020 specification had been applied to the kernel
440
447
function.
441
448
442
- == Device Functions
449
+ === Device Functions
443
450
444
451
The SYCL 2020 `sycl::device_has` attribute can be applied to the declaration
445
452
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
486
493
_P_ via the `SYCL_EXT_ONEAPI_FUNCTION_PROPERTY` macro. Programs which fail to do this
487
494
are ill-formed, but no diagnostic is required.
488
495
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
+
489
500
== Issues
490
501
491
502
. How should we handle kernels supporting more than one set of device aspects?
@@ -514,13 +525,3 @@ would increase implementation complexity.
514
525
//--
515
526
//*RESOLUTION*: Not resolved.
516
527
//--
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
- |========================================
0 commit comments