Skip to content

Commit 9bcca3a

Browse files
committed
Merge branch 'sycl' into Realisation_of_sycl_link_build_compile
2 parents 4143cb5 + 68efbec commit 9bcca3a

File tree

8 files changed

+35
-40
lines changed

8 files changed

+35
-40
lines changed

sycl/ReleaseNotes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ Release notes for commit range 5d7e0925..5eebd1e4bfce
800800
### SYCL Compiler
801801
- Allow for multiple build options for opencl-aot [5e5703f58449]
802802
### SYCL Library
803-
- Implement [`SYCL_INTEL_mem_channel_property`](doc/extensions/MemChannel/SYCL_INTEL_mem_channel_property.asciidoc)
803+
- Implement [`SYCL_INTEL_mem_channel_property`](doc/extensions/supported/SYCL_EXT_INTEL_MEM_CHANNEL_PROPERTY.asciidoc)
804804
extension [2f1f3167b7c6]
805805
- Add `marray` class as defined by SYCL 2020 provisional [5eebd1e4bfce]
806806
- Implement dynamic batch size adjusting when using Level-Zero plugin
@@ -1186,7 +1186,7 @@ Release notes for commit range 5976ff0..1fc0e4f
11861186

11871187
### Documentation
11881188
- Added documentation for [`SPV_INTEL_usm_storage_classes`](doc/extensions/SPIRV/SPV_INTEL_usm_storage_classes.asciidoc)
1189-
and [SYCL_INTEL_usm_address_spaces](doc/extensions/USMAddressSpaces/usm_address_spaces.asciidoc) [781fbfc]
1189+
and [SYCL_INTEL_usm_address_spaces](doc/extensions/supported/SYCL_EXT_INTEL_USM_ADDRESS_SPACES.asciidoc) [781fbfc]
11901190
- Fixed SPIR-V format name spelling [6e9bf3b]
11911191
- Added extension [LocalMemory](doc/extensions/supported/SYCL_EXT_ONEAPI_LOCAL_MEMORY.asciidoc) draft specification [4b5308a]
11921192
- Added extension [free functions queries](doc/extensions/experimental/SYCL_EXT_ONEAPI_FREE_FUNCTION_QUERIES.asciidoc) draft specification [8953bfd]

