Skip to content

Commit 250f5df

Browse files
authored
[SYCL][ESIMD][NFC] Clean up remaining intrinsics to use macro (#12370)
Only a few were left Signed-off-by: Sarnie, Nick <[email protected]>
1 parent ffd8464 commit 250f5df

File tree

1 file changed

+20
-102
lines changed

1 file changed

+20
-102
lines changed

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

Lines changed: 20 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,8 @@
1616
#include <sycl/ext/intel/esimd/detail/memory_intrin.hpp>
1717

1818
// generic work-group split barrier
19-
__ESIMD_INTRIN void __esimd_sbarrier(__ESIMD_ENS::split_barrier_action flag)
20-
#ifdef __SYCL_DEVICE_ONLY__
21-
;
22-
#else
23-
{
24-
__ESIMD_UNSUPPORTED_ON_HOST;
25-
}
26-
#endif // __SYCL_DEVICE_ONLY__
19+
__ESIMD_INTRIN void
20+
__esimd_sbarrier(__ESIMD_ENS::split_barrier_action flag) __ESIMD_INTRIN_END;
2721

2822
#ifdef __SYCL_DEVICE_ONLY__
2923
// Create an explicit data and GPU scoreboard dependency.
@@ -39,27 +33,13 @@ __ESIMD_INTRIN void __esimd_wait(uint16_t value);
3933
///
4034
/// @param thread_count - number of threads, ignored in 'wait' mode
4135
__ESIMD_INTRIN void __esimd_nbarrier(uint8_t mode, uint8_t id,
42-
uint8_t thread_count)
43-
#ifdef __SYCL_DEVICE_ONLY__
44-
;
45-
#else // __SYCL_DEVICE_ONLY__
46-
{
47-
__ESIMD_UNSUPPORTED_ON_HOST;
48-
}
49-
#endif // __SYCL_DEVICE_ONLY__
36+
uint8_t thread_count) __ESIMD_INTRIN_END;
5037

5138
/// Initialize number of named barriers for a kernel
5239
/// Available only on PVC
5340
///
5441
/// @param count - number of named barriers
55-
__ESIMD_INTRIN void __esimd_nbarrier_init(uint8_t count)
56-
#ifdef __SYCL_DEVICE_ONLY__
57-
;
58-
#else // __SYCL_DEVICE_ONLY__
59-
{
60-
__ESIMD_UNSUPPORTED_ON_HOST;
61-
}
62-
#endif // __SYCL_DEVICE_ONLY__
42+
__ESIMD_INTRIN void __esimd_nbarrier_init(uint8_t count) __ESIMD_INTRIN_END;
6343

6444
/// Raw send signal to perform signal operation on named barriers
6545
/// Available only on PVC
@@ -79,14 +59,8 @@ __ESIMD_INTRIN void __esimd_nbarrier_init(uint8_t count)
7959
template <typename Ty, int N>
8060
__ESIMD_INTRIN void __esimd_raw_send_nbarrier_signal(
8161
uint32_t is_sendc, uint32_t extended_descriptor, uint32_t descriptor,
82-
__ESIMD_DNS::vector_type_t<Ty, N> msg_var, uint16_t pred = 1)
83-
#ifdef __SYCL_DEVICE_ONLY__
84-
;
85-
#else // __SYCL_DEVICE_ONLY__
86-
{
87-
__ESIMD_UNSUPPORTED_ON_HOST;
88-
}
89-
#endif // __SYCL_DEVICE_ONLY__
62+
__ESIMD_DNS::vector_type_t<Ty, N> msg_var,
63+
uint16_t pred = 1) __ESIMD_INTRIN_END;
9064

