diff options
Diffstat (limited to 'recipes-framework/tensorflow/files/0001-third_party-eigen_archive-workaround-ice-failure-whi.patch')
-rw-r--r-- | recipes-framework/tensorflow/files/0001-third_party-eigen_archive-workaround-ice-failure-whi.patch | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/recipes-framework/tensorflow/files/0001-third_party-eigen_archive-workaround-ice-failure-whi.patch b/recipes-framework/tensorflow/files/0001-third_party-eigen_archive-workaround-ice-failure-whi.patch new file mode 100644 index 0000000..b1571ab --- /dev/null +++ b/recipes-framework/tensorflow/files/0001-third_party-eigen_archive-workaround-ice-failure-whi.patch @@ -0,0 +1,111 @@ +From 385074d9300c18293a42c9d8ca9fb12cbffccb80 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Mon, 16 May 2022 23:15:47 -0700 +Subject: [PATCH] third_party/eigen_archive:workaround ice failure while + building from source with gcc 7.3.1 + +The root cause is gcc ice issue: +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89752 + +But we could not patch on native gcc,so try to workaround, +Refer: https://github.com/tensorflow/tensorflow/issues/25323 + +Upstream-Status: Inappropriate [wr-installer specific] + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + ...ailure-while-building-from-source-wi.patch | 69 +++++++++++++++++++ + third_party/eigen3/workspace.bzl | 1 + + 2 files changed, 70 insertions(+) + create mode 100644 third_party/eigen3/0001-workaround-ice-failure-while-building-from-source-wi.patch + +diff --git a/third_party/eigen3/0001-workaround-ice-failure-while-building-from-source-wi.patch b/third_party/eigen3/0001-workaround-ice-failure-while-building-from-source-wi.patch +new file mode 100644 +index 00000000000..436f35fca13 +--- /dev/null ++++ b/third_party/eigen3/0001-workaround-ice-failure-while-building-from-source-wi.patch +@@ -0,0 +1,69 @@ ++From 035fd96026e18d61c19da038ab2b0f7a61e97799 Mon Sep 17 00:00:00 2001 ++From: Hongxu Jia <hongxu.jia@windriver.com> ++Date: Mon, 19 Sep 2022 01:08:18 -0700 ++Subject: [PATCH] workaround ice failure while building from source with gcc ++ 7.3.1 ++ ++The root cause is gcc ice issue: ++https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89752 ++ ++But we could not patch on native gcc,so try to workaround, ++Refer: https://github.com/tensorflow/tensorflow/issues/25323 ++ ++Upstream-Status: Inappropriate [wr-installer specific] ++ ++Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ++--- ++ unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h | 3 ++- ++ unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h | 9 ++++++--- ++ 2 files changed, 8 insertions(+), 4 deletions(-) ++ ++diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h b/unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h ++index a9b281f..ec570d6 100644 ++--- a/unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h +++++ b/unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h ++@@ -544,7 +544,8 @@ struct TensorEvaluator<const TensorImagePatchOp<Rows, Cols, ArgType>, Device> ++ EIGEN_ALIGN_MAX std::remove_const_t<CoeffReturnType> values[PacketSize]; ++ EIGEN_UNROLL_LOOP ++ for (int i = 0; i < PacketSize; ++i) { ++- values[i] = coeff(index+i); +++ Self::CoeffReturnType a = coeff(index+i); +++ values[i] = a; ++ } ++ PacketReturnType rslt = internal::pload<PacketReturnType>(values); ++ return rslt; ++diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h ++index e62397a..fcd44c3 100644 ++--- a/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h +++++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h ++@@ -850,8 +850,9 @@ static constexpr bool RunningOnGPU = false; ++ const Index firstIndex = firstInput(index); ++ for (Index i = 0; i < PacketSize; ++i) { ++ Op reducer(m_reducer); ++- values[i] = internal::InnerMostDimReducer<Self, Op>::reduce(*this, firstIndex + i * num_values_to_reduce, +++ Self::CoeffReturnType a = internal::InnerMostDimReducer<Self, Op>::reduce(*this, firstIndex + i * num_values_to_reduce, ++ num_values_to_reduce, reducer); +++ values[i] = a; ++ } ++ } else if (PreservingInnerMostDims) { ++ const Index firstIndex = firstInput(index); ++@@ -864,12 +865,14 @@ static constexpr bool RunningOnGPU = false; ++ return reducer.finalizePacket(accum); ++ } else { ++ for (int i = 0; i < PacketSize; ++i) { ++- values[i] = coeff(index + i); +++ Self::CoeffReturnType a = coeff(index + i); +++ values[i] = a; ++ } ++ } ++ } else { ++ for (int i = 0; i < PacketSize; ++i) { ++- values[i] = coeff(index + i); +++ Self::CoeffReturnType a = coeff(index + i); +++ values[i] = a; ++ } ++ } ++ PacketReturnType rslt = internal::pload<PacketReturnType>(values); ++-- ++2.37.1 ++ +diff --git a/third_party/eigen3/workspace.bzl b/third_party/eigen3/workspace.bzl +index 1380722ee67..722cfbece83 100644 +--- a/third_party/eigen3/workspace.bzl ++++ b/third_party/eigen3/workspace.bzl +@@ -14,6 +14,7 @@ def repo(): + tf_http_archive( + name = "eigen_archive", + build_file = "//third_party/eigen3:eigen_archive.BUILD", ++ patch_file = ["//third_party/eigen3:0001-workaround-ice-failure-while-building-from-source-wi.patch"], + sha256 = EIGEN_SHA256, + strip_prefix = "eigen-{commit}".format(commit = EIGEN_COMMIT), + urls = tf_mirror_urls("https://gitlab.com/libeigen/eigen/-/archive/{commit}/eigen-{commit}.tar.gz".format(commit = EIGEN_COMMIT)), +-- +2.37.1 + |