Skip to content

Commit 3b318ca

Browse files
Prefetch changes
1 parent fc44e23 commit 3b318ca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sycl/include/sycl/ext/oneapi/experimental/prefetch.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ inline constexpr bool check_prefetch_acc_mode =
7171
template <typename T, typename Properties>
7272
void prefetch_impl(T *ptr, size_t bytes, Properties properties) {
7373
#ifdef __SYCL_DEVICE_ONLY__
74-
auto *ptrGlobalAS = __SYCL_GenericCastToPtrExplicit_ToGlobal<const char>(ptr);
74+
auto *ptrGlobalAS =
75+
reinterpret_cast<__attribute__((opencl_global)) const char *>(
76+
detail::static_address_cast<access::address_space::global_space>(
77+
const_cast<const T *>(ptr)));
7578
const __attribute__((opencl_global)) char *ptrAnnotated = nullptr;
7679
if constexpr (!properties.template has_property<prefetch_hint_key>()) {
7780
ptrAnnotated = __builtin_intel_sycl_ptr_annotation(

0 commit comments

Comments
 (0)