Skip to content

Commit ef41cec

Browse files
committed
update tensorflow and serving to 2.6.0
update patches with upstream changes update main.cc with upstream changes minor readme updates
1 parent 14684fd commit ef41cec

File tree

11 files changed

+84
-50
lines changed

11 files changed

+84
-50
lines changed

Diff for: .bazelrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# upstream tensorflow/serving version
2-
build --embed_label=2.5.1
2+
build --embed_label=2.6.0
33

44
common --experimental_repo_remote_exec
55

Diff for: README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ On many consumer / developer 64-bit and 32-bit arm platforms you can simply:
3737
```sh
3838
docker pull emacski/tensorflow-serving:latest
3939
# or
40-
docker pull emacski/tensorflow-serving:2.5.1
40+
docker pull emacski/tensorflow-serving:2.6.0
4141
```
4242

4343
Refer to [TensorFlow Serving with Docker](https://www.tensorflow.org/tfx/serving/docker)
@@ -58,7 +58,7 @@ for configuration and setting up a model for serving.
5858
Example
5959
```bash
6060
# on beaglebone black
61-
docker pull emacski/tensorflow-serving:2.5.1-linux_arm_armv7-a_neon_vfpv3
61+
docker pull emacski/tensorflow-serving:2.6.0-linux_arm_armv7-a_neon_vfpv3
6262
```
6363

6464
### Aliases
@@ -77,7 +77,7 @@ docker pull emacski/tensorflow-serving:2.5.1-linux_arm_armv7-a_neon_vfpv3
7777
Examples
7878
```bash
7979
# on Raspberry PI 3 B+
80-
docker pull emacski/tensorflow-serving:2.5.1-linux_arm64
80+
docker pull emacski/tensorflow-serving:2.6.0-linux_arm64
8181
# or
8282
docker pull emacski/tensorflow-serving:latest-linux_arm64
8383
```
@@ -113,9 +113,9 @@ docker pull emacski/tensorflow-serving:latest
113113
Example
114114
```sh
115115
# on Raspberry PI 3 B+
116-
docker pull emacski/tensorflow-serving:2.5.1
117-
# the actual image used is emacski/tensorflow-serving:2.5.1-linux_arm64
118-
# itself actually being emacski/tensorflow-serving:2.5.1-linux_arm64_armv8-a
116+
docker pull emacski/tensorflow-serving:2.6.0
117+
# the actual image used is emacski/tensorflow-serving:2.6.0-linux_arm64
118+
# itself actually being emacski/tensorflow-serving:2.6.0-linux_arm64_armv8-a
119119
```
120120

121121
### Debug Images
@@ -130,9 +130,9 @@ suffix (if one is required) in the image tag.
130130

131131
```sh
132132
# multi-arch
133-
docker pull emacski/tensorflow-serving:2.5.1-debug
133+
docker pull emacski/tensorflow-serving:2.6.0-debug
134134
# specific image
135-
docker pull emacski/tensorflow-serving:2.5.1-debug-linux_arm64_armv8-a
135+
docker pull emacski/tensorflow-serving:2.6.0-debug-linux_arm64_armv8-a
136136
# specific alias
137137
docker pull emacski/tensorflow-serving:latest-debug-linux_arm64
138138
```

Diff for: WORKSPACE

+16-14
Original file line numberDiff line numberDiff line change
@@ -62,32 +62,34 @@ protobuf_deps()
6262

6363
# tensorflow/tensorflow and deps
6464

65-
# tensorflow 2.5.0
65+
# tensorflow 2.6.0
6666
http_archive(
6767
name = "org_tensorflow",
6868
patches = [
69-
# align arm cpu config values
69+
# aws - align arm cpu config values
7070
"//third_party/tensorflow:aws.patch",
71-
# arm (32-bit) datatype sizes
71+
# curl and hwloc - arm (32-bit) datatype sizes
7272
"//third_party/tensorflow:curl.patch",
7373
"//third_party/tensorflow:hwloc.patch",
74-
# set platform cpu constraint on aarch64 config_setting
74+
# mkl - set platform cpu constraint on aarch64 config_setting
7575
"//third_party/tensorflow:mkl.patch",
76-
# remove explicit linker dep on libgomp
76+
# mkl_dnn - remove explicit linker dep on libgomp
7777
"//third_party/tensorflow:mkl_dnn.patch",
78-
# allow android cpu helper to be used for linux_arm and linux_arm64
78+
# tensorflow - use android cpu helper for arm and arm64 on linux, don't
79+
# let cuda tools hijack rules_cc, llvm omp.h is already in the include
80+
# path for this project's cc toolchain
7981
"//third_party/tensorflow:tensorflow.patch",
8082
],
8183
patch_args = ["-p1"],
82-
sha256 = "cb99f136dc5c89143669888a44bfdd134c086e1e2d9e36278c1eb0f03fe62d76",
83-
strip_prefix = "tensorflow-a4dfb8d1a71385bd6d122e4f27f86dcebb96712d",
84+
sha256 = "70a865814b9d773024126a6ce6fea68fefe907b7ae6f9ac7e656613de93abf87",
85+
strip_prefix = "tensorflow-919f693420e35d00c8d0a42100837ae3718f7927",
8486
urls = [
85-
"https://github.com/tensorflow/tensorflow/archive/a4dfb8d1a71385bd6d122e4f27f86dcebb96712d.tar.gz",
87+
"https://github.com/tensorflow/tensorflow/archive/919f693420e35d00c8d0a42100837ae3718f7927.tar.gz",
8688
],
8789
)
8890

8991
# tensorflow dependency patch: disable default c++ includes as these are set
90-
# (and configurable) within the custom llvm/clang toolchain
92+
# at build time by the llvm/clang toolchain
9193
http_archive(
9294
name = "nsync",
9395
patches = [
@@ -114,13 +116,13 @@ http_archive(
114116
],
115117
)
116118

117-
# tensorflow serving 2.5.1
119+
# tensorflow serving 2.6.0
118120
http_archive(
119121
name = "tf_serving",
120-
sha256 = "e94726632a0637a460b07e5e1c6c5a30c9f776dda22b5e9132b9ef526fbefa7e",
121-
strip_prefix = "serving-da76fc74b48f6afe190125f9ed572e690cef8570",
122+
sha256 = "5fe87c899e2afea297dead1ee0e1709852ed55578b7975cffefe135f82b61c77",
123+
strip_prefix = "serving-04d47f8aa567f429185a4416ef58f7fe11a21a43",
122124
urls = [
123-
"https://github.com/tensorflow/serving/archive/da76fc74b48f6afe190125f9ed572e690cef8570.tar.gz",
125+
"https://github.com/tensorflow/serving/archive/04d47f8aa567f429185a4416ef58f7fe11a21a43.tar.gz",
124126
],
125127
)
126128

Diff for: tensorflow_model_server/main.cc

+7-1
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ int main(int argc, char** argv) {
172172
"simultaneously. Auto-configured by default."
173173
"Note that this option is ignored if "
174174
"--platform_config_file is non-empty."),
175+
tensorflow::Flag("use_alts_credentials", &options.use_alts_credentials,
176+
"Use Google ALTS credentials"),
175177
tensorflow::Flag(
176178
"ssl_config_file", &options.ssl_config_file,
177179
"If non-empty, read an ascii SSLConfig protobuf from "
@@ -244,7 +246,11 @@ int main(int argc, char** argv) {
244246
"disabled, models utilizing this feature will return bad Status "
245247
"on first compilation request."),
246248
tensorflow::Flag("enable_profiler", &options.enable_profiler,
247-
"Enable profiler service.")};
249+
"Enable profiler service."),
250+
tensorflow::Flag("thread_pool_factory_config_file",
251+
&options.thread_pool_factory_config_file,
252+
"If non-empty, read an ascii ThreadPoolConfig protobuf "
253+
"from the supplied file name.")};
248254

