Skip to content

Commit 8b19948

Browse files
[SYCL][ESIMD] Adjust lsc_gather to SYCL APIs change (#13567)
This should fix post-commit issue caused by #13443
1 parent 9992f2a commit 8b19948

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

sycl/include/sycl/ext/intel/esimd/detail/util.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,9 @@ auto accessorToPointer(AccessorTy Acc, OffsetTy Offset = 0) {
204204
std::conditional_t<std::is_const_v<typename AccessorTy::value_type>,
205205
const T *, T *>;
206206
auto BytePtr =
207-
reinterpret_cast<QualCharPtrType>(Acc.get_pointer().get()) + Offset;
207+
reinterpret_cast<QualCharPtrType>(
208+
Acc.template get_multi_ptr<access::decorated::yes>().get()) +
209+
Offset;
208210
return reinterpret_cast<QualTPtrType>(BytePtr);
209211
}
210212
#endif // __ESIMD_FORCE_STATELESS_MEM

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#pragma once
1212

1313
#include <sycl/ext/intel/esimd/common.hpp>
14+
#include <sycl/ext/intel/esimd/detail/util.hpp>
1415
#include <sycl/ext/intel/esimd/memory.hpp>
1516
#include <sycl/ext/intel/experimental/esimd/detail/memory_intrin.hpp>
1617
#include <sycl/ext/intel/experimental/esimd/detail/util.hpp>
@@ -783,7 +784,7 @@ __ESIMD_API
783784
__ESIMD_NS::simd_mask<N> pred = 1) {
784785
#ifdef __ESIMD_FORCE_STATELESS_MEM
785786
return lsc_gather<T, NElts, DS, L1H, L2H>(
786-
reinterpret_cast<T *>(acc.get_pointer().get()), offsets, pred);
787+
__ESIMD_DNS::accessorToPointer<T>(acc), offsets, pred);
787788
#else
788789
__ESIMD_NS::simd<T, N * NElts> PassThru; // Intentionally uninitialized.
789790
using PropertyListT = __ESIMD_DNS::make_L1_L2_properties_t<L1H, L2H>;
@@ -858,7 +859,8 @@ __ESIMD_API
858859
__ESIMD_NS::simd<T, N * NElts> pass_thru) {
859860
#ifdef __ESIMD_FORCE_STATELESS_MEM
860861
return lsc_gather<T, NElts, DS, L1H, L2H>(
861-
reinterpret_cast<T *>(acc.get_pointer().get()), offsets, pred, pass_thru);
862+
reinterpret_cast<T *>(__ESIMD_DNS::accessorToPointer<T>(acc)), offsets,
863+
pred, pass_thru);
862864

863865
#else
864866
using PropertyListT = __ESIMD_DNS::make_L1_L2_properties_t<L1H, L2H>;

0 commit comments

Comments
 (0)