Skip to content

Commit 5627e26

Browse files
[ESIMD] Only dword types are supported by slm_load/store
1 parent 15e0ab1 commit 5627e26

File tree

1 file changed

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

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,15 +654,17 @@ SYCL_EXTERNAL SYCL_ESIMD_FUNCTION void slm_init(uint32_t size);
654654
/// Only allow simd-16 and simd-32.
655655
template <typename T, int n>
656656
ESIMD_INLINE ESIMD_NODEBUG
657-
typename sycl::detail::enable_if_t<(n == 16 || n == 32), simd<T, n>>
657+
typename sycl::detail::enable_if_t<(n == 16 || n == 32) && (sizeof(T) == 4),
658+
simd<T, n>>
658659
slm_load(simd<uint32_t, n> offsets, simd<uint16_t, n> pred = 1) {
659660
return __esimd_slm_read<T, n>(offsets.data(), pred.data());
660661
}
661662

662663
/// SLM scatter.
663664
template <typename T, int n>
664665
ESIMD_INLINE ESIMD_NODEBUG
665-
typename sycl::detail::enable_if_t<(n == 16 || n == 32), void>
666+
typename sycl::detail::enable_if_t<(n == 16 || n == 32) && (sizeof(T) == 4),
667+
void>
666668
slm_store(simd<T, n> vals, simd<uint32_t, n> offsets,
667669
simd<uint16_t, n> pred = 1) {
668670
__esimd_slm_write<T, n>(offsets.data(), vals.data(), pred.data());

0 commit comments

Comments
 (0)