Skip to content

Commit 8047c6f

Browse files
committed
Applied CR comments
1 parent 8a83962 commit 8047c6f

File tree

10 files changed

+66
-79
lines changed

10 files changed

+66
-79
lines changed

sycl/doc/extensions/EnqueueBarrier/enqueue_barrier.asciidoc

Lines changed: 32 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
= SYCL_EXT_INTEL_ENQUEUE_BARRIER
1+
= SYCL_EXT_ONEAPI_ENQUEUE_BARRIER
22
:source-highlighter: coderay
33
:coderay-linenums-mode: table
44

@@ -25,11 +25,6 @@ NOTE: This document is better viewed when rendered as html with asciidoctor. Gi
2525

2626
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.
2727

28-
29-
== Name Strings
30-
31-
+SYCL_EXT_INTEL_ENQUEUE_BARRIER+
32-
3328
== Notice
3429

3530
Copyright (c) 2019-2020 Intel Corporation. All rights reserved.
@@ -45,7 +40,7 @@ Because the interfaces defined by this specification are not final and are subje
4540
== Version
4641

4742
Built On: {docdate} +
48-
Revision: 1
43+
Revision: 2
4944

5045
== Contact
5146
Please open an issue in the https://github.com/intel/llvm/tree/sycl/sycl/doc/extensions/[extensions repository]
@@ -55,7 +50,7 @@ Please open an issue in the https://github.com/intel/llvm/tree/sycl/sycl/doc/ext
5550
This extension provides a feature-test macro as described in the core SYCL
5651
specification section 6.3.3 "Feature test macros". Therefore, an
5752
implementation supporting this extension must predefine the macro
58-
`SYCL_EXT_INTEL_ENQUEUE_BARRIER` to one of the values defined in the table below.
53+
`SYCL_EXT_ONEAPI_ENQUEUE_BARRIER` to one of the values defined in the table below.
5954
Applications can test for the existence of this macro to determine if the
6055
implementation supports this feature, or applications can test the macro's
6156
value to determine which of the extension's APIs the implementation supports.
@@ -68,12 +63,12 @@ value to determine which of the extension's APIs the implementation supports.
6863

6964
== Dependencies
7065

71-
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.
7267

7368
== Overview
7469

75-
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
76-
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
7772
this by defining `handler::depends_on` methods to specify event-based control dependencies between command groups.
7873

7974
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.
@@ -91,9 +86,9 @@ two new members to the `queue` class:
9186
[grid="rows"]
9287
[options="header"]
9388
|========================================
94-
|*handler::ext_intel_barrier*|*queue::ext_intel_submit_barrier*
95-
|`void ext_intel_barrier()` | `event ext_intel_submit_barrier()`
96-
|`void ext_intel_barrier( const vector_class<event> &waitList )` | `event ext_intel_submit_barrier( const vector_class<event> &waitList )`
89+
|*handler::ext_intel_barrier*|*queue::ext_oneapi_submit_barrier*
90+
|`void ext_intel_barrier()` | `event ext_oneapi_submit_barrier()`
91+
|`void ext_intel_barrier( const vector_class<event> &waitList )` | `event ext_oneapi_submit_barrier( const vector_class<event> &waitList )`
9792
|========================================
9893

