diff options
Diffstat (limited to 'recipes-framework/tensorflow/files/0001-CheckFeatureOrDie-use-warning-to-avoid-die.patch')
-rw-r--r-- | recipes-framework/tensorflow/files/0001-CheckFeatureOrDie-use-warning-to-avoid-die.patch | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/recipes-framework/tensorflow/files/0001-CheckFeatureOrDie-use-warning-to-avoid-die.patch b/recipes-framework/tensorflow/files/0001-CheckFeatureOrDie-use-warning-to-avoid-die.patch index 6d6ba09..7bde666 100644 --- a/recipes-framework/tensorflow/files/0001-CheckFeatureOrDie-use-warning-to-avoid-die.patch +++ b/recipes-framework/tensorflow/files/0001-CheckFeatureOrDie-use-warning-to-avoid-die.patch @@ -1,6 +1,6 @@ -From 419877ee8785f6d5850cc1d3d432ab43e51f47b9 Mon Sep 17 00:00:00 2001 +From 1455cd4232f382b73cb4ff6dfa6ccc7bd5197428 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Mon, 29 Apr 2019 08:54:57 +0000 +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, @@ -10,27 +10,32 @@ Upstream-Status: Inappropriate [oe specific] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- - tensorflow/core/platform/cpu_feature_guard.cc | 4 ---- - 1 file changed, 4 deletions(-) + 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 2efe0c0876..75149177aa 100644 +index 11a438925c1..9874ed34793 100644 --- a/tensorflow/core/platform/cpu_feature_guard.cc +++ b/tensorflow/core/platform/cpu_feature_guard.cc -@@ -29,13 +29,9 @@ namespace { - // If the CPU feature isn't present, log a fatal error. - void CheckFeatureOrDie(CPUFeature feature, const string& feature_name) { - if (!TestCPUFeature(feature)) { +@@ -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 to - // avoid crashes when testing, switch this to a warning. - LOG(WARNING) + // 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 -- LOG(FATAL) +- // Avoiding use of the logging framework here as that might trigger a SIGILL +- // by itself. +- std::cerr << error_msg << std::endl; +- std::abort(); -#endif - << "The TensorFlow library was compiled to use " << feature_name - << " instructions, but these aren't available on your machine."; } + } + -- -2.17.1 +2.36.0 |