You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SYCL] Align some extensions with SYCL 2020 (#4432)
This patch
1. aligns these extensions with SYCL 2020 [section #6 in the spec]:
- Enqueue barrier [SYCL_EXT_INTEL_ENQUEUE_BARRIER]
- Level Zero backend [SYCL_EXT_ONEAPI_BACKEND_LEVEL_ZERO]
- Local memory [SYCL_EXT_ONEAPI_LOCAL_MEMORY]
- mem_channel property [SYCL_EXT_INTEL_MEM_CHANNEL_PROPERTY]
- USM address spaces [SYCL_EXT_INTEL_USM_ADDRESS_SPACES]
2. deprecates these extensions:
- sycl::detail::bit_cast [SYCL_INTEL_bitcast]
3. changes the location of these extensions:
- sycl::ext::intel::online_compiler moves to sycl::ext::intel::experimental.
sycl::ext::intel::online_compiler is deprecated.
Copy file name to clipboardExpand all lines: sycl/doc/extensions/EnqueueBarrier/enqueue_barrier.asciidoc
+56-46Lines changed: 56 additions & 46 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
= SYCL_INTEL_enqueue_barrier
1
+
= SYCL_EXT_ONEAPI_ENQUEUE_BARRIER
2
2
:source-highlighter: coderay
3
3
:coderay-linenums-mode: table
4
4
@@ -25,11 +25,6 @@ NOTE: This document is better viewed when rendered as html with asciidoctor. Gi
25
25
26
26
This document presents a series of changes proposed for a future version of the SYCL Specification. The goal of this proposal is to provide non-blocking APIs that provide synchronization on SYCL command queue for programmers.
27
27
28
-
29
-
== Name Strings
30
-
31
-
+SYCL_INTEL_enqueue_barrier+
32
-
33
28
== Notice
34
29
35
30
Copyright (c) 2019-2020 Intel Corporation. All rights reserved.
@@ -45,19 +40,35 @@ Because the interfaces defined by this specification are not final and are subje
45
40
== Version
46
41
47
42
Built On: {docdate} +
48
-
Revision: 1
43
+
Revision: 2
49
44
50
45
== Contact
51
46
Please open an issue in the https://github.com/intel/llvm/tree/sycl/sycl/doc/extensions/[extensions repository]
52
47
48
+
== Feature Test Macro
49
+
50
+
This extension provides a feature-test macro as described in the core SYCL
51
+
specification section 6.3.3 "Feature test macros". Therefore, an
52
+
implementation supporting this extension must predefine the macro
53
+
`SYCL_EXT_ONEAPI_ENQUEUE_BARRIER` to one of the values defined in the table below.
54
+
Applications can test for the existence of this macro to determine if the
55
+
implementation supports this feature, or applications can test the macro's
56
+
value to determine which of the extension's APIs the implementation supports.
57
+
58
+
[%header,cols="1,5"]
59
+
|===
60
+
|Value |Description
61
+
|1 |Initial extension version. Base features are supported.
62
+
|===
63
+
53
64
== Dependencies
54
65
55
-
This extension is written against the SYCL 1.2.1 specification, Revision v1.2.1-6.
66
+
This extension is written against the SYCL 2020 specification, revision 3.
56
67
57
68
== Overview
58
69
59
-
SYCL 1.2.1 defines a graph-based task execution model, based on kernels or explicit memory operations submitted to out-of-order queues. Dependencies between these kernels are represented by
60
-
accessors that form data dependence edges in the execution graph. The USM extension <<usmlink,[1]>> doesn't have accessors, so instead solves
70
+
SYCL 2020 defines a graph-based task execution model, based on kernels or explicit memory operations submitted to out-of-order queues. Dependencies between these kernels are represented by
71
+
accessors that form data dependence edges in the execution graph. Unified Shared Memory (USM) doesn't have accessors, so instead solves
61
72
this by defining `handler::depends_on` methods to specify event-based control dependencies between command groups.
62
73
63
74
There are situations where defining dependencies based on events is more explicit than desired or required by an application. For instance, the user may know that a given task depends on all previously submitted tasks. Instead of explicitly adding all the required depends_on calls, the user could express this intent via a single call, making the program more concise and explicit.
@@ -75,9 +86,9 @@ two new members to the `queue` class:
The first variant of the barrier takes no parameters, and waits for all previously submitted commands to the queue to enter the `info::event_command_status::complete` state before any command later submitted to the same queue is allowed to execute. A second variant of the barrier accepts a list of events, with the behavior that no commands submitted to the same queue after barrier submission may execute until all events in the `waitList` have entered the `info::event_command_status::complete` state. Both variants are non-blocking from the host program perspective, in that they do not wait for the barrier conditions to have been met before returning.
@@ -93,7 +104,7 @@ Some forms of the new barrier methods return an `event`, which can be used to pe
93
104
94
105
CG4 doesn't execute until all previous command groups submitted to the same queue (CG1, CG2, CG3) have entered the completed state.
|`event submit_barrier()` | Same effect as submitting a `handler::barrier()` within a command group to this `queue`. The returned event enters the `info::event_command_status::complete` state when all events that the barrier is dependent on (implicitly from all previously submitted commands to the same queue) have entered the `info::event_command_status::complete` state.
229
-
|`event submit_barrier( const vector_class<event> &waitList )` | Same effect as submitting a `handler:barrier( const vector_class<event> &waitList )` within a command group to this `queue`. The returned event enters the `info::event_command_status::complete` state when all events that the barrier is dependent on (explicitly from `waitList`) have entered the `info::event_command_status::complete` state.
239
+
|`event ext_oneapi_submit_barrier()` | Same effect as submitting a `handler::ext_oneapi_barrier()` within a command group to this `queue`. The returned event enters the `info::event_command_status::complete` state when all events that the barrier is dependent on (implicitly from all previously submitted commands to the same queue) have entered the `info::event_command_status::complete` state.
240
+
|`event ext_oneapi_submit_barrier( const vector_class<event> &waitList )` | Same effect as submitting a `handler:ext_oneapi_barrier( const vector_class<event> &waitList )` within a command group to this `queue`. The returned event enters the `info::event_command_status::complete` state when all events that the barrier is dependent on (explicitly from `waitList`) have entered the `info::event_command_status::complete` state.
230
241
|========================================
231
242
232
243
233
-
=== Modify Section 4.8.2
244
+
=== Modify Section 4.9.3
234
245
235
246
==== Change first sentence from:
236
-
A command group scope in SYCL, as it is defined in Section 3.4.1, consists of a single kernel or explicit memory
237
-
operation (handler methods such as copy, update_host, fill), together with its requirements.
247
+
The member functions and objects defined in this scope will define the requirements for the kernel execution or
248
+
explicit memory operation, and will be used by the SYCL runtime to evaluate if the operation is ready for execution.
238
249
239
250
==== To:
240
251
241
-
A command group scope in SYCL, as it is defined in Section 3.4.1, consists of a single kernel, explicit memory
242
-
operation (handler methods such as copy, update_host, fill) or barrier, together with its requirements.
252
+
The member functions and objects defined in this scope will define the requirements for the kernel execution,
253
+
explicit memory operation or barrier, and will be used by the SYCL runtime to evaluate if the operation is ready for execution.
254
+
243
255
244
-
=== Modify part of Section 4.8.3
256
+
=== Modify part of Section 4.9.4
245
257
246
258
*Change from:*
247
259
[source,c++,NoName,linenums]
248
260
----
249
261
...
250
-
template<typename T, int dim, access::mode mode, access::target tgt>
=== Add a new section between Section 4.8.6 and 4.8.7
284
+
=== Add a new section between Section 4.9.4 and 4.9.5
273
285
274
-
4.8.X SYCL functions for enqueued synchronization barriers
286
+
4.9.X SYCL functions for enqueued synchronization barriers
275
287
276
288
Barriers may be submitted to a queue, with the effect that they prevent later operations submitted to the same queue from executing until the barrier wait conditions have been satisfied. The wait conditions can be explicitly described by `waitList` or implicitly from all previously submitted commands to the same queue. There are no constraints on the context from which queues may participate in the `waitList`. Enqueued barriers do not block host program execution, but instead form additional dependence edges with the execution task graph.
277
289
278
290
Barriers can be created by two members of the `handler` class that force synchronization on the SYCL command queue. The first variant of the `handler` barrier (`handler::barrier()`) takes no parameters, and waits for all previously submitted commands to the queue to enter the `info::event_command_status::complete` state before any command later submitted to the same queue is allowed to execute. The second variant of the `handler` barrier (`handler::barrier( const vector_class<event> &waitList )`) accepts a list of events, with the behavior that no commands submitted to the same queue after barrier submission may execute until all events in the waitList have entered the `info::event_command_status::complete` state.
279
291
280
-
=== Add a new table in the new section between 4.8.6 and 4.8.7: Member functions of the handler class.
292
+
=== Add a new table in the new section between 4.9.4 and 4.9.5: Member functions of the handler class.
281
293
282
294
[cols="70,300"]
283
295
[grid="rows"]
284
296
[options="header"]
285
297
|========================================
286
298
|*Member functions*|*Description*
287
-
|`void barrier()` | Prevents any commands submitted afterward to this queue from executing until all commands previously submitted to this queue have entered the `info::event_command_status::complete` state.
288
-
|`void barrier( const vector_class<event> &waitList` ) | Prevents any commands submitted afterward to this queue from executing until all events in `waitList` have entered the `info::event_command_status::complete` state. If `waitList` is empty, then the barrier has no effect.
299
+
|`void ext_oneapi_barrier()` | Prevents any commands submitted afterward to this queue from executing until all commands previously submitted to this queue have entered the `info::event_command_status::complete` state.
300
+
|`void ext_oneapi_barrier( const vector_class<event> &waitList` ) | Prevents any commands submitted afterward to this queue from executing until all events in `waitList` have entered the `info::event_command_status::complete` state. If `waitList` is empty, then the barrier has no effect.
Copy file name to clipboardExpand all lines: sycl/doc/extensions/MemChannel/MemChannel.asciidoc
+22-5Lines changed: 22 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
= SYCL_INTEL_mem_channel_property
1
+
= SYCL_EXT_INTEL_MEM_CHANNEL_PROPERTY
2
2
3
3
== Introduction
4
4
NOTE: Khronos(R) is a registered trademark and SYCL(TM) and SPIR(TM) are trademarks of The Khronos Group Inc. OpenCL(TM) is a trademark of Apple Inc. used by permission by Khronos.
@@ -23,14 +23,30 @@ Because the interfaces defined by this specification are not final and are subje
23
23
== Version
24
24
25
25
Built On: {docdate} +
26
-
Revision: 1
26
+
Revision: 2
27
27
28
28
== Dependencies
29
29
30
-
This extension is written against the SYCL 2020 provisional specification, Revision 1.
30
+
This extension is written against the SYCL 2020 specification, Revision 3.
31
31
32
32
The use of this extension requires a target that supports cl_intel_mem_channel_property or equivalent if OpenCL is used as the underlying device runtime.
33
33
34
+
== Feature Test Macro
35
+
36
+
This extension provides a feature-test macro as described in the core SYCL
37
+
specification section 6.3.3 "Feature test macros". Therefore, an
38
+
implementation supporting this extension must predefine the macro
39
+
`SYCL_EXT_INTEL_MEM_CHANNEL_PROPERTY` to one of the values defined in the table below.
40
+
Applications can test for the existence of this macro to determine if the
41
+
implementation supports this feature, or applications can test the macro's
42
+
value to determine which of the extension's APIs the implementation supports.
43
+
44
+
[%header,cols="1,5"]
45
+
|===
46
+
|Value |Description
47
+
|1 |Initial extension version. Base features are supported.
48
+
|===
49
+
34
50
== Overview
35
51
36
52
On some targets manual assignment of buffers to memory regions can improve memory bandwidth. This extension adds a buffer property to indicate in which memory channel a particular buffer should be allocated. This information is an optimization hint to the runtime and thus it is legal to ignore.
@@ -59,7 +75,7 @@ Add a new constructor to Table 4.34: Constructors of the buffer property classes
59
75
|===
60
76
--
61
77
62
-
Add a new member function to Table 4.35: Member functions of the buffer property classes as follows:
78
+
Add a new member function to Table 42: Member functions of the buffer property classes as follows:
63
79
64
80
--
65
81
[options="header"]
@@ -87,7 +103,7 @@ enum class aspect {
87
103
} // namespace sycl
88
104
```
89
105
90
-
Add an entry for the new aspect to Table 4.20: Device aspects defined by the core SYCL specification:
106
+
Add an entry for the new aspect to Table 26: Device aspects defined by the core SYCL specification:
91
107
92
108
--
93
109
[options="header"]
@@ -107,4 +123,5 @@ Add an entry for the new aspect to Table 4.20: Device aspects defined by the cor
107
123
|========================================
108
124
|Rev|Date|Author|Changes
109
125
|1|2020-10-26|Joe Garvey|*Initial public draft*
126
+
|2|2021-08-30|Dmitry Vodopyanov|*Updated according to some SYCL 2020 reqs for extensions*
0 commit comments