9994
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.
@@ -134,7 +129,7 @@ Queue.submit([&](cl::sycl::handler& cgh) {
134129
...
135130
----
136131

137-
==== 2. Using `queue::ext_intel_submit_barrier()`:
132+
==== 2. Using `queue::ext_oneapi_submit_barrier()`:
138133

139134
[source,c++,NoName,linenums]
140135
----
@@ -149,7 +144,7 @@ Queue.submit([&](cl::sycl::handler& cgh) {
149144
// CG3
150145
});
151146
152-
Queue.ext_intel_submit_barrier();
147+
Queue.ext_oneapi_submit_barrier();
153148
154149
Queue.submit([&](cl::sycl::handler& cgh) {
155150
// CG4
@@ -185,7 +180,7 @@ Queue3.submit([&](cl::sycl::handler& cgh) {
185180
...
186181
----
187182

188-
==== 2. Using `queue::ext_intel_submit_barrier()`:
183+
==== 2. Using `queue::ext_oneapi_submit_barrier()`:
189184

190185
[source,c++,NoName,linenums]
191186
----
@@ -198,7 +193,7 @@ auto event_barrier2 = Queue2.submit([&](cl::sycl::handler& cgh) {
198193
// CG2
199194
});
200195
201-
Queue3.ext_intel_submit_barrier( vector_class<event>{event_barrier1, event_barrier2} );
196+
Queue3.ext_oneapi_submit_barrier( vector_class<event>{event_barrier1, event_barrier2} );
202197
203198
Queue3.submit([&](cl::sycl::handler& cgh) {
204199
// CG3
@@ -227,44 +222,45 @@ void wait();
227222
template <typename T>
228223
event submit(T cgf, const queue &secondaryQueue);
229224
230-
event ext_intel_submit_barrier();
225+
event ext_oneapi_submit_barrier();
231226
232-
event ext_intel_submit_barrier( const vector_class<event> &waitList );
227+
event ext_oneapi_submit_barrier( const vector_class<event> &waitList );
233228
234229
void wait();
235230
...
236231
----
237-
=== Add rows to Table 4.22
232+
=== Add rows to Table 28
238233

239234
[cols="70,300"]
240235
[grid="rows"]
241236
[options="header"]
242237
|========================================
243238
|*Member functions*|*Description*
244-
|`event ext_intel_submit_barrier()` | Same effect as submitting a `handler::ext_intel_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.
245-
|`event ext_intel_submit_barrier( const vector_class<event> &waitList )` | Same effect as submitting a `handler:ext_intel_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_intel_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_intel_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.
246241
|========================================
247242

248243

249-
=== Modify Section 4.8.2
244+
=== Modify Section 4.9.3
250245

251246
==== Change first sentence from:
252-
A command group scope in SYCL, as it is defined in Section 3.4.1, consists of a single kernel or explicit memory
253-
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.
254249

255250
==== To:
256251

257-
A command group scope in SYCL, as it is defined in Section 3.4.1, consists of a single kernel, explicit memory
258-
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+
259255

260-
=== Modify part of Section 4.8.3
256+
=== Modify part of Section 4.9.4
261257

262258
*Change from:*
263259
[source,c++,NoName,linenums]
264260
----
265261
...
266-
template<typename T, int dim, access::mode mode, access::target tgt>
267-
void fill(accessor<T, dim, mode, tgt> dest, const T& src);
262+
template <typename T>
263+
void fill(void *ptr, const T &pattern, size_t count);
268264
269265
};
270266
...
@@ -274,8 +270,8 @@ void fill(accessor<T, dim, mode, tgt> dest, const T& src);
274270
[source,c++,NoName,linenums]
275271
----
276272
...
277-
template<typename T, int dim, access::mode mode, access::target tgt>
278-
void fill(accessor<T, dim, mode, tgt> dest, const T& src);
273+
template <typename T>
274+
void fill(void *ptr, const T &pattern, size_t count);
279275
280276
void ext_intel_barrier();
281277
@@ -285,15 +281,15 @@ void ext_intel_barrier( const vector_class<event> &waitList );
285281
...
286282
----
287283

288-
=== 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
289285

290-
4.8.X SYCL functions for enqueued synchronization barriers
286+
4.9.X SYCL functions for enqueued synchronization barriers
291287

292288
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.
293289

294290
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.
295291

296-
=== 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.
297293

298294
[cols="70,300"]
299295
[grid="rows"]
@@ -304,9 +300,6 @@ Barriers can be created by two members of the `handler` class that force synchro
304300
|`void ext_intel_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.
305301
|========================================
306302

307-
== References
308-
1. [[usmlink]]https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/USM/USM.adoc
309-
310303
== Issues
311304

312305
None.

sycl/doc/extensions/LevelZeroBackend/LevelZeroBackend.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ The currently supported targets are all Intel GPUs starting with Gen9.
99

1010
NOTE: This specification is a draft. While describing the currently implemented behaviors it is known to be not complete nor exhaustive.
1111
We shall continue to add more information, e.g. explain general mapping of SYCL programming model to Level-Zero API.
12-
It will also be gradually changing to a SYCL-2020 conforming implementation.
1312

1413
## 2. Prerequisites
1514

sycl/doc/extensions/MemChannel/MemChannel.asciidoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ Because the interfaces defined by this specification are not final and are subje
2323
== Version
2424

2525
Built On: {docdate} +
26-
Revision: 1
26+
Revision: 2
2727

2828
== Dependencies
2929

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.
3131

3232
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.
3333

@@ -65,7 +65,7 @@ Add a new property to Table 4.33: Properties supported by the SYCL buffer class
6565
|===
6666
--
6767

68-
Add a new constructor to Table 4.34: Constructors of the buffer property classes as follows:
68+
Add a new constructor to Table 41: Constructors of the buffer property classes as follows:
6969

7070
--
7171
[options="header"]
@@ -75,7 +75,7 @@ Add a new constructor to Table 4.34: Constructors of the buffer property classes
7575
|===
7676
--
7777

78-
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:
7979

8080
--
8181
[options="header"]
@@ -103,7 +103,7 @@ enum class aspect {
103103
} // namespace sycl
104104
```
105105

106-
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:
107107

108108
--
109109
[options="header"]

sycl/doc/extensions/USMAddressSpaces/usm_address_spaces.asciidoc

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ NOTE: Khronos(R) is a registered trademark and SYCL(TM) and SPIR(TM) are tradema
1111
NOTE: This document is better viewed when rendered as html with asciidoctor. GitHub does not render image icons.
1212
This document describes an extension to the SYCL USM extension that adds new explicit address spaces for the possible locations that USM pointers can be allocated. Users can create pointers that point into these address spaces explicitly in order to pass additional information to their compiler so as to enable optimizations.
1313

14-
== Name Strings
15-
+SYCL_EXT_INTEL_USM_ADDRESS_SPACES+
16-
1714
== Notice
1815
Copyright (c) 2020 Intel Corporation. All rights reserved.
1916

@@ -28,11 +25,11 @@ Because the interfaces defined by this specification are not final and are subje
2825
== Version
2926

3027
Built On: {docdate} +
31-
Revision: 1
28+
Revision: B
3229

3330
== Dependencies
3431

35-
This extension is written against the SYCL 1.2.1 specification, Revision 7. It requires the Unified Shared Memory SYCL proposal.
32+
This extension is written against the SYCL 2020 specification, Revision 3.
3633

3734
If SPIR-V is used by the implementation, this extension also requires support for the SPV_INTEL_usm_storage_classes SPIR-V extension.
3835

@@ -61,9 +58,9 @@ The goal of this division of the global address space is to enable users to expl
6158
While automatic address space inference is often possible for accessors, it is harder for USM pointers as it requires inter-procedural optimization with the host code.
6259
This additional information can be particularly beneficial on FPGA targets where knowing that a pointer only ever accesses host or device memory can allow compilers to produce more area efficient memory-accessing hardware.
6360

64-
== Modifications to the SYCL Specification, Version 1.2.1 revision 7
61+
== Modifications to the SYCL Specification, Version 2020 revision 3
6562

66-
=== Section 3.5.2 SYCL Device Memory Model
63+
=== Section 3.8.2 SYCL Device Memory Model
6764

6865
Add to the end of the definition of global memory:
6966
Global memory is a virtual address space which overlaps the device and host address spaces.
@@ -74,21 +71,22 @@ Add two new memory regions as follows:
7471

7572
*Host memory* is a sub-region of global memory. USM pointers allocated with the host alloc type reside in this address space.
7673

77-
=== Section 3.5.2.1 Access to memory
74+
=== Section 3.8.2.1 Access to memory
7875

79-
In the second last paragraph, add cl::sycl::device_ptr and cl::sycl::host_ptr to the list of explicit pointer classes.
76+
In the second last paragraph, add sycl::device_ptr and sycl::host_ptr to the list of explicit pointer classes.
8077

8178
=== Section 4.7.7.1 Multi-pointer Class
8279

8380
In the overview of the multi_ptr class replace the address_space enum with the following:
8481
```c++
8582
enum class address_space : int {
86-
global_space,
87-
local_space,
88-
constant_space,
89-
private_space,
90-
ext_intel_global_device_space,
91-
ext_intel_global_host_space
83+
global_space,
84+
local_space,
85+
constant_space, // Deprecated in SYCL 2020
86+
private_space,
87+
generic_space,
88+
ext_intel_global_device_space,
89+
ext_intel_global_host_space
9290
};
9391
```
9492

@@ -99,7 +97,7 @@ Add the following new conversion operator:
9997
explicit operator multi_ptr<ElementType, access::address_space::global_space>() const;
10098
```
10199

102-
Add a new row to Table 4.54: Constructors of the SYCL multi_ptr class template, as follows:
100+
Add a new row to Table 91: Constructors of the SYCL multi_ptr class template, as follows:
103101

104102
--
105103
[options="header"]

sycl/include/CL/sycl/feature_test.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace sycl {
2424
#define SYCL_EXT_ONEAPI_MATRIX 2
2525
#endif
2626
#define SYCL_EXT_INTEL_BF16_CONVERSION 1
27-
#define SYCL_EXT_INTEL_ENQUEUE_BARRIER 1
27+
#define SYCL_EXT_ONEAPI_ENQUEUE_BARRIER 1
2828
#define SYCL_EXT_INTEL_MEM_CHANNEL_PROPERTY 1
2929
#define SYCL_EXT_INTEL_USM_ADDRESS_SPACES 1
3030
#define SYCL_EXT_ONEAPI_BACKEND_LEVEL_ZERO 1

sycl/include/CL/sycl/handler.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2307,7 +2307,9 @@ class __SYCL_EXPORT handler {
23072307
/// \param WaitList is a vector of valid SYCL events that need to complete
23082308
/// before barrier command can be executed.
23092309
__SYCL2020_DEPRECATED("use 'ext_intel_barrier' instead")
2310-
void barrier(const std::vector<event> &WaitList);
2310+
void barrier(const std::vector<event> &WaitList) {
2311+
ext_intel_barrier(WaitList);
2312+
}
23112313

23122314
/// Copies data from one memory region to another, both pointed by
23132315
/// USM pointers.

0 commit comments

Comments
 (0)