88:toc: left
99:encoding: utf-8
1010:lang: en
11+ :dpcpp: pass:[DPC++]
1112
1213:blank: pass:[ +]
1314
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
10791of a property list accepting properties with compile-time constant
10892values, 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
112119The kernel properties below correspond to kernel attributes defined in
113120Section 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
225232combinations of kernel attributes are invalid, this must be clearly documented
226233as 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
230237To enable properties to be associated with kernels, this extension adds
231238new 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
431438result in an implementation throwing an `exception` with the `errc::invalid`
432439error code.
433440
434- == Querying Properties in a Compiled Kernel
441+ === Querying Properties in a Compiled Kernel
435442
436443Any properties embedded into a kernel type via a property list are reflected
437444in the results of a call to `kernel::get_info` with the
438445`info::kernel::attributes` information descriptor, as if the corresponding
439446attribute from the SYCL 2020 specification had been applied to the kernel
440447function.
441448
442- == Device Functions
449+ === Device Functions
443450
444451The SYCL 2020 `sycl::device_has` attribute can be applied to the declaration
445452of 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
487494are 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- |========================================
0 commit comments