Skip to content

Commit 342b65e

Browse files
author
iclsrc
committed
Merge from 'sycl' to 'sycl-web' (4 commits)
2 parents 474faeb + e0ccfda commit 342b65e

File tree

22 files changed

+317
-232
lines changed

22 files changed

+317
-232
lines changed

sycl/doc/extensions/experimental/sycl_ext_oneapi_graph.asciidoc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,6 +1258,29 @@ _Throws:_ Synchronously `exception` with error code `invalid` if the device
12581258
associated with
12591259
`syclQueue` <<device-info-query, reports this extension as unsupported>>.
12601260

1261+
[source,c++]
1262+
----
1263+
command_graph(const device& syclDevice,
1264+
const property_list& propList = {});
1265+
----
1266+
1267+
_Effects:_ Simplified constructor form where only device `syclDevice` is provided
1268+
without explicitly passing a context. The graph uses the platform's default context.
1269+
Zero or more properties can be provided to the constructed SYCL `command_graph`
1270+
via an instance of `property_list`. All other properties of the queue are
1271+
ignored for the purposes of graph creation. See the
1272+
<<Queue Properties, Queue Properties>> section for more general information
1273+
about how queue properties interact with `command_graph` objects.
1274+
1275+
_Constraints:_ This constructor is only available when the `command_graph` state is
1276+
`graph_state::modifiable`.
1277+
1278+
_Preconditions:_ Valid `command_graph` constructor properties are listed in
1279+
Section <<graph-properties, Graph Properties>>.
1280+
1281+
_Throws:_ Synchronously `exception` with error code `invalid` if `syclDevice`
1282+
<<device-info-query, reports this extension as unsupported>>.
1283+
12611284
===== Member functions of the `command_graph` class
12621285

12631286
[source,c++]

