aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party
diff options
context:
space:
mode:
authorGravatar Ilya Biryukov <ibiryukov@google.com>2018-02-22 03:11:14 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-02-22 03:14:57 -0800
commit37a5b16eb44e547d5122090ae1388e3ae60a2170 (patch)
treef94f45f629de21f2242cd8b7d664356691a1e71f /third_party
parent1b00edea4688111396683b967f0ad5f5848d2ece (diff)
Fix compile errors by patching eigen locally.
PiperOrigin-RevId: 186592198
Diffstat (limited to 'third_party')
-rw-r--r--third_party/eigen_fix_cuda_compilation.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/third_party/eigen_fix_cuda_compilation.patch b/third_party/eigen_fix_cuda_compilation.patch
new file mode 100644
index 0000000000..b921a7c31d
--- /dev/null
+++ b/third_party/eigen_fix_cuda_compilation.patch
@@ -0,0 +1,38 @@
+diff --git a/Eigen/src/Core/ProductEvaluators.h b/Eigen/src/Core/ProductEvaluators.h
+--- a/Eigen/src/Core/ProductEvaluators.h
++++ b/Eigen/src/Core/ProductEvaluators.h
+@@ -137,7 +137,7 @@ struct Assignment<DstXprType, Product<Lh
+ typename enable_if<(Options==DefaultProduct || Options==AliasFreeProduct)>::type>
+ {
+ typedef Product<Lhs,Rhs,Options> SrcXprType;
+- static EIGEN_STRONG_INLINE
++ static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
+ void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<Scalar,Scalar> &)
+ {
+ Index dstRows = src.rows();
+@@ -390,7 +390,7 @@ struct generic_product_impl<Lhs,Rhs,Dens
+ typedef typename Product<Lhs,Rhs>::Scalar Scalar;
+
+ template<typename Dst>
+- static EIGEN_STRONG_INLINE void evalTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
++ static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
+ {
+ // Same as: dst.noalias() = lhs.lazyProduct(rhs);
+ // but easier on the compiler side
+@@ -398,14 +398,14 @@ struct generic_product_impl<Lhs,Rhs,Dens
+ }
+
+ template<typename Dst>
+- static EIGEN_STRONG_INLINE void addTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
++ static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void addTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
+ {
+ // dst.noalias() += lhs.lazyProduct(rhs);
+ call_assignment_no_alias(dst, lhs.lazyProduct(rhs), internal::add_assign_op<typename Dst::Scalar,Scalar>());
+ }
+
+ template<typename Dst>
+- static EIGEN_STRONG_INLINE void subTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
++ static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void subTo(Dst& dst, const Lhs& lhs, const Rhs& rhs)
+ {
+ // dst.noalias() -= lhs.lazyProduct(rhs);
+ call_assignment_no_alias(dst, lhs.lazyProduct(rhs), internal::sub_assign_op<typename Dst::Scalar,Scalar>());