aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-framework/tensorflow/files/0001-CheckFeatureOrDie-use-warning-to-avoid-die.patch
blob: 7bde66602f25a665120f4c41ed21eeae0aab3d7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From 1455cd4232f382b73cb4ff6dfa6ccc7bd5197428 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Mon, 16 May 2022 00:39:33 -0700
Subject: [PATCH] CheckFeatureOrDie: use warning to avoid die

Run 32-bit tensorflow on qemux86-64, it broke at CheckFeatureOrDie,
use warning to workaround.

Upstream-Status: Inappropriate [oe specific]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 tensorflow/core/platform/cpu_feature_guard.cc | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/tensorflow/core/platform/cpu_feature_guard.cc b/tensorflow/core/platform/cpu_feature_guard.cc
index 11a438925c1..9874ed34793 100644
--- a/tensorflow/core/platform/cpu_feature_guard.cc
+++ b/tensorflow/core/platform/cpu_feature_guard.cc
@@ -36,18 +36,11 @@ void CheckFeatureOrDie(CPUFeature feature, const string& feature_name) {
     const auto error_msg =
         "The TensorFlow library was compiled to use " + feature_name +
         " instructions, but these aren't available on your machine.";
-#ifdef __ANDROID__
     // Some Android emulators seem to indicate they don't support SSE, so we
     // only issue a warning to avoid crashes when testing. We use the logging
     // framework here because std::cout and std::cerr made some Android targets
     // crash.
     LOG(WARNING) << error_msg;
-#else
-    // Avoiding use of the logging framework here as that might trigger a SIGILL
-    // by itself.
-    std::cerr << error_msg << std::endl;
-    std::abort();
-#endif
   }
 }
 
-- 
2.36.0