Update Eigen to:
61fc78bbda
PiperOrigin-RevId: 337198043
Change-Id: I242a581004d1b25c1aee850fc1d2df7084cfe45b
This commit is contained in:
parent
92b992fd67
commit
7b986c8ebd
@ -2721,10 +2721,10 @@ def reduce_max(input_tensor, axis=None, keepdims=False, name=None):
|
||||
tf.Tensor(-1, shape=(), dtype=int32)
|
||||
>>> x = tf.constant([4, float('nan')])
|
||||
>>> print(tf.reduce_max(x))
|
||||
tf.Tensor(4.0, shape=(), dtype=float32)
|
||||
tf.Tensor(nan, shape=(), dtype=float32)
|
||||
>>> x = tf.constant([float('nan'), float('nan')])
|
||||
>>> print(tf.reduce_max(x))
|
||||
tf.Tensor(-inf, shape=(), dtype=float32)
|
||||
tf.Tensor(nan, shape=(), dtype=float32)
|
||||
>>> x = tf.constant([float('-inf'), float('inf')])
|
||||
>>> print(tf.reduce_max(x))
|
||||
tf.Tensor(inf, shape=(), dtype=float32)
|
||||
|
||||
@ -235,11 +235,11 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""):
|
||||
name = "eigen_archive",
|
||||
build_file = clean_dep("//third_party:eigen.BUILD"),
|
||||
patch_file = clean_dep("//third_party/eigen3:gpu_packet_math.patch"),
|
||||
sha256 = "00ff67c15f8e8faf14495482e7396cc1d99cdfaaa2151f4aafef92bc754e634d", # SHARED_EIGEN_SHA
|
||||
strip_prefix = "eigen-22c971a225dbb567cd1a45f6006d16c4aa618551",
|
||||
sha256 = "f504e389ffeb450a50480eb5350e6c0495b4f0bb9060a27c0034862ae0b8b4a0", # SHARED_EIGEN_SHA
|
||||
strip_prefix = "eigen-61fc78bbda22f425a97761be57c219928d929ddc",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/mirror.tensorflow.org/gitlab.com/libeigen/eigen/-/archive/22c971a225dbb567cd1a45f6006d16c4aa618551/eigen-22c971a225dbb567cd1a45f6006d16c4aa618551.tar.gz",
|
||||
"https://gitlab.com/libeigen/eigen/-/archive/22c971a225dbb567cd1a45f6006d16c4aa618551/eigen-22c971a225dbb567cd1a45f6006d16c4aa618551.tar.gz",
|
||||
"https://storage.googleapis.com/mirror.tensorflow.org/gitlab.com/libeigen/eigen/-/archive/61fc78bbda22f425a97761be57c219928d929ddc/eigen-61fc78bbda22f425a97761be57c219928d929ddc.tar.gz",
|
||||
"https://gitlab.com/libeigen/eigen/-/archive/61fc78bbda22f425a97761be57c219928d929ddc/eigen-61fc78bbda22f425a97761be57c219928d929ddc.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
47
third_party/eigen3/gpu_packet_math.patch
vendored
47
third_party/eigen3/gpu_packet_math.patch
vendored
@ -23,3 +23,50 @@ diff -ru a/Eigen/src/Geometry/arch/Geometry_SSE.h b/Eigen/src/Geometry/arch/Geom
|
||||
return res;
|
||||
}
|
||||
};
|
||||
diff -ru a/Eigen/src/Core/GenericPacketMath.h b/Eigen/src/Core/GenericPacketMath.h
|
||||
--- a/Eigen/src/Core/GenericPacketMath.h
|
||||
+++ b/Eigen/src/Core/GenericPacketMath.h
|
||||
@@ -270,22 +270,34 @@
|
||||
/** \internal \returns the bitwise and of \a a and \a b */
|
||||
template<typename Packet> EIGEN_DEVICE_FUNC inline Packet
|
||||
pand(const Packet& a, const Packet& b) {
|
||||
+#if defined(EIGEN_HIP_DEVICE_COMPILE)
|
||||
+ return bitwise_helper(a ,b, std::bit_and<unsigned char>());
|
||||
+#else
|
||||
EIGEN_USING_STD(bit_and);
|
||||
return bitwise_helper(a ,b, bit_and<unsigned char>());
|
||||
+#endif
|
||||
}
|
||||
|
||||
/** \internal \returns the bitwise or of \a a and \a b */
|
||||
template<typename Packet> EIGEN_DEVICE_FUNC inline Packet
|
||||
por(const Packet& a, const Packet& b) {
|
||||
+#if defined(EIGEN_HIP_DEVICE_COMPILE)
|
||||
+ return bitwise_helper(a ,b, std::bit_or<unsigned char>());
|
||||
+#else
|
||||
EIGEN_USING_STD(bit_or);
|
||||
return bitwise_helper(a ,b, bit_or<unsigned char>());
|
||||
+#endif
|
||||
}
|
||||
|
||||
/** \internal \returns the bitwise xor of \a a and \a b */
|
||||
template<typename Packet> EIGEN_DEVICE_FUNC inline Packet
|
||||
pxor(const Packet& a, const Packet& b) {
|
||||
+#if defined(EIGEN_HIP_DEVICE_COMPILE)
|
||||
+ return bitwise_helper(a ,b, std::bit_xor<unsigned char>());
|
||||
+#else
|
||||
EIGEN_USING_STD(bit_xor);
|
||||
return bitwise_helper(a ,b, bit_xor<unsigned char>());
|
||||
+#endif
|
||||
}
|
||||
|
||||
/** \internal \returns the bitwise and of \a a and not \a b */
|
||||
@@ -689,7 +701,7 @@
|
||||
EIGEN_DEVICE_FUNC inline typename unpacket_traits<Packet>::type
|
||||
predux(const Packet& a)
|
||||
{
|
||||
- return predux_helper(a, padd<typename unpacket_traits<Packet>::type>);
|
||||
+ return a;
|
||||
}
|
||||
|
||||
/** \internal \returns the product of the elements of \a a */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user