aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2019-04-29 17:00:56 +0800
committerHongxu Jia <hongxu.jia@windriver.com>2019-05-01 22:53:26 +0800
commit00284c4f3063860553665d032a6fe035def87a5b (patch)
tree7d16b4fcf6005e29baaf93457b358ec7bd68eff8
parent9204d834036ad8911d0aa873305110c824325801 (diff)
downloadmeta-tensorflow-00284c4f3063860553665d032a6fe035def87a5b.tar.gz
meta-tensorflow-00284c4f3063860553665d032a6fe035def87a5b.tar.bz2
meta-tensorflow-00284c4f3063860553665d032a6fe035def87a5b.zip
tensorflow: fix 32-bit tensorflow failure on qemux86-64
Run 32-bit tensorflow on qemux86-64, it broke at CheckFeatureOrDie, use warning to workaround. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-rw-r--r--recipes-framework/tensorflow/files/0001-CheckFeatureOrDie-use-warning-to-avoid-die.patch36
-rw-r--r--recipes-framework/tensorflow/tensorflow_1.13.0.bb1
2 files changed, 37 insertions, 0 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
new file mode 100644
index 0000000..6d6ba09
--- /dev/null
+++ b/recipes-framework/tensorflow/files/0001-CheckFeatureOrDie-use-warning-to-avoid-die.patch
@@ -0,0 +1,36 @@
+From 419877ee8785f6d5850cc1d3d432ab43e51f47b9 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 29 Apr 2019 08:54:57 +0000
+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 | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/tensorflow/core/platform/cpu_feature_guard.cc b/tensorflow/core/platform/cpu_feature_guard.cc
+index 2efe0c0876..75149177aa 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)) {
+-#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)
+-#else
+- LOG(FATAL)
+-#endif
+ << "The TensorFlow library was compiled to use " << feature_name
+ << " instructions, but these aren't available on your machine.";
+ }
+--
+2.17.1
+
diff --git a/recipes-framework/tensorflow/tensorflow_1.13.0.bb b/recipes-framework/tensorflow/tensorflow_1.13.0.bb
index 4954bea..2f32cec 100644
--- a/recipes-framework/tensorflow/tensorflow_1.13.0.bb
+++ b/recipes-framework/tensorflow/tensorflow_1.13.0.bb
@@ -13,6 +13,7 @@ SRC_URI = "git://github.com/tensorflow/tensorflow.git;branch=r1.13 \
file://0001-label_image-tweak-default-model-location.patch \
file://0001-label_image.lite-tweak-default-model-location.patch \
file://0001-use-local-bazel-to-workaround-bazel-paralle-issue.patch \
+ file://0001-CheckFeatureOrDie-use-warning-to-avoid-die.patch \
file://BUILD \
file://BUILD.yocto_compiler \
file://CROSSTOOL.tpl \