mediapipe/third_party/org_tensorflow_compatibility_fixes.diff
MediaPipe Team e6c19885c6 Project import generated by Copybara.
GitOrigin-RevId: bb059a0721c92e8154d33ce8057b3915a25b3d7d
2021-12-13 15:56:02 -08:00

56 lines
2.1 KiB
Diff

diff --git a/tensorflow/core/lib/monitoring/percentile_sampler.cc b/tensorflow/core/lib/monitoring/percentile_sampler.cc
index b7c22ae77ba..d0ba7b48b4b 100644
--- a/tensorflow/core/lib/monitoring/percentile_sampler.cc
+++ b/tensorflow/core/lib/monitoring/percentile_sampler.cc
@@ -29,7 +29,8 @@ namespace monitoring {
void PercentileSamplerCell::Add(double sample) {
uint64 nstime = EnvTime::NowNanos();
mutex_lock l(mu_);
- samples_[next_position_] = {nstime, sample};
+ samples_[next_position_].nstime = nstime;
+ samples_[next_position_].value = sample;
++next_position_;
if (TF_PREDICT_FALSE(next_position_ >= samples_.size())) {
next_position_ = 0;
@@ -73,7 +74,9 @@ Percentiles PercentileSamplerCell::value() const {
size_t index = std::min<size_t>(
static_cast<size_t>(percentile * pct_samples.num_samples / 100.0),
pct_samples.num_samples - 1);
- PercentilePoint pct = {percentile, samples[index].value};
+ PercentilePoint pct;
+ pct.percentile = percentile;
+ pct.value = samples[index].value;
pct_samples.points.push_back(pct);
}
}
diff --git a/tensorflow/core/platform/test.h b/tensorflow/core/platform/test.h
index b598b6ee1e4..51c013a2d62 100644
--- a/tensorflow/core/platform/test.h
+++ b/tensorflow/core/platform/test.h
@@ -40,7 +40,6 @@ limitations under the License.
// better error messages, more maintainable tests and more test coverage.
#if !defined(PLATFORM_GOOGLE) && !defined(PLATFORM_GOOGLE_ANDROID) && \
!defined(PLATFORM_CHROMIUMOS)
-#include <gmock/gmock-generated-matchers.h>
#include <gmock/gmock-matchers.h>
#include <gmock/gmock-more-matchers.h>
#endif
diff --git a/third_party/eigen3/eigen_archive.BUILD b/third_party/eigen3/eigen_archive.BUILD
index 5514f774c35..1a38f76f4e9 100644
--- a/third_party/eigen3/eigen_archive.BUILD
+++ b/third_party/eigen3/eigen_archive.BUILD
@@ -53,6 +53,13 @@ cc_library(
visibility = ["//visibility:public"],
)
+# For backward compatibility.
+alias(
+ name = "eigen",
+ actual=":eigen3",
+ visibility = ["//visibility:public"],
+)
+
filegroup(
name = "eigen_header_files",
srcs = EIGEN_HEADERS,