Skip to content

Commit b37e6ca

Browse files
committed
Merge remote-tracking branch 'origin/sycl' into llvmspirv_pulldown
2 parents 1502bce + 7868596 commit b37e6ca

File tree

30 files changed

+919
-236
lines changed

30 files changed

+919
-236
lines changed

llvm/include/llvm/SYCLLowerIR/DeviceConfigFile.td

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ def AspectExt_oneapi_mipmap : Aspect<"ext_oneapi_mipmap">;
6262
def AspectExt_oneapi_mipmap_anisotropy : Aspect<"ext_oneapi_mipmap_anisotropy">;
6363
def AspectExt_oneapi_mipmap_level_reference : Aspect<"ext_oneapi_mipmap_level_reference">;
6464
def AspectExt_intel_esimd : Aspect<"ext_intel_esimd">;
65-
def AspectExt_oneapi_non_uniform_groups : Aspect<"ext_oneapi_non_uniform_groups">;
65+
def AspectExt_oneapi_ballot_group : Aspect<"ext_oneapi_ballot_group">;
66+
def AspectExt_oneapi_fixed_size_group : Aspect<"ext_oneapi_fixed_size_group">;
67+
def AspectExt_oneapi_opportunistic_group : Aspect<"ext_oneapi_opportunistic_group">;
68+
def AspectExt_oneapi_tangle_group : Aspect<"ext_oneapi_tangle_group">;
6669
// Deprecated aspects
6770
def AspectInt64_base_atomics : Aspect<"int64_base_atomics">;
6871
def AspectInt64_extended_atomics : Aspect<"int64_extended_atomics">;
@@ -111,7 +114,8 @@ def : TargetInfo<"__TestAspectList",
111114
AspectExt_oneapi_bindless_images_shared_usm, AspectExt_oneapi_bindless_images_1d_usm, AspectExt_oneapi_bindless_images_2d_usm,
112115
AspectExt_oneapi_interop_memory_import, AspectExt_oneapi_interop_memory_export,
113116
AspectExt_oneapi_interop_semaphore_import, AspectExt_oneapi_interop_semaphore_export,
114-
AspectExt_oneapi_mipmap, AspectExt_oneapi_mipmap_anisotropy, AspectExt_oneapi_mipmap_level_reference, AspectExt_intel_esimd, AspectExt_oneapi_non_uniform_groups],
117+
AspectExt_oneapi_mipmap, AspectExt_oneapi_mipmap_anisotropy, AspectExt_oneapi_mipmap_level_reference, AspectExt_intel_esimd,
118+
AspectExt_oneapi_ballot_group, AspectExt_oneapi_fixed_size_group, AspectExt_oneapi_opportunistic_group, AspectExt_oneapi_tangle_group],
115119
[]>;
116120
// This definition serves the only purpose of testing whether the deprecated aspect list defined in here and in SYCL RT
117121
// match.

