diff options
author | 2018-06-28 19:13:20 -0700 | |
---|---|---|
committer | 2018-06-28 19:16:41 -0700 | |
commit | 1e7b0e4ad6d0f57f3241fe0b80a65f2c2a7f11b0 (patch) | |
tree | af92d172cedfc41e544c01a349c1d3b30bc3ff85 /tensorflow/core/distributed_runtime | |
parent | 3cee10e61c1c90734317c62ea3388ec44acc8d08 (diff) |
Merge changes from github.
PiperOrigin-RevId: 202585094
Diffstat (limited to 'tensorflow/core/distributed_runtime')
6 files changed, 35 insertions, 25 deletions
diff --git a/tensorflow/core/distributed_runtime/BUILD b/tensorflow/core/distributed_runtime/BUILD index 8247651c24..75f8a19e9c 100644 --- a/tensorflow/core/distributed_runtime/BUILD +++ b/tensorflow/core/distributed_runtime/BUILD @@ -628,6 +628,7 @@ tf_cuda_cc_test( ":master", ":remote_device", ":worker_interface", + "//tensorflow:grpc++", "//tensorflow/core:core_cpu", "//tensorflow/core:core_cpu_internal", "//tensorflow/core:framework", @@ -649,7 +650,6 @@ tf_cuda_cc_test( "//tensorflow/core/kernels:dense_update_ops", "//tensorflow/core/kernels:identity_op", "//tensorflow/core/kernels:variable_ops", - "@grpc//:grpc++", ], ) @@ -667,6 +667,7 @@ tf_cuda_cc_test( ":master", ":remote_device", ":worker_interface", + "//tensorflow:grpc++", "//tensorflow/core:core_cpu", "//tensorflow/core:core_cpu_internal", "//tensorflow/core:framework", @@ -682,7 +683,6 @@ 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++", ], ) diff --git a/tensorflow/core/distributed_runtime/eager/BUILD b/tensorflow/core/distributed_runtime/eager/BUILD index 22d0902af2..055e5dfced 100644 --- a/tensorflow/core/distributed_runtime/eager/BUILD +++ b/tensorflow/core/distributed_runtime/eager/BUILD @@ -48,6 +48,8 @@ cc_library( "eager_service_impl.h", ], deps = [ + "//tensorflow:grpc", + "//tensorflow:grpc++", "//tensorflow/c:c_api_internal", "//tensorflow/c:tf_status_helper", "//tensorflow/core:core_cpu_internal", @@ -67,8 +69,6 @@ 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//:grpc++", ], ) diff --git a/tensorflow/core/distributed_runtime/rpc/BUILD b/tensorflow/core/distributed_runtime/rpc/BUILD index 382ea336ca..d6c493c022 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//:grpc++", + "//tensorflow:grpc", + "//tensorflow:grpc++", "//tensorflow/core:lib", # Required to be able to overload TensorResponse parsing. "//tensorflow/core/distributed_runtime:tensor_coding", @@ -55,8 +55,8 @@ cc_library( hdrs = ["grpc_client_cq_tag.h"], deps = [ ":grpc_util", + "//tensorflow:grpc++", "//tensorflow/core:lib", - "@grpc//:grpc++", ], ) @@ -67,10 +67,10 @@ cc_library( deps = [ ":grpc_client_cq_tag", ":grpc_util", + "//tensorflow:grpc++", "//tensorflow/core:lib", "//tensorflow/core/distributed_runtime:call_options", "//tensorflow/core/distributed_runtime:tensor_coding", - "@grpc//:grpc++", ], ) @@ -83,6 +83,7 @@ cc_library( ":grpc_state", ":grpc_util", ":grpc_worker_service_impl", + "//tensorflow:grpc++", "//tensorflow/core:core_cpu_internal", "//tensorflow/core:lib", "//tensorflow/core:lib_internal", @@ -90,7 +91,6 @@ cc_library( "//tensorflow/core/distributed_runtime:tensor_coding", "//tensorflow/core/distributed_runtime:worker_cache_logger", "//tensorflow/core/distributed_runtime:worker_interface", - "@grpc//:grpc++", ], ) @@ -100,10 +100,10 @@ cc_library( hdrs = ["grpc_channel.h"], deps = [ ":grpc_util", + "//tensorflow:grpc++", "//tensorflow/core:framework", "//tensorflow/core:lib", "//tensorflow/core:lib_internal", - "@grpc//:grpc++", ], ) @@ -112,13 +112,13 @@ cc_library( srcs = ["grpc_tensor_coding.cc"], hdrs = ["grpc_tensor_coding.h"], deps = [ + "//tensorflow:grpc++", "//tensorflow/core:core_cpu_internal", "//tensorflow/core:framework", "//tensorflow/core:framework_internal", "//tensorflow/core:lib", "//tensorflow/core:protos_all_cc", "//tensorflow/core:worker_proto_cc", - "@grpc//:grpc++", ], ) @@ -127,9 +127,9 @@ cc_library( srcs = [], hdrs = ["grpc_call.h"], deps = [ + "//tensorflow:grpc++", "//tensorflow/core:lib", "//tensorflow/core:lib_internal", - "@grpc//:grpc++", ], ) @@ -167,6 +167,7 @@ tf_cuda_library( ":grpc_tensor_coding", ":grpc_util", ":grpc_worker_service_impl", + "//tensorflow:grpc++", "//tensorflow/core:core_cpu_internal", "//tensorflow/core:framework", "//tensorflow/core:lib", @@ -180,7 +181,6 @@ tf_cuda_library( "//tensorflow/core/distributed_runtime:worker_cache", "//tensorflow/core/distributed_runtime:worker_env", "//tensorflow/core/distributed_runtime:worker_session", - "@grpc//:grpc++", ], ) @@ -190,9 +190,9 @@ cc_library( hdrs = ["grpc_worker_service_impl.h"], deps = [ ":grpc_util", + "//tensorflow:grpc++", "//tensorflow/core:worker_proto_cc", "//tensorflow/core/distributed_runtime:tensor_coding", - "@grpc//:grpc++", ], ) @@ -220,12 +220,12 @@ cc_library( ":async_service_interface", ":grpc_call", ":grpc_util", + "//tensorflow:grpc++", "//tensorflow/core:lib", "//tensorflow/core:lib_internal", "//tensorflow/core:master_proto_cc", "//tensorflow/core:master_service_proto_cc", "//tensorflow/core/distributed_runtime:master", - "@grpc//:grpc++", ], alwayslink = 1, ) @@ -259,6 +259,8 @@ cc_library( ":grpc_worker_cache", ":grpc_worker_service", ":rpc_rendezvous_mgr", + "//tensorflow:grpc", + "//tensorflow:grpc++", "//tensorflow/core:core_cpu", "//tensorflow/core:core_cpu_internal", "//tensorflow/core:framework", @@ -277,8 +279,6 @@ cc_library( "//tensorflow/core/distributed_runtime:worker_cache_wrapper", "//tensorflow/core/distributed_runtime:worker_env", "//tensorflow/core/distributed_runtime/rpc/eager:grpc_eager_service_impl", - "@grpc", - "@grpc//:grpc++", ], alwayslink = 1, ) @@ -299,13 +299,13 @@ tf_cc_binary( ], deps = [ ":grpc_server_lib", + "//tensorflow:grpc++", "//tensorflow/core:core_cpu", "//tensorflow/core:framework_internal", "//tensorflow/core:lib", "//tensorflow/core:protos_all_cc", "//tensorflow/core/distributed_runtime:server_lib", "//tensorflow/core/kernels:data_flow", - "@grpc//:grpc++", ], ) @@ -317,6 +317,7 @@ tf_cc_binary( ], deps = [ ":grpc_server_lib", + "//tensorflow:grpc++", "//tensorflow/core:core_cpu", "//tensorflow/core:framework_internal", "//tensorflow/core:lib", @@ -330,7 +331,6 @@ tf_cc_binary( "//tensorflow/core/kernels:matmul_op", "//tensorflow/core/kernels:reduction_ops", "//tensorflow/core/kernels:variable_ops", - "@grpc//:grpc++", ], ) @@ -415,6 +415,7 @@ tf_cc_test( deps = [ ":grpc_tensor_coding", ":grpc_testlib", + "//tensorflow:grpc++", "//tensorflow/core:core_cpu", "//tensorflow/core:core_cpu_internal", "//tensorflow/core:framework", @@ -424,7 +425,6 @@ tf_cc_test( "//tensorflow/core:test_main", "//tensorflow/core:testlib", "//tensorflow/core:worker_proto_cc", - "@grpc//:grpc++", ], ) @@ -434,11 +434,11 @@ tf_cc_test( srcs = ["grpc_util_test.cc"], deps = [ ":grpc_util", + "//tensorflow:grpc", + "//tensorflow:grpc++", "//tensorflow/core:test", "//tensorflow/core:test_main", "//tensorflow/core:worker_proto_cc", - "@grpc", - "@grpc//:grpc++", ], ) diff --git a/tensorflow/core/distributed_runtime/rpc/eager/BUILD b/tensorflow/core/distributed_runtime/rpc/eager/BUILD index 8cec497361..d09a85c6a5 100644 --- a/tensorflow/core/distributed_runtime/rpc/eager/BUILD +++ b/tensorflow/core/distributed_runtime/rpc/eager/BUILD @@ -11,8 +11,8 @@ cc_library( srcs = ["grpc_eager_service.cc"], hdrs = ["grpc_eager_service.h"], deps = [ + "//tensorflow:grpc++", "//tensorflow/core:eager_service_proto_cc", - "@grpc//:grpc++", ], ) @@ -21,6 +21,7 @@ cc_library( srcs = ["grpc_eager_client.cc"], hdrs = ["grpc_eager_client.h"], deps = [ + "//tensorflow:grpc++", "//tensorflow/core:eager_service_proto_cc", "//tensorflow/core:lib", "//tensorflow/core/distributed_runtime/eager:eager_client", @@ -29,7 +30,6 @@ 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++", ], ) @@ -39,6 +39,7 @@ cc_library( hdrs = ["grpc_eager_service_impl.h"], deps = [ ":grpc_eager_service", + "//tensorflow:grpc++", "//tensorflow/core:framework", "//tensorflow/core:ptr_util", "//tensorflow/core/distributed_runtime/eager:eager_service_impl", @@ -47,6 +48,6 @@ cc_library( "//tensorflow/core/distributed_runtime/rpc:grpc_channel", "//tensorflow/core/distributed_runtime/rpc:grpc_util", "//tensorflow/core/distributed_runtime/rpc:grpc_worker_cache", - "@grpc//:grpc++", + "//tensorflow/core/distributed_runtime/rpc:grpc_worker_service", ], ) diff --git a/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc b/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc index 7a9f3c5198..2c833d11a9 100644 --- a/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc +++ b/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc @@ -289,6 +289,12 @@ Status GrpcServer::Init( nullptr); } +Status GrpcServer::Init( + ServiceInitFunction service_func, + const RendezvousMgrCreationFunction& rendezvous_mgr_func) { + return Init(std::move(service_func), rendezvous_mgr_func, nullptr, nullptr); +} + Status GrpcServer::Init() { return Init(nullptr, nullptr, nullptr, nullptr); } Status GrpcServer::ParseChannelSpec(const WorkerCacheFactoryOptions& options, diff --git a/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.h b/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.h index c674da9490..3366246afb 100644 --- a/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.h +++ b/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.h @@ -97,6 +97,9 @@ class GrpcServer : public ServerInterface { const RendezvousMgrCreationFunction& rendezvous_mgr_func, const CollectiveMgrCreationFunction& collective_mgr_func); + Status Init(ServiceInitFunction service_func, + const RendezvousMgrCreationFunction& rendezvous_mgr_func); + Status Init(); // A subclass can override this method to support secure credentials. |