9165
/// Surface-based prefetch gather.
9266
/// Supported platforms: DG2, PVC
@@ -114,14 +88,7 @@ template <typename Ty, __ESIMD_ENS::cache_hint L1H, __ESIMD_ENS::cache_hint L3H,
11488
__ESIMD_INTRIN void
11589
__esimd_lsc_prefetch_bti(__ESIMD_DNS::simd_mask_storage_t<N> pred,
11690
__ESIMD_DNS::vector_type_t<uint32_t, N> offsets,
117-
SurfIndAliasTy surf_ind)
118-
#ifdef __SYCL_DEVICE_ONLY__
119-
;
120-
#else // __SYCL_DEVICE_ONLY__
121-
{
122-
__ESIMD_UNSUPPORTED_ON_HOST;
123-
}
124-
#endif // __SYCL_DEVICE_ONLY__
91+
SurfIndAliasTy surf_ind) __ESIMD_INTRIN_END;
12592

12693
/// USM pointer prefetch gather.
12794
/// Supported platforms: DG2, PVC
@@ -143,16 +110,9 @@ template <typename Ty, __ESIMD_ENS::cache_hint L1H, __ESIMD_ENS::cache_hint L3H,
143110
uint16_t AddressScale, int ImmOffset, __ESIMD_ENS::lsc_data_size DS,
144111
__ESIMD_EDNS::lsc_vector_size VS,
145112
__ESIMD_EDNS::lsc_data_order _Transposed, int N>
146-
__ESIMD_INTRIN void
147-
__esimd_lsc_prefetch_stateless(__ESIMD_DNS::simd_mask_storage_t<N> pred,
148-
__ESIMD_DNS::vector_type_t<uintptr_t, N> addrs)
149-
#ifdef __SYCL_DEVICE_ONLY__
150-
;
151-
#else // __SYCL_DEVICE_ONLY__
152-
{
153-
__ESIMD_UNSUPPORTED_ON_HOST;
154-
}
155-
#endif // __SYCL_DEVICE_ONLY__
113+
__ESIMD_INTRIN void __esimd_lsc_prefetch_stateless(
114+
__ESIMD_DNS::simd_mask_storage_t<N> pred,
115+
__ESIMD_DNS::vector_type_t<uintptr_t, N> addrs) __ESIMD_INTRIN_END;
156116

157117
/// 2D USM pointer block load.
158118
/// Supported platforms: PVC
@@ -191,14 +151,7 @@ template <typename Ty, __ESIMD_ENS::cache_hint L1H, __ESIMD_ENS::cache_hint L3H,
191151
__ESIMD_INTRIN __ESIMD_DNS::vector_type_t<Ty, N>
192152
__esimd_lsc_load2d_stateless(__ESIMD_DNS::simd_mask_storage_t<N> Pred,
193153
uintptr_t Ptr, int SurfaceWidth, int SurfaceHeight,
194-
int SurfacePitch, int X, int Y)
195-
#ifdef __SYCL_DEVICE_ONLY__
196-
;
197-
#else // __SYCL_DEVICE_ONLY__
198-
{
199-
__ESIMD_UNSUPPORTED_ON_HOST;
200-
}
201-
#endif // __SYCL_DEVICE_ONLY__
154+
int SurfacePitch, int X, int Y) __ESIMD_INTRIN_END;
202155

203156
/// 2D USM pointer block prefetch.
204157
/// Supported platforms: PVC
@@ -230,14 +183,7 @@ template <typename Ty, __ESIMD_ENS::cache_hint L1H, __ESIMD_ENS::cache_hint L3H,
230183
int BlockWidth, int BlockHeight, bool Transformed, int N>
231184
__ESIMD_INTRIN void __esimd_lsc_prefetch2d_stateless(
232185
__ESIMD_DNS::simd_mask_storage_t<N> Pred, uintptr_t Ptr, int SurfaceWidth,
233-
int SurfaceHeight, int SurfacePitch, int X, int Y)
234-
#ifdef __SYCL_DEVICE_ONLY__
235-
;
236-
#else // __SYCL_DEVICE_ONLY__
237-
{
238-
__ESIMD_UNSUPPORTED_ON_HOST;
239-
}
240-
#endif // __SYCL_DEVICE_ONLY__
186+
int SurfaceHeight, int SurfacePitch, int X, int Y) __ESIMD_INTRIN_END;
241187

