Skip to content

Commit 984c88c

Browse files
authored
[SYCL][ESIMD] Change default cache hints for prefetch (#12931)
This patch makes it a requirement for user to specify both L1 and L2 cache hints when call prefetch() function, which is similar to the old lsc_prefetch() API.
1 parent 8027266 commit 984c88c

File tree

3 files changed

+167
-378
lines changed

3 files changed

+167
-378
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8595,10 +8595,10 @@ prefetch(const T *p, simd<OffsetT, N / VS> byte_offsets, simd_mask<N / VS> mask,
85958595

85968596
constexpr auto L1Hint =
85978597
detail::getPropertyValue<PropertyListT, cache_hint_L1_key>(
8598-
cache_hint::uncached);
8598+
cache_hint::none);
85998599
constexpr auto L2Hint =
86008600
detail::getPropertyValue<PropertyListT, cache_hint_L2_key>(
8601-
cache_hint::cached);
8601+
cache_hint::none);
86028602
detail::prefetch_impl<T, VS, detail::lsc_data_size::default_size, L1Hint,
86038603
L2Hint>(p, byte_offsets, mask);
86048604
}
@@ -8769,10 +8769,10 @@ prefetch(const T *p, OffsetT byte_offset, simd_mask<1> mask,
87698769
PropertyListT props = {}) {
87708770
constexpr auto L1Hint =
87718771
detail::getPropertyValue<PropertyListT, cache_hint_L1_key>(
8772-
cache_hint::uncached);
8772+
cache_hint::none);
87738773
constexpr auto L2Hint =
87748774
detail::getPropertyValue<PropertyListT, cache_hint_L2_key>(
8775-
cache_hint::cached);
8775+
cache_hint::none);
87768776
detail::prefetch_impl<T, VS, detail::lsc_data_size::default_size, L1Hint,
87778777
L2Hint>(p, byte_offset, mask);
87788778
}
@@ -8931,10 +8931,10 @@ prefetch(AccessorT acc, simd<OffsetT, N / VS> byte_offsets,
89318931

89328932
constexpr auto L1Hint =
89338933
detail::getPropertyValue<PropertyListT, cache_hint_L1_key>(
8934-
cache_hint::uncached);
8934+
cache_hint::none);
89358935
constexpr auto L2Hint =
89368936
detail::getPropertyValue<PropertyListT, cache_hint_L2_key>(
8937-
cache_hint::cached);
8937+
cache_hint::none);
89388938
detail::prefetch_impl<T, VS, detail::lsc_data_size::default_size, L1Hint,
89398939
L2Hint>(acc, byte_offsets, mask);
89408940
#endif // __ESIMD_FORCE_STATELESS_MEM
@@ -9130,10 +9130,10 @@ prefetch(AccessorT acc, OffsetT byte_offset, simd_mask<1> mask,
91309130
#else
91319131
constexpr auto L1Hint =
91329132
detail::getPropertyValue<PropertyListT, cache_hint_L1_key>(
9133-
cache_hint::uncached);
9133+
cache_hint::none);
91349134
constexpr auto L2Hint =
91359135
detail::getPropertyValue<PropertyListT, cache_hint_L2_key>(
9136-
cache_hint::cached);
9136+
cache_hint::none);
91379137
detail::prefetch_impl<T, VS, detail::lsc_data_size::default_size, L1Hint,
91389138
L2Hint>(acc, byte_offset, mask);
91399139
#endif // __ESIMD_FORCE_STATELESS_MEM

0 commit comments

Comments
 (0)