249255
const auto& usage = tensorflow::Flags::Usage(argv[0], flag_list);
250256
if (!tensorflow::Flags::Parse(&argc, argv, flag_list)) {

Diff for: third_party/tensorflow/aws.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/third_party/aws/BUILD.bazel b/third_party/aws/BUILD.bazel
2-
index d9e40703caa..afc4a9de1ba 100644
2+
index d9e40703caa..809c06338d6 100644
33
--- a/third_party/aws/BUILD.bazel
44
+++ b/third_party/aws/BUILD.bazel
55
@@ -24,7 +24,7 @@ cc_library(
@@ -12,7 +12,7 @@ index d9e40703caa..afc4a9de1ba 100644
1212
]),
1313
"@org_tensorflow//tensorflow:freebsd": glob([
1414
diff --git a/third_party/aws/aws-c-common.bazel b/third_party/aws/aws-c-common.bazel
15-
index ab9406805c2..65c3bca244c 100644
15+
index ab9406805c2..6cf6f3ccc70 100644
1616
--- a/third_party/aws/aws-c-common.bazel
1717
+++ b/third_party/aws/aws-c-common.bazel
1818
@@ -24,7 +24,7 @@ cc_library(

Diff for: third_party/tensorflow/curl.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/third_party/curl.BUILD b/third_party/curl.BUILD
2-
index 42d2bb03049..6261379632b 100644
2+
index 85b09cf1bf4..4be33505f7d 100644
33
--- a/third_party/curl.BUILD
44
+++ b/third_party/curl.BUILD
5-
@@ -595,7 +595,13 @@ genrule(
5+
@@ -597,7 +597,13 @@ genrule(
66
"# define HAVE_RAND_STATUS 1",
77
"# define HAVE_SSL_GET_SHUTDOWN 1",
88
"# define HAVE_TERMIOS_H 1",
@@ -17,7 +17,7 @@ index 42d2bb03049..6261379632b 100644
1717
"# define RANDOM_FILE \"/dev/urandom\"",
1818
"# define USE_OPENSSL 1",
1919
"#endif",
20-
@@ -771,13 +777,23 @@ genrule(
20+
@@ -773,13 +779,23 @@ genrule(
2121
"# define SEND_TYPE_ARG4 int",
2222
"# define SEND_TYPE_RETV ssize_t",
2323
"# define SIZEOF_INT 4",

Diff for: third_party/tensorflow/hwloc.patch

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
diff --git a/third_party/hwloc/BUILD.bazel b/third_party/hwloc/BUILD.bazel
2-
index a9de93686c0..63e4d5b3b0e 100644
2+
index 46149dd497f..65db0c23cdb 100644
33
--- a/third_party/hwloc/BUILD.bazel
44
+++ b/third_party/hwloc/BUILD.bazel
55
@@ -209,14 +209,21 @@ _INCLUDE_PRIVATE_HWLOC_AUTOIGEN_CONFIG_H_LINUX_SUBS.update(_INCLUDE_PRIVATE_HWLO
6-
6+
77
_INCLUDE_PRIVATE_HWLOC_AUTOIGEN_CONFIG_H_CUDA_SUBS.update(_INCLUDE_PRIVATE_HWLOC_AUTOIGEN_CONFIG_H_LINUX_SUBS)
8-
8+
99
+_INCLUDE_PRIVATE_HWLOC_AUTOIGEN_CONFIG_H_LINUX_ARMV7_SUBS = dict(_INCLUDE_PRIVATE_HWLOC_AUTOIGEN_CONFIG_H_LINUX_SUBS)
1010
+_INCLUDE_PRIVATE_HWLOC_AUTOIGEN_CONFIG_H_LINUX_ARMV7_SUBS.update({
1111
+ "#undef HWLOC_SIZEOF_UNSIGNED_LONG": "#define HWLOC_SIZEOF_UNSIGNED_LONG 4",
@@ -26,5 +26,5 @@ index a9de93686c0..63e4d5b3b0e 100644
2626
+ "//conditions:default": _INCLUDE_PRIVATE_HWLOC_AUTOIGEN_CONFIG_H_LINUX_SUBS,
2727
+ }),
2828
)
29-
29+
3030
template_rule(

Diff for: third_party/tensorflow/mkl.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/third_party/mkl/BUILD b/third_party/mkl/BUILD
2-
index aa65b585b85..ca18a6e61d6 100644
2+
index 196897fea46..c23894bacdf 100644
33
--- a/third_party/mkl/BUILD
44
+++ b/third_party/mkl/BUILD
55
@@ -47,6 +47,9 @@ config_setting(

Diff for: third_party/tensorflow/mkl_dnn.patch

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
diff --git a/third_party/mkl_dnn/mkldnn_acl.BUILD b/third_party/mkl_dnn/mkldnn_acl.BUILD
2-
index 017abff688a..19d90053006 100644
2+
index cafe160f433..5915d0c9f6d 100644
33
--- a/third_party/mkl_dnn/mkldnn_acl.BUILD
44
+++ b/third_party/mkl_dnn/mkldnn_acl.BUILD
5-
@@ -72,7 +72,6 @@ cc_library(
6-
"src/cpu/aarch64/xbyak_aarch64/src",
5+
@@ -61,7 +61,6 @@ cc_library(
76
"src/cpu/aarch64/xbyak_aarch64/xbyak_aarch64",
7+
"src/cpu/gemm",
88
],
99
- linkopts = ["-lgomp"],
10-
visibility = ["//visibility:public"],
11-
deps = [
12-
"@compute_library//:arm_compute_graph",
10+
textual_hdrs = glob(
11+
[
12+
"include/**/*",

Diff for: third_party/tensorflow/tensorflow.patch

+34-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/tensorflow/compiler/xla/service/llvm_ir/llvm_util.cc b/tensorflow/compiler/xla/service/llvm_ir/llvm_util.cc
2-
index 06ea682d4b4..156c55d29fd 100644
2+
index 14651d99e8c..9e233fbd003 100644
33
--- a/tensorflow/compiler/xla/service/llvm_ir/llvm_util.cc
44
+++ b/tensorflow/compiler/xla/service/llvm_ir/llvm_util.cc
55
@@ -378,10 +378,17 @@ static void LogS64(const char* tag, int64 value) {
@@ -18,20 +18,33 @@ index 06ea682d4b4..156c55d29fd 100644
1818
{b->getInt64(absl::bit_cast<int64>(tag)), value});
1919
+#endif
2020
}
21-
21+
2222
void SetAlignmentMetadataForLoad(llvm::LoadInst* load, uint64_t alignment) {
23+
diff --git a/tensorflow/core/common_runtime/threadpool_device.cc b/tensorflow/core/common_runtime/threadpool_device.cc
24+
index b342a03966b..a513784fc39 100644
25+
--- a/tensorflow/core/common_runtime/threadpool_device.cc
26+
+++ b/tensorflow/core/common_runtime/threadpool_device.cc
27+
@@ -16,7 +16,7 @@ limitations under the License.
28+
#if defined(ENABLE_ONEDNN_OPENMP) && defined(ENABLE_MKL) && defined(_OPENMP)
29+
#ifndef DNNL_AARCH64_USE_ACL
30+
// Using LLVM's OpenMP header
31+
-#include "external/llvm_openmp/include/omp.h"
32+
+#include "omp.h"
33+
/* Added EIGEN_DONT_PARALLELIZE to avoid duplicating omp.h, please refer to
34+
this link https://eigen.tuxfamily.org/dox/TopicMultiThreading.html for more
35+
info. It does not have any negative impact on performance. */
2336
diff --git a/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.cc b/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.cc
2437
index d61a036181d..cd982a85e42 100644
2538
--- a/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.cc
2639
+++ b/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.cc
2740
@@ -15,7 +15,7 @@ limitations under the License.
28-
41+
2942
#include "tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.h"
30-
43+
3144
-#if defined(__ANDROID__) && (__ANDROID_API__ >= 21) && \
3245
+#if (defined(__ANDROID__) && (__ANDROID_API__ >= 21)) || defined(__linux__) && \
3346
(defined(__ARM_ARCH_7A__) || defined(__aarch64__))
34-
47+
3548
#include <asm/unistd.h>
3649
diff --git a/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.h b/tensorflow/core/platform/profile_utils/android_armv7a_cpu_utils_helper.h
3750
index 66bc0fd5928..ac2be9af930 100644
@@ -40,14 +53,14 @@ index 66bc0fd5928..ac2be9af930 100644
4053
@@ -22,7 +22,7 @@ limitations under the License.
4154
#include "tensorflow/core/platform/profile_utils/i_cpu_utils_helper.h"
4255
#include "tensorflow/core/platform/types.h"
43-
56+
4457
-#if defined(__ANDROID__) && (__ANDROID_API__ >= 21) && \
4558
+#if (defined(__ANDROID__) && (__ANDROID_API__ >= 21)) || defined(__linux__) && \
4659
(defined(__ARM_ARCH_7A__) || defined(__aarch64__))
47-
60+
4861
struct perf_event_attr;
4962
diff --git a/tensorflow/core/platform/profile_utils/cpu_utils.cc b/tensorflow/core/platform/profile_utils/cpu_utils.cc
50-
index 5f693d73a98..a4f88aac92f 100644
63+
index 4cc498ab412..468e4862648 100644
5164
--- a/tensorflow/core/platform/profile_utils/cpu_utils.cc
5265
+++ b/tensorflow/core/platform/profile_utils/cpu_utils.cc
5366
@@ -80,6 +80,15 @@ static ICpuUtilsHelper* cpu_utils_helper_instance_ = nullptr;
@@ -75,3 +88,16 @@ index 5f693d73a98..a4f88aac92f 100644
7588
(defined(__ARM_ARCH_7A__) || defined(__aarch64__))
7689
cpu_utils_helper_instance_ = new AndroidArmV7ACpuUtilsHelper();
7790
#else
91+
diff --git a/tensorflow/workspace1.bzl b/tensorflow/workspace1.bzl
92+
index 6fa7f2f5828..2bdcb4d53db 100644
93+
--- a/tensorflow/workspace1.bzl
94+
+++ b/tensorflow/workspace1.bzl
95+
@@ -8,7 +8,7 @@ load("@rules_cuda//cuda:dependencies.bzl", "rules_cuda_dependencies")
96+
97+
def workspace():
98+
native.register_toolchains("@local_config_python//:py_toolchain")
99+
- rules_cuda_dependencies()
100+
+ rules_cuda_dependencies(with_rules_cc=False)
101+
102+
closure_repositories()
103+
bazel_toolchains_archive()

Diff for: third_party/tf_text/tftext.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/tensorflow_text/tftext.bzl b/tensorflow_text/tftext.bzl
2-
index 8ca1a37..c7acdac 100644
2+
index 7f703b3..d2c590a 100644
33
--- a/tensorflow_text/tftext.bzl
44
+++ b/tensorflow_text/tftext.bzl
5-
@@ -98,8 +98,7 @@ def tf_deps(deps = []):
5+
@@ -93,8 +93,7 @@ def tf_deps(deps = []):
66
"@org_tensorflow//tensorflow/core:portable_tensorflow_lib_lite",
77
],
88
"//conditions:default": [

0 commit comments

Comments
 (0)