Project import generated by Copybara.
GitOrigin-RevId: 53a42bf7ad836321123cb7b6c80b0f2e13fbf83e
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
diff --git a/apple/internal/testing/apple_test_assembler.bzl b/apple/internal/testing/apple_test_assembler.bzl
|
||||
index f613313..63241f6 100644
|
||||
--- a/apple/internal/testing/apple_test_assembler.bzl
|
||||
+++ b/apple/internal/testing/apple_test_assembler.bzl
|
||||
@@ -63,8 +63,6 @@ def _assemble(name, bundle_rule, test_rule, runner = None, runners = None, **kwa
|
||||
"""
|
||||
if runner != None and runners != None:
|
||||
fail("Can't specify both runner and runners.")
|
||||
- elif not runner and not runners:
|
||||
- fail("Must specify one of runner or runners.")
|
||||
|
||||
test_bundle_name = name + ".__internal__.__test_bundle"
|
||||
|
||||
Vendored
+2
-1
@@ -8,7 +8,8 @@ exports_files(["LICENSE"])
|
||||
# The following build rule assumes that OpenCV is installed by
|
||||
# 'apt-get install libopencv-core-dev libopencv-highgui-dev \'
|
||||
# ' libopencv-calib3d-dev libopencv-features2d-dev \'
|
||||
# ' libopencv-imgproc-dev libopencv-video-dev' on Debian/Ubuntu.
|
||||
# ' libopencv-imgproc-dev libopencv-video-dev'
|
||||
# on Debian buster/Ubuntu 18.04.
|
||||
# If you install OpenCV separately, please modify the build rule accordingly.
|
||||
cc_library(
|
||||
name = "opencv",
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
diff --git a/tensorflow/c/tf_tensor.cc b/tensorflow/c/tf_tensor.cc
|
||||
index 6bb2cafbbc..60250d6f92 100644
|
||||
--- a/tensorflow/c/tf_tensor.cc
|
||||
+++ b/tensorflow/c/tf_tensor.cc
|
||||
@@ -114,7 +114,7 @@ TF_Tensor* TF_NewTensor(TF_DataType dtype, const int64_t* dims, int num_dims,
|
||||
if (elem_size > 0 && len < (elem_size * ret.NumElements())) {
|
||||
return nullptr;
|
||||
}
|
||||
- return new TF_Tensor{std::make_unique<tensorflow::TensorInterface>(ret)};
|
||||
+ return new TF_Tensor{absl::make_unique<tensorflow::TensorInterface>(ret)};
|
||||
}
|
||||
|
||||
TF_Tensor* TF_TensorMaybeMove(TF_Tensor* t) {
|
||||
@@ -317,7 +317,7 @@ TF_Tensor* TF_TensorFromTensor(const tensorflow::Tensor& src, Status* status) {
|
||||
if (!tensor.CopyFrom(src, src.shape())) {
|
||||
return nullptr;
|
||||
}
|
||||
- return new TF_Tensor{std::make_unique<tensorflow::TensorInterface>(tensor)};
|
||||
+ return new TF_Tensor{absl::make_unique<tensorflow::TensorInterface>(tensor)};
|
||||
}
|
||||
// DT_STRING tensors require a copying since TF_Tensor.buffer expects a flatly
|
||||
// encoded sequence of strings.
|
||||
diff --git a/tensorflow/core/lib/monitoring/percentile_sampler.cc b/tensorflow/core/lib/monitoring/percentile_sampler.cc
|
||||
index 988e50ded5..a8a412dc25 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;
|
||||
@@ -72,7 +73,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/workspace.bzl b/tensorflow/workspace.bzl
|
||||
index 8947038da8..75a1259b88 100755
|
||||
--- a/tensorflow/workspace.bzl
|
||||
+++ b/tensorflow/workspace.bzl
|
||||
@@ -927,9 +927,10 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""):
|
||||
# https://github.com/bazelbuild/rules_apple/releases
|
||||
tf_http_archive(
|
||||
name = "build_bazel_rules_apple",
|
||||
- sha256 = "a045a436b642c70fb0c10ca84ff0fd2dcbd59cc89100d597a61e8374afafb366",
|
||||
+ sha256 = "bdc8e66e70b8a75da23b79f1f8c6207356df07d041d96d2189add7ee0780cf4e",
|
||||
+ strip_prefix = "rules_apple-b869b0d3868d78a1d4ffd866ccb304fb68aa12c3",
|
||||
urls = [
|
||||
- "https://storage.googleapis.com/mirror.tensorflow.org/github.com/bazelbuild/rules_apple/releases/download/0.18.0/rules_apple.0.18.0.tar.gz",
|
||||
- "https://github.com/bazelbuild/rules_apple/releases/download/0.18.0/rules_apple.0.18.0.tar.gz",
|
||||
+ "https://github.com/bazelbuild/rules_apple/archive/b869b0d3868d78a1d4ffd866ccb304fb68aa12c3.tar.gz",
|
||||
+ "https://storage.googleapis.com/mirror.tensorflow.org/github.com/bazelbuild/rules_apple/archive/b869b0d3868d78a1d4ffd866ccb304fb68aa12c3.tar.gz",
|
||||
],
|
||||
)
|
||||
@@ -1,112 +0,0 @@
|
||||
diff --git a/third_party/cpuinfo/BUILD.bazel b/third_party/cpuinfo/BUILD.bazel
|
||||
index 8d89521612..6ea60acdda 100644
|
||||
--- a/third_party/cpuinfo/BUILD.bazel
|
||||
+++ b/third_party/cpuinfo/BUILD.bazel
|
||||
@@ -116,6 +111,8 @@ cc_library(
|
||||
":watchos_x86": COMMON_SRCS + X86_SRCS + MACH_SRCS + MACH_X86_SRCS,
|
||||
":watchos_armv7k": COMMON_SRCS + MACH_SRCS + MACH_ARM_SRCS,
|
||||
":watchos_arm64_32": COMMON_SRCS + MACH_SRCS + MACH_ARM_SRCS,
|
||||
+ ":tvos_x86_64": COMMON_SRCS + X86_SRCS + MACH_SRCS + MACH_X86_SRCS,
|
||||
+ ":tvos_arm64": COMMON_SRCS + MACH_SRCS + MACH_ARM_SRCS,
|
||||
":emscripten_wasm": COMMON_SRCS + EMSCRIPTEN_SRCS,
|
||||
}),
|
||||
copts = C99OPTS + [
|
||||
@@ -212,7 +209,7 @@ config_setting(
|
||||
config_setting(
|
||||
name = "ios_armv7",
|
||||
values = {
|
||||
- "crosstool_top": "//tools/osx/crosstool:crosstool",
|
||||
+ "apple_platform_type": "ios",
|
||||
"cpu": "ios_armv7",
|
||||
},
|
||||
)
|
||||
@@ -220,7 +217,7 @@ config_setting(
|
||||
config_setting(
|
||||
name = "ios_arm64",
|
||||
values = {
|
||||
- "crosstool_top": "//tools/osx/crosstool:crosstool",
|
||||
+ "apple_platform_type": "ios",
|
||||
"cpu": "ios_arm64",
|
||||
},
|
||||
)
|
||||
@@ -228,7 +225,7 @@ config_setting(
|
||||
config_setting(
|
||||
name = "ios_arm64e",
|
||||
values = {
|
||||
- "crosstool_top": "//tools/osx/crosstool:crosstool",
|
||||
+ "apple_platform_type": "ios",
|
||||
"cpu": "ios_arm64e",
|
||||
},
|
||||
)
|
||||
@@ -236,7 +233,7 @@ config_setting(
|
||||
config_setting(
|
||||
name = "ios_x86",
|
||||
values = {
|
||||
- "crosstool_top": "//tools/osx/crosstool:crosstool",
|
||||
+ "apple_platform_type": "ios",
|
||||
"cpu": "ios_i386",
|
||||
},
|
||||
)
|
||||
@@ -244,7 +241,7 @@ config_setting(
|
||||
config_setting(
|
||||
name = "ios_x86_64",
|
||||
values = {
|
||||
- "crosstool_top": "//tools/osx/crosstool:crosstool",
|
||||
+ "apple_platform_type": "ios",
|
||||
"cpu": "ios_x86_64",
|
||||
},
|
||||
)
|
||||
@@ -252,7 +249,7 @@ config_setting(
|
||||
config_setting(
|
||||
name = "watchos_armv7k",
|
||||
values = {
|
||||
- "crosstool_top": "//tools/osx/crosstool:crosstool",
|
||||
+ "apple_platform_type": "watchos",
|
||||
"cpu": "watchos_armv7k",
|
||||
},
|
||||
)
|
||||
@@ -260,7 +257,7 @@ config_setting(
|
||||
config_setting(
|
||||
name = "watchos_arm64_32",
|
||||
values = {
|
||||
- "crosstool_top": "//tools/osx/crosstool:crosstool",
|
||||
+ "apple_platform_type": "watchos",
|
||||
"cpu": "watchos_arm64_32",
|
||||
},
|
||||
)
|
||||
@@ -268,7 +265,7 @@ config_setting(
|
||||
config_setting(
|
||||
name = "watchos_x86",
|
||||
values = {
|
||||
- "crosstool_top": "//tools/osx/crosstool:crosstool",
|
||||
+ "apple_platform_type": "watchos",
|
||||
"cpu": "watchos_i386",
|
||||
},
|
||||
)
|
||||
@@ -276,7 +273,7 @@ config_setting(
|
||||
config_setting(
|
||||
name = "watchos_x86_64",
|
||||
values = {
|
||||
- "crosstool_top": "//tools/osx/crosstool:crosstool",
|
||||
+ "apple_platform_type": "watchos",
|
||||
"cpu": "watchos_x86_64",
|
||||
},
|
||||
)
|
||||
@@ -284,7 +281,7 @@ config_setting(
|
||||
config_setting(
|
||||
name = "tvos_arm64",
|
||||
values = {
|
||||
- "crosstool_top": "//tools/osx/crosstool:crosstool",
|
||||
+ "apple_platform_type": "tvos",
|
||||
"cpu": "tvos_arm64",
|
||||
},
|
||||
)
|
||||
@@ -292,7 +289,7 @@ config_setting(
|
||||
config_setting(
|
||||
name = "tvos_x86_64",
|
||||
values = {
|
||||
- "crosstool_top": "//tools/osx/crosstool:crosstool",
|
||||
+ "apple_platform_type": "tvos",
|
||||
"cpu": "tvos_x86_64",
|
||||
},
|
||||
)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,25 @@
|
||||
diff --git a/tensorflow/core/lib/monitoring/percentile_sampler.cc b/tensorflow/core/lib/monitoring/percentile_sampler.cc
|
||||
index b7c22ae77b..d0ba7b48b4 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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
diff --git a/third_party/protobuf/protobuf.patch b/third_party/protobuf/protobuf.patch
|
||||
index 8ce4a84375..d77e1f81f3 100644
|
||||
--- a/third_party/protobuf/protobuf.patch
|
||||
+++ b/third_party/protobuf/protobuf.patch
|
||||
@@ -1,25 +1,25 @@
|
||||
diff --git a/BUILD b/BUILD
|
||||
-index dbae719ff..87dc38470 100644
|
||||
+index 79871d621..096967b99 100644
|
||||
--- a/BUILD
|
||||
+++ b/BUILD
|
||||
-@@ -23,7 +23,7 @@ config_setting(
|
||||
+@@ -26,7 +26,7 @@ config_setting(
|
||||
# ZLIB configuration
|
||||
################################################################################
|
||||
-
|
||||
+
|
||||
-ZLIB_DEPS = ["@zlib//:zlib"]
|
||||
+ZLIB_DEPS = ["@zlib"]
|
||||
-
|
||||
+
|
||||
################################################################################
|
||||
# Protobuf Runtime Library
|
||||
-@@ -143,6 +143,7 @@ cc_library(
|
||||
+@@ -156,6 +156,7 @@ cc_library(
|
||||
copts = COPTS,
|
||||
includes = ["src/"],
|
||||
linkopts = LINK_OPTS,
|
||||
+ alwayslink = 1,
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
-
|
||||
-@@ -213,6 +214,7 @@ cc_library(
|
||||
+
|
||||
+@@ -228,6 +229,7 @@ cc_library(
|
||||
copts = COPTS,
|
||||
includes = ["src/"],
|
||||
linkopts = LINK_OPTS,
|
||||
@@ -27,17 +27,24 @@ index dbae719ff..87dc38470 100644
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [":protobuf_lite"] + PROTOBUF_DEPS,
|
||||
)
|
||||
+@@ -900,7 +902,6 @@ py_proto_library(
|
||||
+ py_extra_srcs = glob(["python/**/__init__.py"]),
|
||||
+ py_libs = [
|
||||
+ ":python_srcs",
|
||||
+- "@six//:six",
|
||||
+ ],
|
||||
+ srcs_version = "PY2AND3",
|
||||
+ visibility = ["//visibility:public"],
|
||||
diff --git a/protobuf.bzl b/protobuf.bzl
|
||||
-index e0653321f..253d9cbb5 100644
|
||||
+index 829464d44..4ac23594b 100644
|
||||
--- a/protobuf.bzl
|
||||
+++ b/protobuf.bzl
|
||||
-@@ -84,7 +84,9 @@ def _proto_gen_impl(ctx):
|
||||
-
|
||||
+@@ -87,6 +87,8 @@ def _proto_gen_impl(ctx):
|
||||
for dep in ctx.attr.deps:
|
||||
import_flags += dep.proto.import_flags
|
||||
deps += dep.proto.deps
|
||||
+ import_flags = depset(import_flags).to_list()
|
||||
+ deps = depset(deps).to_list()
|
||||
-
|
||||
+
|
||||
if not ctx.attr.gen_cc and not ctx.attr.gen_py and not ctx.executable.plugin:
|
||||
- return struct(
|
||||
+ return struct(
|
||||
diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl
|
||||
index ead41e83c3..448fbee13f 100755
|
||||
--- a/tensorflow/workspace.bzl
|
||||
+++ b/tensorflow/workspace.bzl
|
||||
@@ -476,14 +476,14 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""):
|
||||
tf_http_archive(
|
||||
name = "com_google_protobuf",
|
||||
patch_file = clean_dep("//third_party/protobuf:protobuf.patch"),
|
||||
- sha256 = "cfcba2df10feec52a84208693937c17a4b5df7775e1635c1e3baffc487b24c9b",
|
||||
- strip_prefix = "protobuf-3.9.2",
|
||||
+ sha256 = "a79d19dcdf9139fa4b81206e318e33d245c4c9da1ffed21c87288ed4380426f9",
|
||||
+ strip_prefix = "protobuf-3.11.4",
|
||||
system_build_file = clean_dep("//third_party/systemlibs:protobuf.BUILD"),
|
||||
system_link_files = {
|
||||
"//third_party/systemlibs:protobuf.bzl": "protobuf.bzl",
|
||||
},
|
||||
urls = [
|
||||
- "https://storage.googleapis.com/mirror.tensorflow.org/github.com/protocolbuffers/protobuf/archive/v3.9.2.zip",
|
||||
- "https://github.com/protocolbuffers/protobuf/archive/v3.9.2.zip",
|
||||
+ "https://storage.googleapis.com/mirror.tensorflow.org/github.com/protocolbuffers/protobuf/archive/v3.11.4.tar.gz",
|
||||
+ "https://github.com/protocolbuffers/protobuf/archive/v3.11.4.tar.gz",
|
||||
],
|
||||
)
|
||||
Reference in New Issue
Block a user