llvm/lib/SYCLLowerIR/CompileTimeProperties.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ SYCL_COMPILE_TIME_PROPERTY("sycl-latency-constraint", 6173,
4242
SYCL_COMPILE_TIME_PROPERTY("sycl-datapath", 5825, DecorValueTy::none)
4343
SYCL_COMPILE_TIME_PROPERTY("sycl-resource", 5826, DecorValueTy::string)
4444
SYCL_COMPILE_TIME_PROPERTY("sycl-num-banks", 5827, DecorValueTy::uint32)
45-
SYCL_COMPILE_TIME_PROPERTY("sycl-ram-stitching", 5836, DecorValueTy::boolean)
45+
SYCL_COMPILE_TIME_PROPERTY("sycl-ram-stitching", 5836, DecorValueTy::uint32)
4646
SYCL_COMPILE_TIME_PROPERTY("sycl-max-private-copies", 5829,
4747
DecorValueTy::uint32)
4848
SYCL_COMPILE_TIME_PROPERTY("sycl-num-replicates", 5832, DecorValueTy::uint32)

llvm/lib/SYCLLowerIR/ESIMD/ESIMDVerifier.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ static const char *LegalSYCLFunctions[] = {
3636
"^sycl::_V1::accessor<.+>::~accessor",
3737
"^sycl::_V1::accessor<.+>::getQualifiedPtr",
3838
"^sycl::_V1::accessor<.+>::__init_esimd",
39+
"^sycl::_V1::address_space_cast",
3940
"^sycl::_V1::local_accessor<.+>::local_accessor",
4041
"^sycl::_V1::local_accessor<.+>::__init_esimd",
4142
"^sycl::_V1::local_accessor<.+>::get_pointer",

sycl/doc/extensions/experimental/sycl_ext_oneapi_kernel_compiler.asciidoc

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ https://github.com/intel/llvm/issues
3737

3838
== Dependencies
3939

40-
This extension is written against the SYCL 2020 revision 7 specification.
40+
This extension is written against the SYCL 2020 revision 8 specification.
4141
All references below to the "core SYCL specification" or to section numbers in
4242
the SYCL specification refer to that revision.
4343

@@ -215,13 +215,13 @@ a!
215215
----
216216
namespace sycl::ext::oneapi::experimental {
217217
218-
template<typename PropertyListT = properties<>> (1)
218+
template<typename PropertyListT = empty_properties_t> (1)
219219
kernel_bundle<bundle_state::executable> build(
220220
const kernel_bundle<bundle_state::ext_oneapi_source>& sourceBundle,
221221
const std::vector<device> &devs,
222222
PropertyListT props = {})
223223
224-
template<typename PropertyListT = properties<>> (2)
224+
template<typename PropertyListT = empty_properties_t> (2)
225225
kernel_bundle<bundle_state::executable> build(
226226
const kernel_bundle<bundle_state::ext_oneapi_source>& sourceBundle,
227227
PropertyListT props = {})
@@ -230,13 +230,11 @@ kernel_bundle<bundle_state::executable> build(
230230
----
231231
!====
232232

233-
Overload (1):
234-
235233
_Constraints:_ Available only when `PropertyListT` is an instance of
236234
`sycl::ext::oneapi::experimental::properties` which contains no properties
237235
other than those listed below in the section "New properties".
238236

239-
_Effects:_ The source code from `sourceBundle` is translated into one or more
237+
_Effects (1):_ The source code from `sourceBundle` is translated into one or more
240238
device images of state `bundle_state::executable`, and a new kernel bundle is
241239
created to contain these device images.
242240
The new bundle represents all of the kernels in `sourceBundle` that are
@@ -247,6 +245,8 @@ Any remaining kernels (those that are not compatible with any of the devices in
247245
The new bundle has the same associated context as `sourceBundle`, and the new
248246
bundle's set of associated devices is `devs` (with duplicate devices removed).
249247

248+
_Effects (2)_: Equivalent to `build(sourceBundle, ctxt.get_devices(), props)`.
249+
250250
_Returns:_ The newly created kernel bundle, which has `executable` state.
251251

252252
_Throws:_
@@ -274,12 +274,6 @@ source code used to create the kernel bundle being printed to the terminal.
274274
In situations where this is undesirable, developers must ensure that the
275275
exception is caught and handled appropriately.
276276
_{endnote}_]
277-
278-
Overload (2):
279-
280-
_Constraints:_ Same as overload (1).
281-
282-
_Effects:_ Equivalent to `build(sourceBundle, ctxt.get_devices(), props)`.
283277
|====
284278

285279
=== New properties
@@ -333,7 +327,7 @@ namespace sycl::ext::oneapi::experimental {
333327
334328
struct save_log {
335329
std::string *log;
336-
save_log(std::string *to);
330+
save_log(std::string *to); (1)
337331
};
338332
using save_log_key = save_log;
339333
@@ -359,7 +353,7 @@ provided in the log.
359353
In general, the log information is intended for human consumption, and the
360354
format may not be stable across implementations of this extension.
361355

362-
_Effects:_ Constructs a `save_log` property with a pointer to a `std::string`.
356+
_Effects (1):_ Constructs a `save_log` property with a pointer to a `std::string`.
363357
When the `build` function completes successfully, this string will contain the
364358
log.
365359

@@ -426,10 +420,7 @@ template <bundle_state State>
426420
class kernel_bundle {
427421
// ...
428422

429-
// Available only if bundle_state is not bundle_state::ext_oneapi_source
430423
bool ext_oneapi_has_kernel(const std::string &name);
431-
432-
// Available only if bundle_state is bundle_state::executable
433424
kernel ext_oneapi_get_kernel(const std::string &name);
434425
};
435426

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

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,18 @@ SYCL specification refer to that revision.
4444

4545
== Status
4646

47-
This is a proposed extension specification, intended to gather community
48-
feedback. Interfaces defined in this specification may not be implemented yet
49-
or may be in a preliminary state. The specification itself may also change in
50-
incompatible ways before it is finalized. *Shipping software products should
51-
not rely on APIs defined in this specification.*
47+
This is an experimental extension specification, intended to provide early
48+
access to features and gather community feedback. Interfaces defined in this
49+
specification are implemented in {dpcpp}, but they are not finalized and may
50+
change incompatibly in future versions of {dpcpp} without prior notice.
51+
*Shipping software products should not rely on APIs defined in this
52+
specification.*
5253

5354

5455
== Backend support status
5556

56-
The APIs in this extension may be used only on a device that has
57-
`aspect::ext_oneapi_non_uniform_groups`. The application must check that the
57+
The APIs in this extension may be used only on a device that has one or more of
58+
the xref:ext-aspects[extension aspects]. The application must check that the
5859
device has this aspect before submitting a kernel using any of the APIs in this
5960
extension. If the application fails to do this, the implementation throws a
6061
synchronous exception with the `errc::kernel_not_supported` error code when the
@@ -105,20 +106,33 @@ implementation supports.
105106
feature-test macro always has this value.
106107
|===
107108

109+
[#ext-aspects]
108110
=== Extension to `enum class aspect`
109111

110112
[source]
111113
----
112114
namespace sycl {
113115
enum class aspect {
114116
...
115-
ext_oneapi_non_uniform_groups
117+
ext_oneapi_ballot_group
118+
ext_oneapi_fixed_size_group
119+
ext_oneapi_opportunistic_group
120+
ext_oneapi_tangle_group
116121
}
117122
}
118123
----
119124

120-
If a SYCL device has the `ext_oneapi_non_uniform_groups` aspect,
121-
then it supports the non-uniform groups described in the next sections.
125+
If a SYCL device has these aspects, that device supports the non-uniform groups
126+
as follows:
127+
128+
[%header,cols="2,3"]
129+
|===
130+
| Aspect | Supported group
131+
| `ext_oneapi_ballot_group` | `ballot_group`
132+
| `ext_oneapi_fixed_size_group` | `fixed_size_group`
133+
| `ext_oneapi_opportunistic_group` | `opportunistic_group`
134+
| `ext_oneapi_tangle_group` | `tangle_group`
135+
|===
122136

123137
=== Control Flow
124138

sycl/include/sycl/device_aspect_macros.hpp

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,24 @@
278278
#define __SYCL_ALL_DEVICES_HAVE_ext_intel_esimd__ 0
279279
#endif
280280

281-
#ifndef __SYCL_ALL_DEVICES_HAVE_ext_oneapi_non_uniform_groups__
282-
// __SYCL_ASPECT(ext_oneapi_non_uniform_groups, 54)
283-
#define __SYCL_ALL_DEVICES_HAVE_ext_oneapi_non_uniform_groups__ 0
281+
#ifndef __SYCL_ALL_DEVICES_HAVE_ext_oneapi_ballot_group__
282+
// __SYCL_ASPECT(ext_oneapi_ballot_group, 54)
283+
#define __SYCL_ALL_DEVICES_HAVE_ext_oneapi_ballot_group__ 0
284+
#endif
285+
286+
#ifndef __SYCL_ALL_DEVICES_HAVE_ext_oneapi_fixed_size_group__
287+
// __SYCL_ASPECT(ext_oneapi_fixed_size_group, 55)
288+
#define __SYCL_ALL_DEVICES_HAVE_ext_oneapi_fixed_size_group__ 0
289+
#endif
290+
291+
#ifndef __SYCL_ALL_DEVICES_HAVE_ext_oneapi_opportunistic_group__
292+
// __SYCL_ASPECT(ext_oneapi_opportunistic_group, 56)
293+
#define __SYCL_ALL_DEVICES_HAVE_ext_oneapi_opportunistic_group__ 0
294+
#endif
295+
296+
#ifndef __SYCL_ALL_DEVICES_HAVE_ext_oneapi_tangle_group__
297+
// __SYCL_ASPECT(ext_oneapi_tangle_group, 57)
298+
#define __SYCL_ALL_DEVICES_HAVE_ext_oneapi_tangle_group__ 0
284299
#endif
285300

286301
#ifndef __SYCL_ANY_DEVICE_HAS_host__
@@ -553,7 +568,22 @@
553568
#define __SYCL_ANY_DEVICE_HAS_ext_intel_esimd__ 0
554569
#endif
555570

556-
#ifndef __SYCL_ANY_DEVICE_HAS_ext_oneapi_non_uniform_groups__
557-
// __SYCL_ASPECT(ext_oneapi_non_uniform_groups, 54)
558-
#define __SYCL_ANY_DEVICE_HAS_ext_oneapi_non_uniform_groups__ 0
571+
#ifndef __SYCL_ANY_DEVICE_HAS_ext_oneapi_ballot_group__
572+
// __SYCL_ASPECT(ext_oneapi_ballot_group, 54)
573+
#define __SYCL_ANY_DEVICE_HAS_ext_oneapi_ballot_group__ 0
574+
#endif
575+
576+
#ifndef __SYCL_ANY_DEVICE_HAS_ext_oneapi_fixed_size_group__
577+
// __SYCL_ASPECT(ext_oneapi_fixed_size_group, 55)
578+
#define __SYCL_ANY_DEVICE_HAS_ext_oneapi_fixed_size_group__ 0
579+
#endif
580+
581+
#ifndef __SYCL_ANY_DEVICE_HAS_ext_oneapi_opportunistic_group__
582+
// __SYCL_ASPECT(ext_oneapi_opportunistic_group, 56)
583+
#define __SYCL_ANY_DEVICE_HAS_ext_oneapi_opportunistic_group__ 0
584+
#endif
585+
586+
#ifndef __SYCL_ANY_DEVICE_HAS_ext_oneapi_tangle_group__
587+
// __SYCL_ASPECT(ext_oneapi_tangle_group, 57)
588+
#define __SYCL_ANY_DEVICE_HAS_ext_oneapi_tangle_group__ 0
559589
#endif

0 commit comments

Comments
 (0)