Migrate from xla_proto_library to tf_proto_library_cc.

xla_data_proto is now a tf_proto_library_cc target.
Also remove the now unused xla_proto_library starlark rule.

PiperOrigin-RevId: 280608537
Change-Id: I2f3255066d0ffa5be1afd01602a5ea061f9824ff
This commit is contained in:
Adrian Kuegel 2019-11-15 00:55:54 -08:00 committed by TensorFlower Gardener
parent 6431ab55bc
commit 7248510478
2 changed files with 3 additions and 23 deletions

View File

@ -1,5 +1,4 @@
load("//tensorflow:tensorflow.bzl", "cc_header_only_library", "tf_cc_test") load("//tensorflow:tensorflow.bzl", "cc_header_only_library", "tf_cc_test")
load("//tensorflow/compiler/xla:xla.bzl", "xla_proto_library")
load( load(
"//tensorflow/core/platform:default/build_config.bzl", "//tensorflow/core/platform:default/build_config.bzl",
"tf_proto_library_cc", "tf_proto_library_cc",
@ -37,9 +36,10 @@ filegroup(
]), ]),
) )
xla_proto_library( tf_proto_library_cc(
name = "xla_data_proto", name = "xla_data_proto",
srcs = ["xla_data.proto"], srcs = ["xla_data.proto"],
cc_api_version = 2,
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )

View File

@ -1,24 +1,4 @@
"""Wrapper around cc_proto_library used inside the XLA codebase.""" """Wrapper around proto libraries used inside the XLA codebase."""
load(
"//tensorflow/core/platform:default/build_config.bzl",
"tf_proto_library_cc",
)
# xla_proto_library() is a convenience wrapper around cc_proto_library.
def xla_proto_library(name, srcs = [], deps = [], visibility = None, testonly = 0, **kwargs):
if kwargs.pop("use_grpc_plugin", None):
kwargs["use_grpc_namespace"] = True
kwargs["cc_grpc_version"] = 1
tf_proto_library_cc(
name = name,
srcs = srcs,
protodeps = deps,
cc_api_version = 2,
testonly = testonly,
visibility = visibility,
**kwargs
)
def xla_py_proto_library(**kwargs): def xla_py_proto_library(**kwargs):
# Note: we don't currently define a proto library target for Python in OSS. # Note: we don't currently define a proto library target for Python in OSS.