diff --git a/tensorflow/compiler/xla/python/distributed/BUILD b/tensorflow/compiler/xla/python/distributed/BUILD index b38084c3395..5cada95390c 100644 --- a/tensorflow/compiler/xla/python/distributed/BUILD +++ b/tensorflow/compiler/xla/python/distributed/BUILD @@ -1,4 +1,5 @@ load("//tensorflow/core/platform:build_config.bzl", "tf_proto_library_cc") +load("//tensorflow:tensorflow.bzl", "tf_grpc_cc_dependency") load("//tensorflow:tensorflow.bzl", "tf_cc_test") licenses(["notice"]) @@ -24,11 +25,11 @@ cc_library( srcs = ["key_value_store.cc"], hdrs = ["key_value_store.h"], deps = [ - "//tensorflow:grpc++", "@com_google_absl//absl/base:core_headers", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/synchronization", "@com_google_absl//absl/time", + tf_grpc_cc_dependency(), ], ) @@ -73,11 +74,11 @@ cc_library( ":protocol", ":protocol_proto_cc", ":util", - "//tensorflow:grpc++", "//tensorflow/compiler/xla:statusor", "//tensorflow/core:lib", "@com_google_absl//absl/synchronization", "@com_google_absl//absl/time", + tf_grpc_cc_dependency(), ], ) @@ -85,8 +86,8 @@ cc_library( name = "util", hdrs = ["util.h"], deps = [ - "//tensorflow:grpc++", "//tensorflow/compiler/xla:status", + tf_grpc_cc_dependency(), ], ) @@ -97,8 +98,8 @@ cc_library( deps = [ ":client", ":service", - "//tensorflow:grpc++", "//tensorflow/compiler/xla:statusor", + tf_grpc_cc_dependency(), ], ) @@ -109,7 +110,6 @@ tf_cc_test( ":client", ":protocol_proto_cc", ":service", - "//tensorflow:grpc++", "//tensorflow/compiler/xla:protobuf_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla/service:cpu_plugin", @@ -118,5 +118,6 @@ tf_cc_test( "//tensorflow/core:test", "//tensorflow/core:test_main", "@com_google_absl//absl/time", + tf_grpc_cc_dependency(), ], ) diff --git a/tensorflow/compiler/xla/python/tpu_driver/BUILD b/tensorflow/compiler/xla/python/tpu_driver/BUILD index 08da1c29832..4725becdedf 100644 --- a/tensorflow/compiler/xla/python/tpu_driver/BUILD +++ b/tensorflow/compiler/xla/python/tpu_driver/BUILD @@ -1,4 +1,5 @@ load("//tensorflow/core/platform:build_config.bzl", "tf_proto_library_cc") +load("//tensorflow:tensorflow.bzl", "tf_grpc_cc_dependency") load( "//tensorflow/compiler/xla/python/tpu_driver:platform/external/tools.bzl", "external_deps", @@ -61,7 +62,6 @@ cc_library( hdrs = ["grpc_tpu_driver.h"], deps = [ ":tpu_driver", - "//tensorflow:grpc++", "//tensorflow/core/platform:logging", "//tensorflow/compiler/xla:status", "//tensorflow/compiler/xla:util", @@ -69,6 +69,7 @@ cc_library( "//tensorflow/compiler/xla/service:hlo_proto_cc", "//tensorflow/compiler/xla/python/tpu_driver:tpu_service_proto_cc", "//tensorflow/compiler/xla/python/tpu_driver:tpu_driver_proto_cc", + tf_grpc_cc_dependency(), ] + external_deps(), alwayslink = 1, ) diff --git a/tensorflow/compiler/xla/rpc/BUILD b/tensorflow/compiler/xla/rpc/BUILD index d288e0c181f..39fa6a1c267 100644 --- a/tensorflow/compiler/xla/rpc/BUILD +++ b/tensorflow/compiler/xla/rpc/BUILD @@ -1,5 +1,9 @@ -load("//tensorflow:tensorflow.bzl", "tf_cc_test") -load("//tensorflow:tensorflow.bzl", "tf_cc_binary") +load("//tensorflow:tensorflow.bzl", "tf_grpc_cc_dependency") +load( + "//tensorflow:tensorflow.bzl", + "tf_cc_binary", + "tf_cc_test", +) load( "//tensorflow/core/platform:build_config.bzl", "tf_proto_library_cc", @@ -45,12 +49,12 @@ cc_library( srcs = ["grpc_service_main.cc"], deps = [ ":grpc_service", - "//tensorflow:grpc++", "//tensorflow/compiler/xla/service:cpu_plugin", "//tensorflow/compiler/xla/service:platform_util", "//tensorflow/core:framework_internal", "//tensorflow/core:lib", "@com_google_absl//absl/strings:str_format", + tf_grpc_cc_dependency(), ], ) @@ -70,7 +74,6 @@ tf_cc_test( ], deps = [ ":grpc_stub", - "//tensorflow:grpc++", "//tensorflow/compiler/xla/client", "//tensorflow/compiler/xla/client:xla_builder", "//tensorflow/compiler/xla/tests:literal_test_util", @@ -79,6 +82,7 @@ tf_cc_test( "//tensorflow/core:test", "//tensorflow/core:test_main", "@com_google_absl//absl/strings:str_format", + tf_grpc_cc_dependency(), ], ) @@ -88,9 +92,9 @@ cc_library( hdrs = ["grpc_service.h"], deps = [ ":xla_service_proto_cc", - "//tensorflow:grpc++", "//tensorflow/compiler/xla/service", "//tensorflow/compiler/xla/service:platform_util", "//tensorflow/core/distributed_runtime/rpc:grpc_util", + tf_grpc_cc_dependency(), ], )