Skip to content

Commit ec0385d

Browse files
authored
[SYCL][ESIMD] Remove deprecated API (#5402)
* [SYCL][ESIMD] Remove deprecated API Signed-off-by: Sergey Dmitriev <[email protected]>
1 parent 5373ccb commit ec0385d

19 files changed

+45
-651
lines changed

sycl/include/sycl/ext/intel/experimental/esimd/common.hpp

Lines changed: 0 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@
6262
#define __ESIMD_NS_QUOTED __ESIMD_QUOTE(__ESIMD_NS)
6363
#define __ESIMD_DEPRECATED(new_api) \
6464
__SYCL_DEPRECATED("use " __ESIMD_NS_QUOTED "::" __ESIMD_QUOTE(new_api))
65-
// Defines a deprecated enum value. Use of this value will cause a deprecation
66-
// message printed out by the compiler.
67-
#define __ESIMD_DEPR_ENUM_V(old, new, t) \
68-
old __ESIMD_DEPRECATED(new) = static_cast<t>(new)
6965

7066
__SYCL_INLINE_NAMESPACE(cl) {
7167
namespace sycl {
@@ -92,11 +88,6 @@ static inline constexpr uint8_t saturation_off =
9288
static inline constexpr uint8_t saturation_on =
9389
static_cast<uint8_t>(saturation::on);
9490

95-
enum {
96-
__ESIMD_DEPR_ENUM_V(GENX_NOSAT, saturation::off, uint8_t),
97-
__ESIMD_DEPR_ENUM_V(GENX_SAT, saturation::on, uint8_t)
98-
};
99-
10091
/// Represents a pixel's channel.
10192
enum class rgba_channel : uint8_t { R, G, B, A };
10293

@@ -127,49 +118,8 @@ enum class rgba_channel_mask : uint8_t {
127118
ABR = detail::chA | detail::chB | detail::chR,
128119
ABG = detail::chA | detail::chB | detail::chG,
129120
ABGR = detail::chA | detail::chB | detail::chG | detail::chR,
130-
// For backward compatibility ('ChannelMaskType::ESIMD_R_ENABLE' usage style):
131-
__ESIMD_DEPR_ENUM_V(ESIMD_R_ENABLE, rgba_channel_mask::R, uint8_t),
132-
__ESIMD_DEPR_ENUM_V(ESIMD_G_ENABLE, rgba_channel_mask::G, uint8_t),
133-
__ESIMD_DEPR_ENUM_V(ESIMD_GR_ENABLE, rgba_channel_mask::GR, uint8_t),
134-
__ESIMD_DEPR_ENUM_V(ESIMD_B_ENABLE, rgba_channel_mask::B, uint8_t),
135-
__ESIMD_DEPR_ENUM_V(ESIMD_BR_ENABLE, rgba_channel_mask::BR, uint8_t),
136-
__ESIMD_DEPR_ENUM_V(ESIMD_BG_ENABLE, rgba_channel_mask::BG, uint8_t),
137-
__ESIMD_DEPR_ENUM_V(ESIMD_BGR_ENABLE, rgba_channel_mask::BGR, uint8_t),
138-
__ESIMD_DEPR_ENUM_V(ESIMD_A_ENABLE, rgba_channel_mask::A, uint8_t),
139-
__ESIMD_DEPR_ENUM_V(ESIMD_AR_ENABLE, rgba_channel_mask::AR, uint8_t),
140-
__ESIMD_DEPR_ENUM_V(ESIMD_AG_ENABLE, rgba_channel_mask::AG, uint8_t),
141-
__ESIMD_DEPR_ENUM_V(ESIMD_AGR_ENABLE, rgba_channel_mask::AGR, uint8_t),
142-
__ESIMD_DEPR_ENUM_V(ESIMD_AB_ENABLE, rgba_channel_mask::AB, uint8_t),
143-
__ESIMD_DEPR_ENUM_V(ESIMD_ABR_ENABLE, rgba_channel_mask::ABR, uint8_t),
144-
__ESIMD_DEPR_ENUM_V(ESIMD_ABG_ENABLE, rgba_channel_mask::ABG, uint8_t),
145-
__ESIMD_DEPR_ENUM_V(ESIMD_ABGR_ENABLE, rgba_channel_mask::ABGR, uint8_t)
146121
};
147122

148-
#define __ESIMD_DEPR_CONST(old, new) \
149-
static inline constexpr auto old __ESIMD_DEPRECATED(new) = new
150-
151-
// For backward compatibility ('ESIMD_R_ENABLE' usage style):
152-
__ESIMD_DEPR_CONST(ESIMD_R_ENABLE, rgba_channel_mask::R);
153-
__ESIMD_DEPR_CONST(ESIMD_G_ENABLE, rgba_channel_mask::G);
154-
__ESIMD_DEPR_CONST(ESIMD_GR_ENABLE, rgba_channel_mask::GR);
155-
__ESIMD_DEPR_CONST(ESIMD_B_ENABLE, rgba_channel_mask::B);
156-
__ESIMD_DEPR_CONST(ESIMD_BR_ENABLE, rgba_channel_mask::BR);
157-
__ESIMD_DEPR_CONST(ESIMD_BG_ENABLE, rgba_channel_mask::BG);
158-
__ESIMD_DEPR_CONST(ESIMD_BGR_ENABLE, rgba_channel_mask::BGR);
159-
__ESIMD_DEPR_CONST(ESIMD_A_ENABLE, rgba_channel_mask::A);
160-
__ESIMD_DEPR_CONST(ESIMD_AR_ENABLE, rgba_channel_mask::AR);
161-
__ESIMD_DEPR_CONST(ESIMD_AG_ENABLE, rgba_channel_mask::AG);
162-
__ESIMD_DEPR_CONST(ESIMD_AGR_ENABLE, rgba_channel_mask::AGR);
163-
__ESIMD_DEPR_CONST(ESIMD_AB_ENABLE, rgba_channel_mask::AB);
164-
__ESIMD_DEPR_CONST(ESIMD_ABR_ENABLE, rgba_channel_mask::ABR);
165-
__ESIMD_DEPR_CONST(ESIMD_ABG_ENABLE, rgba_channel_mask::ABG);
166-
__ESIMD_DEPR_CONST(ESIMD_ABGR_ENABLE, rgba_channel_mask::ABGR);
167-
168-
#undef __ESIMD_DEPR_CONST
169-
170-
// For backward compatibility:
171-
using ChannelMaskType = rgba_channel_mask;
172-
173123
constexpr int is_channel_enabled(rgba_channel_mask M, rgba_channel Ch) {
174124
int Pos = static_cast<int>(Ch);
175125
return (static_cast<int>(M) & (1 << Pos)) >> Pos;
@@ -201,58 +151,14 @@ enum class atomic_op : uint8_t {
201151
fmin = 0x11,
202152
fcmpwr = 0x12,
203153
predec = 0xff,
204-
// For backward compatibility:
205-
__ESIMD_DEPR_ENUM_V(ATOMIC_ADD, atomic_op::add, uint8_t),
206-
__ESIMD_DEPR_ENUM_V(ATOMIC_SUB, atomic_op::sub, uint8_t),
207-
__ESIMD_DEPR_ENUM_V(ATOMIC_INC, atomic_op::inc, uint8_t),
208-
__ESIMD_DEPR_ENUM_V(ATOMIC_DEC, atomic_op::dec, uint8_t),
209-
__ESIMD_DEPR_ENUM_V(ATOMIC_MIN, atomic_op::min, uint8_t),
210-
__ESIMD_DEPR_ENUM_V(ATOMIC_MAX, atomic_op::max, uint8_t),
211-
__ESIMD_DEPR_ENUM_V(ATOMIC_XCHG, atomic_op::xchg, uint8_t),
212-
__ESIMD_DEPR_ENUM_V(ATOMIC_CMPXCHG, atomic_op::cmpxchg, uint8_t),
213-
__ESIMD_DEPR_ENUM_V(ATOMIC_AND, atomic_op::bit_and, uint8_t),
214-
__ESIMD_DEPR_ENUM_V(ATOMIC_OR, atomic_op::bit_or, uint8_t),
215-
__ESIMD_DEPR_ENUM_V(ATOMIC_XOR, atomic_op::bit_xor, uint8_t),
216-
__ESIMD_DEPR_ENUM_V(ATOMIC_MINSINT, atomic_op::minsint, uint8_t),
217-
__ESIMD_DEPR_ENUM_V(ATOMIC_MAXSINT, atomic_op::maxsint, uint8_t),
218-
__ESIMD_DEPR_ENUM_V(ATOMIC_FMAX, atomic_op::fmax, uint8_t),
219-
__ESIMD_DEPR_ENUM_V(ATOMIC_FMIN, atomic_op::fmin, uint8_t),
220-
__ESIMD_DEPR_ENUM_V(ATOMIC_FCMPWR, atomic_op::fcmpwr, uint8_t),
221-
__ESIMD_DEPR_ENUM_V(ATOMIC_PREDEC, atomic_op::predec, uint8_t)
222-
};
223-
224-
// For backward compatibility:
225-
using EsimdAtomicOpType = atomic_op;
226-
227-
// TODO Cache hints APIs are being reworked.
228-
// L1 or L3 cache hint kinds.
229-
enum class CacheHint : uint8_t {
230-
None = 0,
231-
Uncached = 1,
232-
Cached = 2,
233-
WriteBack = 3,
234-
WriteThrough = 4,
235-
Streaming = 5,
236-
ReadInvalidate = 6
237154
};
238155

239156
/// Represents a split barrier action.
240157
enum class split_barrier_action : uint8_t {
241158
wait = 0, // split barrier wait
242159
signal = 1, // split barrier signal
243-
// For backward compatibility:
244-
__ESIMD_DEPR_ENUM_V(WAIT, split_barrier_action::wait, uint8_t),
245-
__ESIMD_DEPR_ENUM_V(SIGNAL, split_barrier_action::signal, uint8_t)
246160
};
247161

248-
// For backward compatibility:
249-
using EsimdSbarrierType = split_barrier_action;
250-
251-
// Since EsimdSbarrierType values are deprecated, these macros will generate
252-
// deprecation message.
253-
#define ESIMD_SBARRIER_WAIT EsimdSbarrierType::WAIT
254-
#define ESIMD_SBARRIER_SIGNAL EsimdSbarrierType::SIGNAL
255-
256162
/// Surface index type. Surface is an internal representation of a memory block
257163
/// addressable by GPU in "stateful" memory model, and each surface is
258164
/// identified by its "binding table index" - surface index.

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -150,16 +150,6 @@ struct element_type_traits<T, std::enable_if_t<is_vectorizable_v<T>>> {
150150
static inline constexpr bool is_floating_point = std::is_floating_point_v<T>;
151151
};
152152

153-
#ifdef __SYCL_DEVICE_ONLY__
154-
template <> struct element_type_traits<_Float16, void> {
155-
using RawT = _Float16;
156-
using EnclosingCppT = _Float16;
157-
__SYCL_DEPRECATED("use sycl::half as element type")
158-
static inline constexpr bool use_native_cpp_ops = true;
159-
static inline constexpr bool is_floating_point = true;
160-
};
161-
#endif
162-
163153
// --- Type conversions
164154

165155
// Low-level conversion functions to and from a wrapper element type.

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

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ namespace experimental {
2121
namespace esimd {
2222
namespace detail {
2323

24-
#define __ESIMD_MASK_DEPRECATION_MSG \
25-
"Use of 'simd'/'simd_view<simd,...>' class to represent predicate or mask " \
26-
"is deprecated. Use " \
27-
"'simd_mask'/'simd_view<simd_mask,...>' instead."
28-
2924
template <typename T, int N>
3025
class simd_mask_impl
3126
: public detail::simd_obj_impl<
@@ -51,10 +46,6 @@ class simd_mask_impl
5146
// TODO this should be made inaccessible from user code.
5247
simd_mask_impl(const raw_vector_type &Val) : base_type(Val) {}
5348

54-
/// Initializer list constructor.
55-
__SYCL_DEPRECATED("use constructor from array, e.g: simd_mask<3> x({0,1,1});")
56-
simd_mask_impl(std::initializer_list<T> Ilist) : base_type(Ilist) {}
57-
5849
/// Construct from an array. To allow e.g. simd_mask<N> m({1,0,0,1,...}).
5950
template <int N1, class = std::enable_if_t<N1 == N>>
6051
simd_mask_impl(const raw_element_type (&&Arr)[N1]) {
@@ -64,22 +55,6 @@ class simd_mask_impl
6455
/// Implicit conversion from simd.
6556
simd_mask_impl(const simd<T, N> &Val) : base_type(Val.data()) {}
6657

67-
/// Implicit conversion from simd_view<simd,...>.
68-
template <
69-
// viewed simd class parameters
70-
int N1, class T1,
71-
// view region
72-
class RegionT2,
73-
// view element type
74-
class T2 = typename __SEIEE::shape_type<RegionT2>::element_type,
75-
// view size in elements
76-
int N2 = __SEIEE::shape_type<RegionT2>::length,
77-
// enable only if view length and element type match this object
78-
class = std::enable_if_t<N == N2 && std::is_same_v<T, T2>>>
79-
__SYCL_DEPRECATED(__ESIMD_MASK_DEPRECATION_MSG)
80-
simd_mask_impl(const simd_view<simd<T1, N1>, RegionT2> &Val)
81-
: base_type(Val.read().data()) {}
82-
8358
private:
8459
static inline constexpr bool mask_size_ok_for_mem_io() {
8560
constexpr unsigned Sz = sizeof(element_type) * N;

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

Lines changed: 1 addition & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -155,22 +155,6 @@ class simd_obj_impl {
155155
set(Val);
156156
}
157157

158-
/// This constructor is deprecated for two reasons:
159-
/// 1) it adds confusion between
160-
/// simd s1(1,2); //calls next constructor
161-
/// simd s2{1,2}; //calls this constructor (uniform initialization syntax)
162-
/// 2) no compile-time control over the size of the initializer; e.g. the
163-
/// following will compile:
164-
/// simd<int, 2> x = {1, 2, 3, 4};
165-
__SYCL_DEPRECATED("use constructor from array, e.g: simd<int,3> x({1,2,3});")
166-
simd_obj_impl(std::initializer_list<RawTy> Ilist) noexcept {
167-
__esimd_dbg_print(simd_obj_impl(std::initializer_list<RawTy> Ilist));
168-
int i = 0;
169-
for (auto It = Ilist.begin(); It != Ilist.end() && i < N; ++It) {
170-
M_data[i++] = *It;
171-
}
172-
}
173-
174158
/// Initialize a simd_obj_impl object with an initial value and step.
175159
simd_obj_impl(Ty Val, Ty Step) noexcept {
176160
__esimd_dbg_print(simd_obj_impl(Ty Val, Ty Step));
@@ -294,12 +278,6 @@ class simd_obj_impl {
294278
return RetTy{cast_this_to_derived(), TopRegionTy{0}};
295279
}
296280

297-
template <typename EltTy>
298-
__SYCL_DEPRECATED("use simd_obj_impl::bit_cast_view.")
299-
auto format() & {
300-
return bit_cast_view<EltTy>();
301-
}
302-
303281
/// View as a 2-dimensional simd_view.
304282
template <typename EltTy, int Height, int Width>
305283
auto bit_cast_view() &[[clang::lifetimebound]] {
@@ -308,12 +286,6 @@ class simd_obj_impl {
308286
return RetTy{cast_this_to_derived(), TopRegionTy{0, 0}};
309287
}
310288

311-
template <typename EltTy, int Height, int Width>
312-
__SYCL_DEPRECATED("use simd_obj_impl::bit_cast_view.")
313-
auto format() & {
314-
return bit_cast_view<EltTy, Height, Width>();
315-
}
316-
317289
/// 1D region select, apply a region on top of this LValue object.
318290
///
319291
/// \tparam Size is the number of elements to be selected.
@@ -347,22 +319,12 @@ class simd_obj_impl {
347319
/// Read single element, return value only (not reference).
348320
Ty operator[](int i) const { return bitcast_to_wrapper_type<Ty>(data()[i]); }
349321

350-
/// Read single element, return value only (not reference).
351-
__SYCL_DEPRECATED("use operator[] form.")
352-
Ty operator()(int i) const { return bitcast_to_wrapper_type<Ty>(data()[i]); }
353-
354322
/// Return writable view of a single element.
355323
simd_view<Derived, region1d_scalar_t<Ty>> operator[](int i)
356324
[[clang::lifetimebound]] {
357325
return select<1, 1>(i);
358326
}
359327

360-
/// Return writable view of a single element.
361-
__SYCL_DEPRECATED("use operator[] form.")
362-
simd_view<Derived, region1d_scalar_t<Ty>> operator()(int i) {
363-
return select<1, 1>(i);
364-
}
365-
366328
// TODO ESIMD_EXPERIMENTAL
367329
/// Read multiple elements by their indices in vector
368330
template <int Size>
@@ -398,17 +360,7 @@ class simd_obj_impl {
398360
/// \tparam Rep is number of times region has to be replicated.
399361
/// \return replicated simd_obj_impl instance.
400362
template <int Rep> resize_a_simd_type_t<Derived, Rep * N> replicate() const {
401-
return replicate<Rep, N>(0);
402-
}
403-
404-
/// \tparam Rep is number of times region has to be replicated.
405-
/// \tparam W is width of src region to replicate.
406-
/// \param Offset is offset in number of elements in src region.
407-
/// \return replicated simd_obj_impl instance.
408-
template <int Rep, int W>
409-
__SYCL_DEPRECATED("use simd_obj_impl::replicate_w")
410-
resize_a_simd_type_t<Derived, Rep * W> replicate(uint16_t Offset) const {
411-
return replicate_w<Rep, W>(Offset);
363+
return replicate_w<Rep, N>(0);
412364
}
413365

414366
/// \tparam Rep is number of times region has to be replicated.
@@ -420,17 +372,6 @@ class simd_obj_impl {
420372
return replicate_vs_w_hs<Rep, 0, W, 1>(Offset);
421373
}
422374

423-
/// \tparam Rep is number of times region has to be replicated.
424-
/// \tparam VS vertical stride of src region to replicate.
425-
/// \tparam W is width of src region to replicate.
426-
/// \param Offset is offset in number of elements in src region.
427-
/// \return replicated simd_obj_impl instance.
428-
template <int Rep, int VS, int W>
429-
__SYCL_DEPRECATED("use simd_obj_impl::replicate_vs_w")
430-
resize_a_simd_type_t<Derived, Rep * W> replicate(uint16_t Offset) const {
431-
return replicate_vs_w<Rep, VS, W>(Offset);
432-
}
433-
434375
/// \tparam Rep is number of times region has to be replicated.
435376
/// \tparam VS vertical stride of src region to replicate.
436377
/// \tparam W width of src region to replicate.
@@ -441,18 +382,6 @@ class simd_obj_impl {
441382
return replicate_vs_w_hs<Rep, VS, W, 1>(Offset);
442383
}
443384

444-
/// \tparam Rep is number of times region has to be replicated.
445-
/// \tparam VS vertical stride of src region to replicate.
446-
/// \tparam W is width of src region to replicate.
447-
/// \tparam HS horizontal stride of src region to replicate.
448-
/// \param Offset is offset in number of elements in src region.
449-
/// \return replicated simd_obj_impl instance.
450-
template <int Rep, int VS, int W, int HS>
451-
__SYCL_DEPRECATED("use simd_obj_impl::replicate_vs_w_hs")
452-
resize_a_simd_type_t<Derived, Rep * W> replicate(uint16_t Offset) const {
453-
return replicate_vs_w_hs<Rep, VS, W, HS>(Offset);
454-
}
455-
456385
/// \tparam Rep is number of times region has to be replicated.
457386
/// \tparam VS vertical stride of src region to replicate.
458387
/// \tparam W is width of src region to replicate.

0 commit comments

Comments
 (0)