If the CPU feature isn't present, log a fatal error.
| 28 | |
| 29 | // If the CPU feature isn't present, log a fatal error. |
| 30 | void 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. |
| 45 | void CheckIfFeatureUnused(CPUFeature feature, const string& feature_name, |
no test coverage detected