aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Brennan Saeta <saeta@google.com>2018-06-12 11:12:53 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-06-12 11:15:29 -0700
commitba9422a8adba18fc97cc1923002b7db8ca63dcfe (patch)
tree6a39ae7c735d803b389686a1ad20cfedd03cf560
parentffe3d1b4dba7c39a291861e75060a871caab92c3 (diff)
Switch from grpc++_unsecure to grpc++
Fixes #13590 PiperOrigin-RevId: 200246854
-rw-r--r--tensorflow/compiler/xla/rpc/BUILD6
-rw-r--r--tensorflow/contrib/cmake/CMakeLists.txt9
-rw-r--r--tensorflow/contrib/cmake/external/grpc.cmake17
-rw-r--r--tensorflow/contrib/tpu/profiler/BUILD2
-rw-r--r--tensorflow/contrib/verbs/BUILD4
-rw-r--r--tensorflow/core/debug/BUILD6
-rw-r--r--tensorflow/core/distributed_runtime/BUILD4
-rw-r--r--tensorflow/core/distributed_runtime/eager/BUILD4
-rw-r--r--tensorflow/core/distributed_runtime/rpc/BUILD38
-rw-r--r--tensorflow/core/distributed_runtime/rpc/eager/BUILD6
-rw-r--r--tensorflow/workspace.bzl4
11 files changed, 57 insertions, 43 deletions
diff --git a/tensorflow/compiler/xla/rpc/BUILD b/tensorflow/compiler/xla/rpc/BUILD
index 0d56a9a477..1775666652 100644
--- a/tensorflow/compiler/xla/rpc/BUILD
+++ b/tensorflow/compiler/xla/rpc/BUILD
@@ -42,7 +42,7 @@ tf_cc_binary(
"//tensorflow/compiler/xla/service:cpu_plugin",
"//tensorflow/core:framework_internal",
"//tensorflow/core:lib",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
)
@@ -61,7 +61,7 @@ tf_cc_test(
"//tensorflow/core:lib",
"//tensorflow/core:test",
"//tensorflow/core:test_main",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
)
@@ -74,6 +74,6 @@ cc_library(
"//tensorflow/compiler/xla/service",
"//tensorflow/compiler/xla/service:platform_util",
"//tensorflow/core/distributed_runtime/rpc:grpc_util",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
)
diff --git a/tensorflow/contrib/cmake/CMakeLists.txt b/tensorflow/contrib/cmake/CMakeLists.txt
index 0708d6b7b9..e524e9e743 100644
--- a/tensorflow/contrib/cmake/CMakeLists.txt
+++ b/tensorflow/contrib/cmake/CMakeLists.txt
@@ -18,7 +18,16 @@ cmake_policy(SET CMP0022 NEW)
# Options
option(tensorflow_VERBOSE "Enable for verbose output" OFF)
+
+if(WIN32)
+# BoringSSL is disabled for windows as it currently doesn't build with
+# MSBuild. (Ninja is required.)
option(tensorflow_ENABLE_SSL_SUPPORT "Enable boringssl support" OFF)
+else()
+# BoringSSL is enabled for gRPC.
+option(tensorflow_ENABLE_SSL_SUPPORT "Enable boringssl support" ON)
+endif()
+
option(tensorflow_ENABLE_GRPC_SUPPORT "Enable gRPC support" ON)
option(tensorflow_ENABLE_HDFS_SUPPORT "Enable HDFS support" OFF)
option(tensorflow_ENABLE_JEMALLOC_SUPPORT "Enable jemalloc support" OFF)
diff --git a/tensorflow/contrib/cmake/external/grpc.cmake b/tensorflow/contrib/cmake/external/grpc.cmake
index 693dc7cd67..b1e64aa55c 100644
--- a/tensorflow/contrib/cmake/external/grpc.cmake
+++ b/tensorflow/contrib/cmake/external/grpc.cmake
@@ -20,6 +20,10 @@ set(GRPC_BUILD ${CMAKE_CURRENT_BINARY_DIR}/grpc/src/grpc)
set(GRPC_TAG d184fa229d75d336aedea0041bd59cb93e7e267f)
if(WIN32)
+ # We use unsecure gRPC because boringssl does not build on windows
+ set(grpc_TARGET grpc++_unsecure)
+ set(grpc_DEPENDS protobuf zlib)
+ set(grpc_SSL_PROVIDER NONE)
if(${CMAKE_GENERATOR} MATCHES "Visual Studio.*")
set(grpc_STATIC_LIBRARIES
${CMAKE_CURRENT_BINARY_DIR}/grpc/src/grpc/Release/grpc++_unsecure.lib
@@ -32,9 +36,12 @@ if(WIN32)
${CMAKE_CURRENT_BINARY_DIR}/grpc/src/grpc/gpr.lib)
endif()
else()
+ set(grpc_TARGET grpc++)
+ set(grpc_DEPENDS boringssl protobuf zlib)
+ set(grpc_SSL_PROVIDER module)
set(grpc_STATIC_LIBRARIES
- ${CMAKE_CURRENT_BINARY_DIR}/grpc/src/grpc/libgrpc++_unsecure.a
- ${CMAKE_CURRENT_BINARY_DIR}/grpc/src/grpc/libgrpc_unsecure.a
+ ${CMAKE_CURRENT_BINARY_DIR}/grpc/src/grpc/libgrpc++.a
+ ${CMAKE_CURRENT_BINARY_DIR}/grpc/src/grpc/libgrpc.a
${CMAKE_CURRENT_BINARY_DIR}/grpc/src/grpc/libaddress_sorting.a
${CMAKE_CURRENT_BINARY_DIR}/grpc/src/grpc/third_party/cares/cares/lib/libcares.a
${CMAKE_CURRENT_BINARY_DIR}/grpc/src/grpc/libgpr.a)
@@ -44,13 +51,13 @@ add_definitions(-DGRPC_ARES=0)
ExternalProject_Add(grpc
PREFIX grpc
- DEPENDS protobuf zlib
+ DEPENDS ${grpc_DEPENDS}
GIT_REPOSITORY ${GRPC_URL}
GIT_TAG ${GRPC_TAG}
DOWNLOAD_DIR "${DOWNLOAD_LOCATION}"
BUILD_IN_SOURCE 1
BUILD_BYPRODUCTS ${grpc_STATIC_LIBRARIES}
- BUILD_COMMAND ${CMAKE_COMMAND} --build . --config Release --target grpc++_unsecure
+ BUILD_COMMAND ${CMAKE_COMMAND} --build . --config Release --target ${grpc_TARGET}
COMMAND ${CMAKE_COMMAND} --build . --config Release --target grpc_cpp_plugin
INSTALL_COMMAND ""
CMAKE_CACHE_ARGS
@@ -59,7 +66,7 @@ ExternalProject_Add(grpc
-DPROTOBUF_INCLUDE_DIRS:STRING=${PROTOBUF_INCLUDE_DIRS}
-DPROTOBUF_LIBRARIES:STRING=${protobuf_STATIC_LIBRARIES}
-DZLIB_ROOT:STRING=${ZLIB_INSTALL}
- -DgRPC_SSL_PROVIDER:STRING=NONE
+ -DgRPC_SSL_PROVIDER:STRING=${grpc_SSL_PROVIDER}
)
# grpc/src/core/ext/census/tracing.c depends on the existence of openssl/rand.h.
diff --git a/tensorflow/contrib/tpu/profiler/BUILD b/tensorflow/contrib/tpu/profiler/BUILD
index dbf1ab6bbf..3b2d7adfff 100644
--- a/tensorflow/contrib/tpu/profiler/BUILD
+++ b/tensorflow/contrib/tpu/profiler/BUILD
@@ -53,7 +53,7 @@ tf_cc_binary(
"//tensorflow/core:lib",
"//tensorflow/core/distributed_runtime/rpc:grpc_util",
"//tensorflow/core/platform/cloud:gcs_file_system",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
)
diff --git a/tensorflow/contrib/verbs/BUILD b/tensorflow/contrib/verbs/BUILD
index 9720fd6e86..1b45584dcb 100644
--- a/tensorflow/contrib/verbs/BUILD
+++ b/tensorflow/contrib/verbs/BUILD
@@ -58,7 +58,7 @@ cc_library(
"//tensorflow/core/distributed_runtime/rpc:async_service_interface",
"//tensorflow/core/distributed_runtime/rpc:grpc_call",
"//tensorflow/core/distributed_runtime/rpc:grpc_util",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
alwayslink = 1,
)
@@ -69,7 +69,7 @@ cc_library(
hdrs = ["grpc_verbs_service_impl.h"],
deps = [
":verbs_service_proto_cc",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
)
diff --git a/tensorflow/core/debug/BUILD b/tensorflow/core/debug/BUILD
index 1528c7f130..50f8a307d8 100644
--- a/tensorflow/core/debug/BUILD
+++ b/tensorflow/core/debug/BUILD
@@ -42,7 +42,7 @@ load(
# Check that tensorflow/core:tensorflow does not depend on grpc.
check_deps(
name = "core_tensorflow_check_deps",
- disallowed_deps = ["@grpc//:grpc++_unsecure"],
+ disallowed_deps = ["@grpc//:grpc++"],
deps = ["//tensorflow/core:tensorflow"],
)
@@ -150,7 +150,7 @@ tf_cuda_library(
"//tensorflow/core:lib_internal",
"//tensorflow/core:proto_text",
"//tensorflow/core:protos_all_cc",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
alwayslink = 1,
)
@@ -170,7 +170,7 @@ tf_cuda_library(
"//tensorflow/core:lib",
"//tensorflow/core:lib_internal",
"//tensorflow/core:protos_all_cc",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
alwayslink = 1,
)
diff --git a/tensorflow/core/distributed_runtime/BUILD b/tensorflow/core/distributed_runtime/BUILD
index 9032823e17..c6db2aec06 100644
--- a/tensorflow/core/distributed_runtime/BUILD
+++ b/tensorflow/core/distributed_runtime/BUILD
@@ -649,7 +649,7 @@ tf_cuda_cc_test(
"//tensorflow/core/kernels:dense_update_ops",
"//tensorflow/core/kernels:identity_op",
"//tensorflow/core/kernels:variable_ops",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
)
@@ -682,7 +682,7 @@ tf_cuda_cc_test(
"//tensorflow/core/distributed_runtime/rpc:grpc_testlib",
"//tensorflow/core/distributed_runtime/rpc:grpc_util",
"//tensorflow/core/distributed_runtime/rpc:grpc_worker_cache",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
)
diff --git a/tensorflow/core/distributed_runtime/eager/BUILD b/tensorflow/core/distributed_runtime/eager/BUILD
index f3922dde74..dc02d1b9bf 100644
--- a/tensorflow/core/distributed_runtime/eager/BUILD
+++ b/tensorflow/core/distributed_runtime/eager/BUILD
@@ -65,8 +65,8 @@ cc_library(
"//tensorflow/core/distributed_runtime:worker_env",
"//tensorflow/core/distributed_runtime/eager:remote_tensor_handle",
"//tensorflow/core/distributed_runtime/rpc:rpc_rendezvous_mgr",
- "@grpc//:grpc++_unsecure",
- "@grpc//:grpc_unsecure",
+ "@grpc",
+ "@grpc//:grpc++",
],
)
diff --git a/tensorflow/core/distributed_runtime/rpc/BUILD b/tensorflow/core/distributed_runtime/rpc/BUILD
index 2eadfcde54..882271e3f5 100644
--- a/tensorflow/core/distributed_runtime/rpc/BUILD
+++ b/tensorflow/core/distributed_runtime/rpc/BUILD
@@ -41,8 +41,8 @@ cc_library(
srcs = ["grpc_util.cc"],
hdrs = ["grpc_util.h"],
deps = [
- "@grpc//:grpc_unsecure",
- "@grpc//:grpc++_unsecure",
+ "@grpc",
+ "@grpc//:grpc++",
"//tensorflow/core:lib",
# Required to be able to overload TensorResponse parsing.
"//tensorflow/core/distributed_runtime:tensor_coding",
@@ -56,7 +56,7 @@ cc_library(
deps = [
":grpc_util",
"//tensorflow/core:lib",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
)
@@ -70,7 +70,7 @@ cc_library(
"//tensorflow/core:lib",
"//tensorflow/core/distributed_runtime:call_options",
"//tensorflow/core/distributed_runtime:tensor_coding",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
)
@@ -90,7 +90,7 @@ cc_library(
"//tensorflow/core/distributed_runtime:tensor_coding",
"//tensorflow/core/distributed_runtime:worker_cache_logger",
"//tensorflow/core/distributed_runtime:worker_interface",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
)
@@ -103,7 +103,7 @@ cc_library(
"//tensorflow/core:framework",
"//tensorflow/core:lib",
"//tensorflow/core:lib_internal",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
)
@@ -118,7 +118,7 @@ cc_library(
"//tensorflow/core:lib",
"//tensorflow/core:protos_all_cc",
"//tensorflow/core:worker_proto_cc",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
)
@@ -129,7 +129,7 @@ cc_library(
deps = [
"//tensorflow/core:lib",
"//tensorflow/core:lib_internal",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
)
@@ -180,7 +180,7 @@ tf_cuda_library(
"//tensorflow/core/distributed_runtime:worker_cache",
"//tensorflow/core/distributed_runtime:worker_env",
"//tensorflow/core/distributed_runtime:worker_session",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
)
@@ -192,7 +192,7 @@ cc_library(
":grpc_util",
"//tensorflow/core:worker_proto_cc",
"//tensorflow/core/distributed_runtime:tensor_coding",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
)
@@ -225,7 +225,7 @@ cc_library(
"//tensorflow/core:lib_internal",
"//tensorflow/core:master_proto_cc",
"//tensorflow/core/distributed_runtime:master",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
alwayslink = 1,
)
@@ -236,7 +236,7 @@ cc_library(
hdrs = ["grpc_master_service_impl.h"],
deps = [
"//tensorflow/core:master_proto_cc",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
)
@@ -285,8 +285,8 @@ cc_library(
"//tensorflow/core/distributed_runtime:server_lib",
"//tensorflow/core/distributed_runtime:session_mgr",
"//tensorflow/core/distributed_runtime:worker_env",
- "@grpc//:grpc++_unsecure",
- "@grpc//:grpc_unsecure",
+ "@grpc",
+ "@grpc//:grpc++",
],
alwayslink = 1,
)
@@ -313,7 +313,7 @@ tf_cc_binary(
"//tensorflow/core:protos_all_cc",
"//tensorflow/core/distributed_runtime:server_lib",
"//tensorflow/core/kernels:data_flow",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
)
@@ -338,7 +338,7 @@ tf_cc_binary(
"//tensorflow/core/kernels:matmul_op",
"//tensorflow/core/kernels:reduction_ops",
"//tensorflow/core/kernels:variable_ops",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
)
@@ -432,7 +432,7 @@ tf_cc_test(
"//tensorflow/core:test_main",
"//tensorflow/core:testlib",
"//tensorflow/core:worker_proto_cc",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
)
@@ -445,8 +445,8 @@ tf_cc_test(
"//tensorflow/core:test",
"//tensorflow/core:test_main",
"//tensorflow/core:worker_proto_cc",
- "@grpc//:grpc++_unsecure",
- "@grpc//:grpc_unsecure",
+ "@grpc",
+ "@grpc//:grpc++",
],
)
diff --git a/tensorflow/core/distributed_runtime/rpc/eager/BUILD b/tensorflow/core/distributed_runtime/rpc/eager/BUILD
index 1a3bd9d6bf..a5472159cc 100644
--- a/tensorflow/core/distributed_runtime/rpc/eager/BUILD
+++ b/tensorflow/core/distributed_runtime/rpc/eager/BUILD
@@ -12,7 +12,7 @@ cc_library(
hdrs = ["grpc_eager_service.h"],
deps = [
"//tensorflow/core:eager_service_proto_cc",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
)
@@ -29,7 +29,7 @@ cc_library(
"//tensorflow/core/distributed_runtime/rpc:grpc_state",
"//tensorflow/core/distributed_runtime/rpc:grpc_util",
"//tensorflow/core/distributed_runtime/rpc/eager:grpc_eager_service",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
)
@@ -48,7 +48,7 @@ cc_library(
"//tensorflow/core/distributed_runtime/rpc:grpc_util",
"//tensorflow/core/distributed_runtime/rpc:grpc_worker_cache",
"//tensorflow/core/distributed_runtime/rpc:grpc_worker_service",
- "@grpc//:grpc++_unsecure",
+ "@grpc//:grpc++",
],
)
diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl
index 7df3d6594b..b13929e636 100644
--- a/tensorflow/workspace.bzl
+++ b/tensorflow/workspace.bzl
@@ -778,11 +778,9 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
actual = "@grpc//:grpc_python_plugin",
)
- # gRPC has three empty C++ functions which it wants the user to define
- # at build time. https://github.com/grpc/grpc/issues/13590
native.bind(
name = "grpc_lib",
- actual = "@grpc//:grpc++_unsecure",
+ actual = "@grpc//:grpc++",
)
# Needed by gRPC