sycl/include/CL/sycl/atomic.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ namespace sycl {
168168

169169
template <typename T, access::address_space addressSpace =
170170
access::address_space::global_space>
171-
class atomic {
171+
class __SYCL2020_DEPRECATED(
172+
"sycl::atomic is deprecated since SYCL 2020") atomic {
172173
friend class atomic<T, access::address_space::global_space>;
173174
static_assert(detail::IsValidAtomicType<T>::value,
174175
"Invalid SYCL atomic type. Valid types are: int, "

sycl/include/sycl/ext/intel/experimental/esimd/detail/simd_mask_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class simd_mask_impl
4949
/// Construct from an array. To allow e.g. simd_mask<N> m({1,0,0,1,...}).
5050
template <int N1, class = std::enable_if_t<N1 == N>>
5151
simd_mask_impl(const raw_element_type (&&Arr)[N1]) {
52-
base_type::init_from_array(std::move(Arr));
52+
base_type::template init_from_array<false>(std::move(Arr));
5353
}
5454

5555
/// Implicit conversion from simd.

sycl/include/sycl/ext/intel/experimental/esimd/detail/simd_obj_impl.hpp

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,21 @@ class simd_obj_impl {
153153
static constexpr int length = N;
154154

155155
protected:
156+
template <bool UseSet = true>
156157
void init_from_array(const Ty (&&Arr)[N]) noexcept {
158+
raw_vector_type tmp;
159+
157160
if constexpr (is_wrapper_elem_type_v<Ty>) {
158161
for (auto I = 0; I < N; ++I) {
159-
M_data[I] = bitcast_to_raw_type(Arr[I]);
162+
tmp[I] = bitcast_to_raw_type(Arr[I]);
160163
}
161164
} else {
162-
M_data = make_vector(std::move(Arr));
165+
tmp = make_vector(std::move(Arr));
166+
}
167+
if constexpr (UseSet) {
168+
set(std::move(tmp));
169+
} else {
170+
M_data = std::move(tmp);
163171
}
164172
}
165173

@@ -216,7 +224,13 @@ class simd_obj_impl {
216224
template <int N1, class = std::enable_if_t<N1 == N>>
217225
simd_obj_impl(const Ty (&&Arr)[N1]) noexcept {
218226
__esimd_dbg_print(simd_obj_impl(const Ty(&&Arr)[N1]));
219-
init_from_array(std::move(Arr));
227+
init_from_array<false /*init M_data w/o using set(...)*/>(std::move(Arr));
228+
// It is OK not to mark a write to M_data with __esimd_vstore (via 'set')
229+
// here because:
230+
// - __esimd_vstore/vload are need only to mark ESIMD_PRIVATE variable
231+
// access for the VC BE to generate proper code for them.
232+
// - initializers are not allowed for ESIMD_PRIVATE vars, so only the
233+
// default ctor can be used for them
220234
}
221235

222236
/// Load constructor.
@@ -239,34 +253,15 @@ class simd_obj_impl {
239253
copy_from(acc, offset, Flags{});
240254
}
241255

242-
// Load the object's value from array.
243-
template <int N1>
244-
std::enable_if_t<N1 == N> copy_from(const RawTy (&&Arr)[N1]) {
245-
__esimd_dbg_print(copy_from(const RawTy(&&Arr)[N1]));
246-
raw_vector_type Tmp;
247-
for (auto I = 0; I < N; ++I) {
248-
Tmp[I] = Arr[I];
249-
}
250-
set(Tmp);
251-
}
252-
253-
// Store the object's value to array.
254-
template <int N1> std::enable_if_t<N1 == N> copy_to(RawTy (&&Arr)[N1]) const {
255-
__esimd_dbg_print(copy_to(RawTy(&&Arr)[N1]));
256-
for (auto I = 0; I < N; ++I) {
257-
Arr[I] = data()[I];
258-
}
256+
// Load the object's value from an rvalue array.
257+
template <int N1> std::enable_if_t<N1 == N> copy_from(const Ty (&&Arr)[N1]) {
258+
__esimd_dbg_print(copy_from(const Ty(&&Arr)[N1]));
259+
init_from_array(std::move(Arr));
259260
}
260261

261-
/// @{
262-
/// Conversion operators.
263-
explicit operator const raw_vector_type &() const & {
264-
__esimd_dbg_print(explicit operator const raw_vector_type &() const &);
265-
return M_data;
266-
}
267-
explicit operator raw_vector_type &() & {
268-
__esimd_dbg_print(explicit operator raw_vector_type &() &);
269-
return M_data;
262+
explicit operator raw_vector_type() const {
263+
__esimd_dbg_print(explicit operator raw_vector_type());
264+
return data();
270265
}
271266

272267
/// Type conversion into a scalar:
@@ -277,7 +272,6 @@ class simd_obj_impl {
277272
__esimd_dbg_print(operator Ty());
278273
return bitcast_to_wrapper_type<Ty>(data()[0]);
279274
}
280-
/// @}
281275

282276
raw_vector_type data() const {
283277
__esimd_dbg_print(raw_vector_type data());

sycl/include/sycl/ext/intel/experimental/esimd/detail/simd_view_impl.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ class simd_view_impl {
6868
protected:
6969
simd_view_impl(BaseTy &Base, RegionTy Region)
7070
: M_base(Base), M_region(Region) {}
71-
simd_view_impl(BaseTy &&Base, RegionTy Region)
72-
: M_base(Base), M_region(Region) {}
7371

7472
simd_view_impl(BaseTy &Base) : M_base(Base), M_region(RegionTy(0)) {}
7573

sycl/test/warnings/sycl_2020_deprecations.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
// RUN: %clangxx %fsycl-host-only -fsyntax-only -sycl-std=2020 -Xclang -verify -Xclang -verify-ignore-unexpected=note %s -o %t.out
2-
// RUN: %clangxx %fsycl-host-only -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note %s -o %t.out
3-
// RUN: %clangxx %fsycl-host-only -fsyntax-only -sycl-std=2017 -Xclang -verify -Xclang -verify-ignore-unexpected=note %s -o %t.out
4-
// RUN: %clangxx %fsycl-host-only -fsyntax-only -sycl-std=1.2.1 -Xclang -verify -Xclang -verify-ignore-unexpected=note %s -o %t.out
52

63
#include <CL/sycl.hpp>
74
#include <sycl/ext/intel/online_compiler.hpp>
@@ -176,6 +173,11 @@ int main() {
176173

177174
// expected-warning@+1{{'barrier' is deprecated: use 'ext_oneapi_barrier' instead}}
178175
Queue.submit([&](sycl::handler &CGH) { CGH.barrier(); });
179-
176+
177+
cl::sycl::multi_ptr<int, cl::sycl::access::address_space::global_space> a(
178+
nullptr);
179+
// expected-warning@+1 {{'atomic<int, sycl::access::address_space::global_space>' is deprecated: sycl::atomic is deprecated since SYCL 2020}}
180+
cl::sycl::atomic<int> b(a);
181+
180182
return 0;
181183
}

0 commit comments

Comments
 (0)