Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 159030457
  • Loading branch information
gunan authored and tensorflower-gardener committed Jun 14, 2017
1 parent f0a8bd9 commit 69bc160
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tensorflow/core/platform/cpu_feature_guard.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ std::once_flag g_cpu_feature_guard_warn_once_flag;

void WarnAboutUnusedCPUFeatures() {
std::call_once(g_cpu_feature_guard_warn_once_flag, [] {
#ifdef PLATFORM_WINDOWS
#ifndef __AVX__
WarnIfFeatureUnused(CPUFeature::AVX, "AVX");
#endif // __AVX__
#ifndef __AVX2__
WarnIfFeatureUnused(CPUFeature::AVX2, "AVX2");
#endif // __AVX2__
#else // ifdef platform windows
#ifndef __SSE__
WarnIfFeatureUnused(CPUFeature::SSE, "SSE");
#endif // __SSE__
Expand Down Expand Up @@ -123,6 +131,7 @@ void WarnAboutUnusedCPUFeatures() {
#ifndef __FMA__
WarnIfFeatureUnused(CPUFeature::FMA, "FMA");
#endif // __FMA__
#endif // else of ifdef platform windows
});
}

Expand Down

0 comments on commit 69bc160

Please sign in to comment.