Skip to content

Commit 18218f0

Browse files
Compile time conditions of enabling prefetch instruction now includes defined(COMPILER_GCC3).
Change: 148228903
1 parent b03e840 commit 18218f0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tensorflow/core/platform/prefetch.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ void prefetch(const void* x);
4444
// ---------------------------------------------------------------------------
4545
template <PrefetchHint hint>
4646
inline void prefetch(const void* x) {
47-
#if defined(__llvm__) || defined(COMPILER_GCC)
47+
// Check of COMPILER_GCC macro below is kept only for backward-compatibility
48+
// reasons. COMPILER_GCC3 is the macro that actually enables prefetch.
49+
#if defined(__llvm__) || defined(COMPILER_GCC) || defined(COMPILER_GCC3)
4850
__builtin_prefetch(x, 0, hint);
4951
#else
5052
// You get no effect. Feel free to add more sections above.

0 commit comments

Comments
 (0)