Skip to content

Commit 69f01cf

Browse files
Recovering 'PromoT' for ESIMD_EMULATOR for half_type support
1 parent d7ec3ca commit 69f01cf

File tree

1 file changed

+2
-8
lines changed
  • sycl/include/sycl/ext/intel/experimental/esimd

1 file changed

+2
-8
lines changed

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,6 @@ ESIMD_INLINE
347347
constexpr int16_t scale = 0;
348348
const auto si = __ESIMD_GET_SURF_HANDLE(acc);
349349

350-
#ifdef __SYCL_DEVICE_ONLY__
351350
if constexpr (sizeof(T) < 4) {
352351
using Tint = std::conditional_t<std::is_integral_v<T>, T,
353352
detail::uint_type_t<sizeof(T)>>;
@@ -359,9 +358,7 @@ ESIMD_INLINE
359358
const simd<PromoT, N> promo_vals = convert<PromoT>(std::move(vals_int));
360359
__esimd_scatter_scaled<PromoT, N, decltype(si), TypeSizeLog2, scale>(
361360
mask.data(), si, glob_offset, offsets.data(), promo_vals.data());
362-
} else
363-
#endif // __SYCL_DEVICE_ONLY__
364-
{
361+
} else {
365362
__esimd_scatter_scaled<T, N, decltype(si), TypeSizeLog2, scale>(
366363
mask.data(), si, glob_offset, offsets.data(), vals.data());
367364
}
@@ -380,7 +377,6 @@ gather_impl(AccessorTy acc, simd<uint32_t, N> offsets, uint32_t glob_offset,
380377
constexpr uint32_t scale = 0;
381378
const auto si = get_surface_index(acc);
382379

383-
#ifdef __SYCL_DEVICE_ONLY__
384380
if constexpr (sizeof(T) < 4) {
385381
using Tint = std::conditional_t<std::is_integral_v<T>, T,
386382
detail::uint_type_t<sizeof(T)>>;
@@ -401,9 +397,7 @@ gather_impl(AccessorTy acc, simd<uint32_t, N> offsets, uint32_t glob_offset,
401397
} else {
402398
return Res;
403399
}
404-
} else
405-
#endif // __SYCL_DEVICE_ONLY__
406-
{
400+
} else {
407401
return __esimd_gather_masked_scaled2<T, N, decltype(si), TypeSizeLog2,
408402
scale>(si, glob_offset, offsets.data(),
409403
mask.data());

0 commit comments

Comments
 (0)