MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / CheckFeatureOrDie

Function CheckFeatureOrDie

tensorflow/core/platform/cpu_feature_guard.cc:30–42  ·  view source on GitHub ↗

If the CPU feature isn't present, log a fatal error.

Source from the content-addressed store, hash-verified

28
29// If the CPU feature isn't present, log a fatal error.
30void CheckFeatureOrDie(CPUFeature feature, const string& feature_name) {
31 if (!TestCPUFeature(feature)) {
32#ifdef __ANDROID__
33 // Some Android emulators seem to indicate they don't support SSE, so to
34 // avoid crashes when testing, switch this to a warning.
35 LOG(WARNING)
36#else
37 LOG(FATAL)
38#endif
39 << "The TensorFlow library was compiled to use " << feature_name
40 << " instructions, but these aren't available on your machine.";
41 }
42}
43
44// Check if CPU feature is included in the TensorFlow binary.
45void CheckIfFeatureUnused(CPUFeature feature, const string& feature_name,

Callers 1

CPUFeatureGuardMethod · 0.85

Calls 1

TestCPUFeatureFunction · 0.85

Tested by

no test coverage detected