aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-framework/tensorflow/files/0001-fix-gcc-internal-compile-error-on-qemuarm64.patch
blob: aca3de4e5f355dcb198ab946c5837d289af8eec4 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
From e9871369eee1d98652eaf1c7dcc6adaf72733f55 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Wed, 13 Feb 2019 20:58:17 -0500
Subject: [PATCH] fix gcc internal compile error on qemuarm64

Backport a fix from eigen upstream to fix the error.

Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 tensorflow/workspace.bzl                           |  1 +
 ...ling-workaround-on-architectures-with-SSE.patch | 28 ++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 third_party/0001-enable-spilling-workaround-on-architectures-with-SSE.patch

diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl
index 12c6fab..aa49190 100755
--- a/tensorflow/workspace.bzl
+++ b/tensorflow/workspace.bzl
@@ -144,6 +144,7 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""):
     tf_http_archive(
         name = "eigen_archive",
         build_file = clean_dep("//third_party:eigen.BUILD"),
+        patch_file = clean_dep("//third_party:0001-enable-spilling-workaround-on-architectures-with-SSE.patch"),
         sha256 = "753fbb58d0a49b6bcbcfb126ebfa2e21fc97f7471529ba835a096008ce588d8a",
         strip_prefix = "eigen-eigen-9f48e814419e",
         urls = [
diff --git a/third_party/0001-enable-spilling-workaround-on-architectures-with-SSE.patch b/third_party/0001-enable-spilling-workaround-on-architectures-with-SSE.patch
new file mode 100644
index 0000000..e3848bd
--- /dev/null
+++ b/third_party/0001-enable-spilling-workaround-on-architectures-with-SSE.patch
@@ -0,0 +1,28 @@
+From c1b4d0195674d4196683d4988d774e74e3cc291a Mon Sep 17 00:00:00 2001
+From: Gael Guennebaud <g.gael@free.fr>
+Date: Mon, 10 Dec 2018 23:22:44 +0100
+Subject: [PATCH] enable spilling workaround on architectures with SSE/AVX
+
+Upstream-Status: Backport [https://github.com/eigenteam/eigen-git-mirror.git]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+---
+ Eigen/src/Core/products/GeneralBlockPanelKernel.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Eigen/src/Core/products/GeneralBlockPanelKernel.h b/Eigen/src/Core/products/GeneralBlockPanelKernel.h
+index 61521e2..b1e98b6 100644
+--- a/Eigen/src/Core/products/GeneralBlockPanelKernel.h
++++ b/Eigen/src/Core/products/GeneralBlockPanelKernel.h
+@@ -1391,7 +1391,7 @@ void gebp_kernel<LhsScalar,RhsScalar,Index,DataMapper,mr,nr,ConjugateLhs,Conjuga
+ 
+           // NOTE: the begin/end asm comments below work around bug 935!
+           // but they are not enough for gcc>=6 without FMA (bug 1637)
+-          #if EIGEN_GNUC_AT_LEAST(6,0)
++          #if EIGEN_GNUC_AT_LEAST(6,0) && defined(EIGEN_VECTORIZE_SSE)
+             #define EIGEN_GEBP_2PX4_SPILLING_WORKAROUND __asm__  ("" : [a0] "+rm" (A0),[a1] "+rm" (A1));
+           #else
+             #define EIGEN_GEBP_2PX4_SPILLING_WORKAROUND
+-- 
+2.8.1
+
-- 
2.8.1