Update Eigen to commit 1724f8760da8.
(1) Revert gebp_neon.patch.oss. PiperOrigin-RevId: 232725552
This commit is contained in:
parent
7bbc65be71
commit
ba9f4c017c
@ -120,8 +120,8 @@ tensorflow/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProdu
|
|||||||
tensorflow/third_party/eigen3/unsupported/Eigen/CXX11/ThreadPool
|
tensorflow/third_party/eigen3/unsupported/Eigen/CXX11/ThreadPool
|
||||||
tensorflow/third_party/eigen3/unsupported/Eigen/SpecialFunctions
|
tensorflow/third_party/eigen3/unsupported/Eigen/SpecialFunctions
|
||||||
tensorflow/third_party/eigen3/unsupported/Eigen/MatrixFunctions
|
tensorflow/third_party/eigen3/unsupported/Eigen/MatrixFunctions
|
||||||
|
tensorflow/third_party/eigen3/gpu_packet_math.patch
|
||||||
tensorflow/third_party/eigen3/LICENSE
|
tensorflow/third_party/eigen3/LICENSE
|
||||||
tensorflow/third_party/eigen3/gebp_neon.patch
|
|
||||||
tensorflow/third_party/eigen3/BUILD
|
tensorflow/third_party/eigen3/BUILD
|
||||||
tensorflow/third_party/systemlibs/build_defs.bzl.tpl
|
tensorflow/third_party/systemlibs/build_defs.bzl.tpl
|
||||||
tensorflow/third_party/systemlibs/absl_py.BUILD
|
tensorflow/third_party/systemlibs/absl_py.BUILD
|
||||||
|
@ -140,12 +140,12 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""):
|
|||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
name = "eigen_archive",
|
name = "eigen_archive",
|
||||||
build_file = clean_dep("//third_party:eigen.BUILD"),
|
build_file = clean_dep("//third_party:eigen.BUILD"),
|
||||||
patch_file = clean_dep("//third_party/eigen3:gebp_neon.patch"),
|
patch_file = clean_dep("//third_party/eigen3:gpu_packet_math.patch"),
|
||||||
sha256 = "48678550a32665331d729be87076e576f2502fff325f5b6c2c78ebf7b1b22c7b",
|
sha256 = "d1d2ac19b8ef386ad70b91932a90bfbc3014b801d14723b9c8373239128bd2dd",
|
||||||
strip_prefix = "eigen-eigen-bcc817c0ba98",
|
strip_prefix = "eigen-eigen-1724f8760da8",
|
||||||
urls = [
|
urls = [
|
||||||
"https://mirror.bazel.build/bitbucket.org/eigen/eigen/get/bcc817c0ba98.tar.gz",
|
"https://mirror.bazel.build/bitbucket.org/eigen/eigen/get/1724f8760da8.tar.gz",
|
||||||
"https://bitbucket.org/eigen/eigen/get/bcc817c0ba98.tar.gz",
|
"https://bitbucket.org/eigen/eigen/get/1724f8760da8.tar.gz",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
11
third_party/eigen3/gebp_neon.patch
vendored
11
third_party/eigen3/gebp_neon.patch
vendored
@ -1,11 +0,0 @@
|
|||||||
--- a/Eigen/src/Core/products/GeneralBlockPanelKernel.h 2019-01-22 20:46:51.000000000 -0800
|
|
||||||
+++ b/Eigen/src/Core/products/GeneralBlockPanelKernel.h 2019-01-25 13:48:49.000000000 -0800
|
|
||||||
@@ -1031,7 +1031,7 @@
|
|
||||||
|
|
||||||
EIGEN_STRONG_INLINE void madd(const LhsPacket& a, const RhsPacket& b, AccPacket& c, RhsPacket& /*tmp*/, const FixedInt<0>&) const
|
|
||||||
{
|
|
||||||
- c += a * b;
|
|
||||||
+ c = vfmaq_n_f32(c, a, b);
|
|
||||||
}
|
|
||||||
|
|
||||||
EIGEN_STRONG_INLINE void madd(const LhsPacket& a, const RhsPacketx4& b, AccPacket& c, RhsPacket& /*tmp*/, const FixedInt<0>&) const
|
|
18
third_party/eigen3/gpu_packet_math.patch
vendored
Normal file
18
third_party/eigen3/gpu_packet_math.patch
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
--- a/Eigen/src/Core/arch/GPU/PacketMath.h
|
||||||
|
+++ b/Eigen/src/Core/arch/GPU/PacketMath.h
|
||||||
|
@@ -100,6 +100,7 @@
|
||||||
|
return make_double2(from, from);
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if defined(EIGEN_CUDA_ARCH)
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float bitwise_and(const float& a,
|
||||||
|
@@ -211,6 +212,7 @@
|
||||||
|
pcmp_eq<double2>(const double2& a, const double2& b) {
|
||||||
|
return make_double2(eq_mask(a.x, b.x), eq_mask(a.y, b.y));
|
||||||
|
}
|
||||||
|
+#endif // EIGEN_CUDA_ARCH
|
||||||
|
|
||||||
|
template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE float4 plset<float4>(const float& a) {
|
||||||
|
return make_float4(a, a+1, a+2, a+3);
|
@ -178,25 +178,37 @@ template <>
|
|||||||
struct unpacket_traits<Packet32q8i> {
|
struct unpacket_traits<Packet32q8i> {
|
||||||
typedef QInt8 type;
|
typedef QInt8 type;
|
||||||
typedef Packet16q8i half;
|
typedef Packet16q8i half;
|
||||||
enum { size = 32, alignment = Aligned32 };
|
enum { size = 32, alignment = Aligned32, vectorizable = true };
|
||||||
|
};
|
||||||
|
template <>
|
||||||
|
struct unpacket_traits<Packet16q8i> {
|
||||||
|
typedef QInt8 type;
|
||||||
|
typedef Packet16q8i half;
|
||||||
|
enum { size = 16, alignment = Aligned32, vectorizable = true };
|
||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
struct unpacket_traits<Packet16q16i> {
|
struct unpacket_traits<Packet16q16i> {
|
||||||
typedef QInt16 type;
|
typedef QInt16 type;
|
||||||
typedef Packet8q16i half;
|
typedef Packet8q16i half;
|
||||||
enum { size = 16, alignment = Aligned32 };
|
enum { size = 16, alignment = Aligned32, vectorizable = true };
|
||||||
|
};
|
||||||
|
template <>
|
||||||
|
struct unpacket_traits<Packet8q16i> {
|
||||||
|
typedef QInt16 type;
|
||||||
|
typedef Packet8q16i half;
|
||||||
|
enum { size = 8, alignment = Aligned32, vectorizable = true };
|
||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
struct unpacket_traits<Packet32q8u> {
|
struct unpacket_traits<Packet32q8u> {
|
||||||
typedef QUInt8 type;
|
typedef QUInt8 type;
|
||||||
typedef Packet16q8u half;
|
typedef Packet16q8u half;
|
||||||
enum { size = 32, alignment = Aligned32 };
|
enum { size = 32, alignment = Aligned32, vectorizable = true };
|
||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
struct unpacket_traits<Packet8q32i> {
|
struct unpacket_traits<Packet8q32i> {
|
||||||
typedef QInt32 type;
|
typedef QInt32 type;
|
||||||
typedef Packet4q32i half;
|
typedef Packet4q32i half;
|
||||||
enum { size = 8, alignment = Aligned32 };
|
enum { size = 8, alignment = Aligned32, vectorizable = true };
|
||||||
};
|
};
|
||||||
|
|
||||||
// Unaligned load
|
// Unaligned load
|
||||||
@ -206,6 +218,11 @@ EIGEN_STRONG_INLINE Packet32q8i ploadu<Packet32q8i>(const QInt8* from) {
|
|||||||
reinterpret_cast<const __m256i*>(from));
|
reinterpret_cast<const __m256i*>(from));
|
||||||
}
|
}
|
||||||
template <>
|
template <>
|
||||||
|
EIGEN_STRONG_INLINE Packet16q8i ploadu<Packet16q8i>(const QInt8* from) {
|
||||||
|
EIGEN_DEBUG_UNALIGNED_LOAD return _mm_loadu_si128(
|
||||||
|
reinterpret_cast<const __m128i*>(from));
|
||||||
|
}
|
||||||
|
template <>
|
||||||
EIGEN_STRONG_INLINE Packet32q8u ploadu<Packet32q8u>(const QUInt8* from) {
|
EIGEN_STRONG_INLINE Packet32q8u ploadu<Packet32q8u>(const QUInt8* from) {
|
||||||
EIGEN_DEBUG_UNALIGNED_LOAD return _mm256_loadu_si256(
|
EIGEN_DEBUG_UNALIGNED_LOAD return _mm256_loadu_si256(
|
||||||
reinterpret_cast<const __m256i*>(from));
|
reinterpret_cast<const __m256i*>(from));
|
||||||
@ -215,6 +232,11 @@ EIGEN_STRONG_INLINE Packet16q16i ploadu<Packet16q16i>(const QInt16* from) {
|
|||||||
EIGEN_DEBUG_UNALIGNED_LOAD return _mm256_loadu_si256(
|
EIGEN_DEBUG_UNALIGNED_LOAD return _mm256_loadu_si256(
|
||||||
reinterpret_cast<const __m256i*>(from));
|
reinterpret_cast<const __m256i*>(from));
|
||||||
}
|
}
|
||||||
|
template<>
|
||||||
|
EIGEN_STRONG_INLINE Packet8q16i ploadu<Packet8q16i>(const QInt16* from) {
|
||||||
|
EIGEN_DEBUG_UNALIGNED_LOAD return _mm_loadu_si128(
|
||||||
|
reinterpret_cast<const __m128i*>(from));
|
||||||
|
}
|
||||||
template <>
|
template <>
|
||||||
EIGEN_STRONG_INLINE Packet8q32i ploadu<Packet8q32i>(const QInt32* from) {
|
EIGEN_STRONG_INLINE Packet8q32i ploadu<Packet8q32i>(const QInt32* from) {
|
||||||
EIGEN_DEBUG_UNALIGNED_LOAD return _mm256_loadu_si256(
|
EIGEN_DEBUG_UNALIGNED_LOAD return _mm256_loadu_si256(
|
||||||
@ -228,6 +250,11 @@ EIGEN_STRONG_INLINE Packet32q8i pload<Packet32q8i>(const QInt8* from) {
|
|||||||
reinterpret_cast<const __m256i*>(from));
|
reinterpret_cast<const __m256i*>(from));
|
||||||
}
|
}
|
||||||
template <>
|
template <>
|
||||||
|
EIGEN_STRONG_INLINE Packet16q8i pload<Packet16q8i>(const QInt8* from) {
|
||||||
|
EIGEN_DEBUG_ALIGNED_LOAD return _mm_load_si128(
|
||||||
|
reinterpret_cast<const __m128i*>(from));
|
||||||
|
}
|
||||||
|
template <>
|
||||||
EIGEN_STRONG_INLINE Packet32q8u pload<Packet32q8u>(const QUInt8* from) {
|
EIGEN_STRONG_INLINE Packet32q8u pload<Packet32q8u>(const QUInt8* from) {
|
||||||
EIGEN_DEBUG_ALIGNED_LOAD return _mm256_load_si256(
|
EIGEN_DEBUG_ALIGNED_LOAD return _mm256_load_si256(
|
||||||
reinterpret_cast<const __m256i*>(from));
|
reinterpret_cast<const __m256i*>(from));
|
||||||
@ -238,6 +265,11 @@ EIGEN_STRONG_INLINE Packet16q16i pload<Packet16q16i>(const QInt16* from) {
|
|||||||
reinterpret_cast<const __m256i*>(from));
|
reinterpret_cast<const __m256i*>(from));
|
||||||
}
|
}
|
||||||
template <>
|
template <>
|
||||||
|
EIGEN_STRONG_INLINE Packet8q16i pload<Packet8q16i>(const QInt16* from) {
|
||||||
|
EIGEN_DEBUG_ALIGNED_LOAD return _mm_load_si128(
|
||||||
|
reinterpret_cast<const __m128i*>(from));
|
||||||
|
}
|
||||||
|
template <>
|
||||||
EIGEN_STRONG_INLINE Packet8q32i pload<Packet8q32i>(const QInt32* from) {
|
EIGEN_STRONG_INLINE Packet8q32i pload<Packet8q32i>(const QInt32* from) {
|
||||||
EIGEN_DEBUG_ALIGNED_LOAD return _mm256_load_si256(
|
EIGEN_DEBUG_ALIGNED_LOAD return _mm256_load_si256(
|
||||||
reinterpret_cast<const __m256i*>(from));
|
reinterpret_cast<const __m256i*>(from));
|
||||||
@ -250,6 +282,11 @@ EIGEN_STRONG_INLINE void pstoreu<QInt8>(QInt8* to, const Packet32q8i& from) {
|
|||||||
reinterpret_cast<__m256i*>(to), from.val);
|
reinterpret_cast<__m256i*>(to), from.val);
|
||||||
}
|
}
|
||||||
template <>
|
template <>
|
||||||
|
EIGEN_STRONG_INLINE void pstoreu<QInt8>(QInt8* to, const Packet16q8i& from) {
|
||||||
|
EIGEN_DEBUG_UNALIGNED_STORE _mm_storeu_si128(
|
||||||
|
reinterpret_cast<__m128i*>(to), from.val);
|
||||||
|
}
|
||||||
|
template <>
|
||||||
EIGEN_STRONG_INLINE void pstoreu<QUInt8>(QUInt8* to, const Packet32q8u& from) {
|
EIGEN_STRONG_INLINE void pstoreu<QUInt8>(QUInt8* to, const Packet32q8u& from) {
|
||||||
EIGEN_DEBUG_UNALIGNED_STORE _mm256_storeu_si256(
|
EIGEN_DEBUG_UNALIGNED_STORE _mm256_storeu_si256(
|
||||||
reinterpret_cast<__m256i*>(to), from.val);
|
reinterpret_cast<__m256i*>(to), from.val);
|
||||||
@ -260,6 +297,11 @@ EIGEN_STRONG_INLINE void pstoreu<QInt16>(QInt16* to, const Packet16q16i& from) {
|
|||||||
reinterpret_cast<__m256i*>(to), from.val);
|
reinterpret_cast<__m256i*>(to), from.val);
|
||||||
}
|
}
|
||||||
template <>
|
template <>
|
||||||
|
EIGEN_STRONG_INLINE void pstoreu<QInt16>(QInt16* to, const Packet8q16i& from) {
|
||||||
|
EIGEN_DEBUG_UNALIGNED_STORE _mm_storeu_si128(
|
||||||
|
reinterpret_cast<__m128i*>(to), from.val);
|
||||||
|
}
|
||||||
|
template <>
|
||||||
EIGEN_STRONG_INLINE void pstoreu<QInt32>(QInt32* to, const Packet8q32i& from) {
|
EIGEN_STRONG_INLINE void pstoreu<QInt32>(QInt32* to, const Packet8q32i& from) {
|
||||||
EIGEN_DEBUG_UNALIGNED_STORE _mm256_storeu_si256(
|
EIGEN_DEBUG_UNALIGNED_STORE _mm256_storeu_si256(
|
||||||
reinterpret_cast<__m256i*>(to), from.val);
|
reinterpret_cast<__m256i*>(to), from.val);
|
||||||
@ -277,6 +319,11 @@ EIGEN_STRONG_INLINE void pstore<QInt16>(QInt16* to, const Packet16q16i& from) {
|
|||||||
from.val);
|
from.val);
|
||||||
}
|
}
|
||||||
template <>
|
template <>
|
||||||
|
EIGEN_STRONG_INLINE void pstore<QInt16>(QInt16* to, const Packet8q16i& from) {
|
||||||
|
EIGEN_DEBUG_ALIGNED_STORE _mm_store_si128(reinterpret_cast<__m128i*>(to),
|
||||||
|
from.val);
|
||||||
|
}
|
||||||
|
template <>
|
||||||
EIGEN_STRONG_INLINE void pstore<QUInt8>(QUInt8* to, const Packet32q8u& from) {
|
EIGEN_STRONG_INLINE void pstore<QUInt8>(QUInt8* to, const Packet32q8u& from) {
|
||||||
EIGEN_DEBUG_ALIGNED_STORE _mm256_store_si256(reinterpret_cast<__m256i*>(to),
|
EIGEN_DEBUG_ALIGNED_STORE _mm256_store_si256(reinterpret_cast<__m256i*>(to),
|
||||||
from.val);
|
from.val);
|
||||||
@ -286,6 +333,11 @@ EIGEN_STRONG_INLINE void pstore<QInt8>(QInt8* to, const Packet32q8i& from) {
|
|||||||
EIGEN_DEBUG_ALIGNED_STORE _mm256_store_si256(reinterpret_cast<__m256i*>(to),
|
EIGEN_DEBUG_ALIGNED_STORE _mm256_store_si256(reinterpret_cast<__m256i*>(to),
|
||||||
from.val);
|
from.val);
|
||||||
}
|
}
|
||||||
|
template <>
|
||||||
|
EIGEN_STRONG_INLINE void pstore<QInt8>(QInt8* to, const Packet16q8i& from) {
|
||||||
|
EIGEN_DEBUG_ALIGNED_STORE _mm_store_si128(reinterpret_cast<__m128i*>(to),
|
||||||
|
from.val);
|
||||||
|
}
|
||||||
|
|
||||||
// Extract first element.
|
// Extract first element.
|
||||||
template <>
|
template <>
|
||||||
|
Loading…
Reference in New Issue
Block a user