From 72485104780f4f803363dadf4b0b8206ff29cf29 Mon Sep 17 00:00:00 2001 From: Adrian Kuegel Date: Fri, 15 Nov 2019 00:55:54 -0800 Subject: [PATCH] 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 --- tensorflow/compiler/xla/BUILD | 4 ++-- tensorflow/compiler/xla/xla.bzl | 22 +--------------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/tensorflow/compiler/xla/BUILD b/tensorflow/compiler/xla/BUILD index 29aafa263df..24be75c3d62 100644 --- a/tensorflow/compiler/xla/BUILD +++ b/tensorflow/compiler/xla/BUILD @@ -1,5 +1,4 @@ load("//tensorflow:tensorflow.bzl", "cc_header_only_library", "tf_cc_test") -load("//tensorflow/compiler/xla:xla.bzl", "xla_proto_library") load( "//tensorflow/core/platform:default/build_config.bzl", "tf_proto_library_cc", @@ -37,9 +36,10 @@ filegroup( ]), ) -xla_proto_library( +tf_proto_library_cc( name = "xla_data_proto", srcs = ["xla_data.proto"], + cc_api_version = 2, visibility = ["//visibility:public"], ) diff --git a/tensorflow/compiler/xla/xla.bzl b/tensorflow/compiler/xla/xla.bzl index 29b38218d42..bfa6e6ef8f8 100644 --- a/tensorflow/compiler/xla/xla.bzl +++ b/tensorflow/compiler/xla/xla.bzl @@ -1,24 +1,4 @@ -"""Wrapper around cc_proto_library 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 - ) +"""Wrapper around proto libraries used inside the XLA codebase.""" def xla_py_proto_library(**kwargs): # Note: we don't currently define a proto library target for Python in OSS.