sycl/include/sycl/accessor_image.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ class __SYCL_EBO unsampled_image_accessor :
907907
DataT read(const CoordT &Coords) const noexcept {
908908
#ifdef __SYCL_DEVICE_ONLY__
909909
// Currently not reachable on device.
910-
std::ignore = Coords;
910+
(void)Coords;
911911
return {0, 0, 0, 0};
912912
#else
913913
return host_base_class::read<DataT>(Coords);
@@ -925,8 +925,8 @@ class __SYCL_EBO unsampled_image_accessor :
925925
void write(const CoordT &Coords, const DataT &Color) const {
926926
#ifdef __SYCL_DEVICE_ONLY__
927927
// Currently not reachable on device.
928-
std::ignore = Coords;
929-
std::ignore = Color;
928+
(void)Coords;
929+
(void)Color;
930930
#else
931931
host_base_class::write<DataT>(Coords, Color);
932932
#endif // __SYCL_DEVICE_ONLY__
@@ -938,7 +938,7 @@ class __SYCL_EBO unsampled_image_accessor :
938938
: host_base_class{Impl}
939939
#endif // __SYCL_DEVICE_ONLY__
940940
{
941-
std::ignore = Impl;
941+
(void)Impl;
942942
}
943943

944944
template <class Obj>
@@ -1216,7 +1216,7 @@ class __SYCL_EBO sampled_image_accessor :
12161216
DataT read(const CoordT &Coords) const noexcept {
12171217
#ifdef __SYCL_DEVICE_ONLY__
12181218
// Currently not reachable on device.
1219-
std::ignore = Coords;
1219+
(void)Coords;
12201220
return {0, 0, 0, 0};
12211221
#else
12221222
return host_base_class::read<DataT>(Coords);
@@ -1229,7 +1229,7 @@ class __SYCL_EBO sampled_image_accessor :
12291229
: host_base_class{Impl}
12301230
#endif // __SYCL_DEVICE_ONLY__
12311231
{
1232-
std::ignore = Impl;
1232+
(void)Impl;
12331233
}
12341234

12351235
template <class Obj>

sycl/include/sycl/detail/spirv.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ template <typename GroupT, typename T>
924924
EnableIfNativeShuffle<T> Shuffle(GroupT g, T x, id<1> local_id) {
925925
uint32_t LocalId = MapShuffleID(g, local_id);
926926
#ifndef __NVPTX__
927-
std::ignore = g;
927+
(void)g;
928928
if constexpr (ext::oneapi::experimental::is_user_constructed_group_v<
929929
GroupT> &&
930930
detail::is_vec<T>::value) {
@@ -957,7 +957,7 @@ EnableIfNativeShuffle<T> Shuffle(GroupT g, T x, id<1> local_id) {
957957
template <typename GroupT, typename T>
958958
EnableIfNativeShuffle<T> ShuffleXor(GroupT g, T x, id<1> mask) {
959959
#ifndef __NVPTX__
960-
std::ignore = g;
960+
(void)g;
961961
if constexpr (ext::oneapi::experimental::is_user_constructed_group_v<
962962
GroupT> &&
963963
detail::is_vec<T>::value) {

sycl/include/sycl/ext/intel/esimd/memory.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2155,7 +2155,7 @@ __ESIMD_API simd<Tx, N> block_load(AccessorTy acc,
21552155
return block_load<Tx, N>(__ESIMD_DNS::accessorToPointer<Tx>(acc, byte_offset),
21562156
flags);
21572157
#else
2158-
std::ignore = flags;
2158+
(void)flags;
21592159
constexpr unsigned Sz = sizeof(T) * N;
21602160
static_assert(Sz >= detail::OperandSize::OWORD,
21612161
"block size must be at least 1 oword");

sycl/include/sycl/ext/intel/experimental/pipes.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class pipe : public pipe_base {
110110
static _dataT read(queue &Q, bool &Success,
111111
memory_order Order = memory_order::seq_cst) {
112112
// Order is currently unused.
113-
std::ignore = Order;
113+
(void)Order;
114114

115115
const device Dev = Q.get_device();
116116
bool IsPipeSupported =
@@ -139,7 +139,7 @@ class pipe : public pipe_base {
139139
static void write(queue &Q, const _dataT &Data, bool &Success,
140140
memory_order Order = memory_order::seq_cst) {
141141
// Order is currently unused.
142-
std::ignore = Order;
142+
(void)Order;
143143

144144
const device Dev = Q.get_device();
145145
bool IsPipeSupported =
@@ -267,7 +267,7 @@ class pipe : public pipe_base {
267267
// Host API
268268
static _dataT read(queue &Q, memory_order Order = memory_order::seq_cst) {
269269
// Order is currently unused.
270-
std::ignore = Order;
270+
(void)Order;
271271

272272
const device Dev = Q.get_device();
273273
bool IsPipeSupported =
@@ -290,7 +290,7 @@ class pipe : public pipe_base {
290290
static void write(queue &Q, const _dataT &Data,
291291
memory_order Order = memory_order::seq_cst) {
292292
// Order is currently unused.
293-
std::ignore = Order;
293+
(void)Order;
294294

295295
const device Dev = Q.get_device();
296296
bool IsPipeSupported =

sycl/include/sycl/ext/oneapi/experimental/graph/command_graph.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ class command_graph : public detail::modifiable_command_graph {
101101
const property_list &PropList = {})
102102
: modifiable_command_graph(SyclQueue, PropList) {}
103103

104+
/// Constructor with default context.
105+
/// @param SyclDevice Device all nodes will be associated with.
106+
/// @param PropList Optional list of properties to pass.
107+
explicit command_graph(const device &SyclDevice,
108+
const property_list &PropList = {})
109+
: modifiable_command_graph(SyclDevice, PropList) {}
110+
104111
private:
105112
/// Constructor used internally by the runtime.
106113
/// @param Impl Detail implementation class to construct object with.

sycl/include/sycl/ext/oneapi/experimental/graph/modifiable_graph.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ class __SYCL_EXPORT modifiable_command_graph
5555
modifiable_command_graph(const queue &SyclQueue,
5656
const property_list &PropList = {});
5757

58+
/// Constructor with default context.
59+
/// @param SyclDevice Device all nodes will be associated with.
60+
/// @param PropList Optional list of properties to pass.
61+
modifiable_command_graph(const device &SyclDevice,
62+
const property_list &PropList = {});
63+
5864
/// Add an empty node to the graph.
5965
/// @param PropList Property list used to pass [0..n] predecessor nodes.
6066
/// @return Constructed empty node which has been added to the graph.

sycl/include/sycl/ext/oneapi/experimental/prefetch.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ void prefetch_impl(T *ptr, size_t bytes, Properties properties) {
9090
}
9191
__spirv_ocl_prefetch(ptrAnnotated, bytes);
9292
#else
93-
std::ignore = ptr;
94-
std::ignore = bytes;
95-
std::ignore = properties;
93+
(void)ptr;
94+
(void)bytes;
95+
(void)properties;
9696
#endif
9797
}
9898

@@ -101,7 +101,7 @@ void joint_prefetch_impl(Group g, T *ptr, size_t bytes, Properties properties) {
101101
// Although calling joint_prefetch is functionally equivalent to calling
102102
// prefetch from every work-item in a group, native suppurt may be added to to
103103
// issue cooperative prefetches more efficiently on some hardware.
104-
std::ignore = g;
104+
(void)g;
105105
prefetch_impl(ptr, bytes, properties);
106106
}
107107
} // namespace detail

sycl/include/sycl/ext/oneapi/experimental/user_defined_reductions.hpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ T reduce_over_group_impl(GroupHelper group_helper, T x, size_t num_elements,
3333
group_barrier(g);
3434
return group_broadcast(g, result);
3535
#else
36-
std::ignore = group_helper;
37-
std::ignore = x;
38-
std::ignore = num_elements;
39-
std::ignore = binary_op;
36+
(void)group_helper;
37+
(void)x;
38+
(void)num_elements;
39+
(void)binary_op;
4040
throw exception(make_error_code(errc::runtime),
4141
"Group algorithms are not supported on host.");
4242
#endif
@@ -73,7 +73,7 @@ reduce_over_group(GroupHelper group_helper, V x, T init,
7373
#ifdef __SYCL_DEVICE_ONLY__
7474
return binary_op(init, reduce_over_group(group_helper, x, binary_op));
7575
#else
76-
std::ignore = group_helper;
76+
(void)group_helper;
7777
throw exception(make_error_code(errc::runtime),
7878
"Group algorithms are not supported on host.");
7979
#endif
@@ -107,10 +107,10 @@ joint_reduce(GroupHelper group_helper, Ptr first, Ptr last,
107107
return detail::reduce_over_group_impl(group_helper, partial, num_elements,
108108
binary_op);
109109
#else
110-
std::ignore = group_helper;
111-
std::ignore = first;
112-
std::ignore = last;
113-
std::ignore = binary_op;
110+
(void)group_helper;
111+
(void)first;
112+
(void)last;
113+
(void)binary_op;
114114
throw exception(make_error_code(errc::runtime),
115115
"Group algorithms are not supported on host.");
116116
#endif
@@ -129,8 +129,8 @@ joint_reduce(GroupHelper group_helper, Ptr first, Ptr last, T init,
129129
#ifdef __SYCL_DEVICE_ONLY__
130130
return binary_op(init, joint_reduce(group_helper, first, last, binary_op));
131131
#else
132-
std::ignore = group_helper;
133-
std::ignore = last;
132+
(void)group_helper;
133+
(void)last;
134134
throw exception(make_error_code(errc::runtime),
135135
"Group algorithms are not supported on host.");
136136
#endif

0 commit comments

Comments
 (0)