242188
/// 2D USM pointer block store.
243189
/// Supported platforms: PVC
@@ -272,18 +218,10 @@ template <typename Ty, __ESIMD_ENS::cache_hint L1H, __ESIMD_ENS::cache_hint L3H,
272218
__ESIMD_ENS::lsc_data_size DS,
273219
__ESIMD_EDNS::lsc_data_order _Transposed, uint8_t NBlocks,
274220
int BlockWidth, int BlockHeight, bool Transformed, int N>
275-
__ESIMD_INTRIN void
276-
__esimd_lsc_store2d_stateless(__ESIMD_DNS::simd_mask_storage_t<N> Pred,
277-
uintptr_t Ptr, int SurfaceWidth,
278-
int SurfaceHeight, int SurfacePitch, int X, int Y,
279-
__ESIMD_DNS::vector_type_t<Ty, N> vals)
280-
#ifdef __SYCL_DEVICE_ONLY__
281-
;
282-
#else // __SYCL_DEVICE_ONLY__
283-
{
284-
__ESIMD_UNSUPPORTED_ON_HOST;
285-
}
286-
#endif // __SYCL_DEVICE_ONLY__
221+
__ESIMD_INTRIN void __esimd_lsc_store2d_stateless(
222+
__ESIMD_DNS::simd_mask_storage_t<N> Pred, uintptr_t Ptr, int SurfaceWidth,
223+
int SurfaceHeight, int SurfacePitch, int X, int Y,
224+
__ESIMD_DNS::vector_type_t<Ty, N> vals) __ESIMD_INTRIN_END;
287225

288226
/// Memory fence.
289227
/// Supported platforms: DG2, PVC
@@ -295,31 +233,11 @@ __esimd_lsc_store2d_stateless(__ESIMD_DNS::simd_mask_storage_t<N> Pred,
295233
/// @param pred is predicates.
296234
template <__ESIMD_ENS::lsc_memory_kind Kind, __ESIMD_ENS::lsc_fence_op FenceOp,
297235
__ESIMD_ENS::lsc_scope Scope, int N>
298-
__ESIMD_INTRIN void __esimd_lsc_fence(__ESIMD_DNS::simd_mask_storage_t<N> pred)
299-
#ifdef __SYCL_DEVICE_ONLY__
300-
;
301-
#else // __SYCL_DEVICE_ONLY__
302-
{
303-
__ESIMD_UNSUPPORTED_ON_HOST;
304-
}
305-
#endif // __SYCL_DEVICE_ONLY__
236+
__ESIMD_INTRIN void
237+
__esimd_lsc_fence(__ESIMD_DNS::simd_mask_storage_t<N> pred) __ESIMD_INTRIN_END;
306238

307-
__ESIMD_INTRIN uint32_t __esimd_slm_alloc(uint32_t size)
308-
#ifdef __SYCL_DEVICE_ONLY__
309-
;
310-
#else // __SYCL_DEVICE_ONLY__
311-
{
312-
__ESIMD_UNSUPPORTED_ON_HOST;
313-
}
314-
#endif // __SYCL_DEVICE_ONLY__
239+
__ESIMD_INTRIN uint32_t __esimd_slm_alloc(uint32_t size) __ESIMD_INTRIN_END;
315240

316-
__ESIMD_INTRIN void __esimd_slm_free(uint32_t id)
317-
#ifdef __SYCL_DEVICE_ONLY__
318-
;
319-
#else // __SYCL_DEVICE_ONLY__
320-
{
321-
__ESIMD_UNSUPPORTED_ON_HOST;
322-
}
323-
#endif // __SYCL_DEVICE_ONLY__
241+
__ESIMD_INTRIN void __esimd_slm_free(uint32_t id) __ESIMD_INTRIN_END;
324242

325243
/// @endcond ESIMD_DETAIL

0 commit comments

Comments
 (0)