aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/grpc
diff options
context:
space:
mode:
authorGravatar Allen Lavoie <allenl@google.com>2017-09-21 11:29:45 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-09-21 11:33:40 -0700
commit5c7f9e316d8c7735308a217310350d416d7498cc (patch)
treea3457b97367fe6b1ed4ad47a4284cac88495ae16 /third_party/grpc
parent054b88233bf6d6bc5b953fca50dbb01d108b2d18 (diff)
Remove RTLD_GLOBAL when loading pywrap_tensorflow
Splits out a shared object (//tensorflow/libtensorflow_framework.so) with core TensorFlow functionality but neither ops nor kernels. This object does include registries for ops, kernels, filesystems, etc. The expectation is that shared objects containing custom ops will have a runtime dependency on this framework shared object: TensorFlow will load the custom op shared object, and the custom op shared object will use the symbols from the framework shared object to register its ops/kernels/etc. rather than (as before this change) relying on those symbols being in the global symbol table. In this mode, TensorFlow artifacts (_pywrap_tensorflow.so for Python, libtensorflow.so for the C API; currently excluding Android artifacts) will depend on the framework shared object, which will be packaged with the Python pip package and other language distributions. This means that custom ops targeting the framework shared object will work in any language (C++, Java, Go; previously custom ops in these languages required custom Bazel builds). Adds a config option which reproduces the old behavior (--config=monolithic), which for Python means building a monolithic pywrap_tensorflow shared object and loading its symbols into the global symbol table (with RTLD_GLOBAL). As before, there will be no extra-Bazel custom op support for other languages when compiling in this mode. Does not change behavior on Windows; the cmake build is still monolithic. Requires using tf_cc_binary, tf_cc_test, and (rarely) tf_cc_shared_object rules to link in the framework shared object when adding new TensorFlow build rules. PiperOrigin-RevId: 169572746
Diffstat (limited to 'third_party/grpc')
-rw-r--r--third_party/grpc/grpc.patch19
1 files changed, 18 insertions, 1 deletions
diff --git a/third_party/grpc/grpc.patch b/third_party/grpc/grpc.patch
index 6fde44c782..c06d9b8aaf 100644
--- a/third_party/grpc/grpc.patch
+++ b/third_party/grpc/grpc.patch
@@ -1,5 +1,5 @@
diff --git a/BUILD b/BUILD
-index 6dcc76eb7a..903739bfad 100644
+index 6552d5879e..59adb1ce1c 100644
--- a/BUILD
+++ b/BUILD
@@ -287,6 +287,7 @@ grpc_cc_library(
@@ -10,6 +10,23 @@ index 6dcc76eb7a..903739bfad 100644
"grpc_unsecure",
],
)
+@@ -1519,13 +1520,13 @@ grpc_cc_library(
+
+ grpc_cc_library(
+ name = "grpc++_config_proto",
+- external_deps = [
+- "protobuf",
+- ],
+ language = "c++",
+ public_hdrs = [
+ "include/grpc++/impl/codegen/config_protobuf.h",
+ ],
++ deps = [
++ "@protobuf_archive//:protobuf_headers",
++ ],
+ )
+
+ grpc_cc_library(
diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl
index f793cae56d..0295adb8ab 100644
--- a/bazel/grpc_build_system.bzl