Skip to content

Commit 3d66a50

Browse files
committed
Apply review comments
1 parent 5e6549c commit 3d66a50

File tree

3 files changed

+2
-28
lines changed

3 files changed

+2
-28
lines changed

sycl/include/sycl/detail/spirv.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,12 +1239,12 @@ ControlBarrier(Group, [[maybe_unused]] memory_scope FenceScope,
12391239
template <typename Group>
12401240
typename std::enable_if_t<
12411241
ext::oneapi::experimental::is_user_constructed_group_v<Group>>
1242-
ControlBarrier(Group g, [[maybe_unused]] memory_scope FenceScope,
1242+
ControlBarrier([[maybe_unused]] Group g,
1243+
[[maybe_unused]] memory_scope FenceScope,
12431244
[[maybe_unused]] memory_order Order) {
12441245
#if defined(__NVPTX__)
12451246
__nvvm_bar_warp_sync(detail::ExtractMask(detail::GetMask(g))[0]);
12461247
#elif defined(__SYCL_DEVICE_ONLY__)
1247-
(void)g;
12481248
// SPIR-V does not define an instruction to synchronize partial groups.
12491249
// However, most (possibly all?) of the current SPIR-V targets execute
12501250
// work-items in lockstep, so we can probably get away with a MemoryBarrier.

sycl/source/detail/platform_util.cpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -131,28 +131,6 @@ uint32_t PlatformUtil::getNativeVectorWidth(PlatformUtil::TypeIndex TIndex) {
131131
return 0;
132132
}
133133

134-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
135-
void PlatformUtil::prefetch(const char *Ptr, size_t NumBytes) {
136-
if (!Ptr)
137-
return;
138-
139-
const size_t CacheLineSize = PlatformUtil::getMemCacheLineSize();
140-
const size_t CacheLineMask = ~(CacheLineSize - 1);
141-
const char *PtrEnd = Ptr + NumBytes;
142-
143-
// Set the pointer to the beginning of the current cache line.
144-
Ptr = reinterpret_cast<const char *>(reinterpret_cast<size_t>(Ptr) &
145-
CacheLineMask);
146-
for (; Ptr < PtrEnd; Ptr += CacheLineSize) {
147-
#if defined(__SYCL_RT_OS_LINUX)
148-
__builtin_prefetch(Ptr);
149-
#elif defined(__SYCL_RT_OS_WINDOWS)
150-
_mm_prefetch(Ptr, _MM_HINT_T0);
151-
#endif
152-
}
153-
}
154-
#endif
155-
156134
} // namespace detail
157135
} // namespace _V1
158136
} // namespace sycl

sycl/source/detail/platform_util.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ struct PlatformUtil {
4242
static uint32_t getMemCacheLineSize();
4343

4444
static uint64_t getMemCacheSize();
45-
46-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
47-
static void prefetch(const char *Ptr, size_t NumBytes);
48-
#endif
4945
};
5046

5147
} // namespace detail

0 commit comments

Comments
 (0)