From 33ceb9511a3b3a1501dda4e060cdebc81968acae Mon Sep 17 00:00:00 2001 From: David Dunleavy Date: Mon, 6 May 2024 14:12:18 -0700 Subject: [PATCH] Add `bzl_library` targets to XLA and TSL PiperOrigin-RevId: 631181194 --- third_party/tsl/tsl/platform/BUILD | 6 ++++++ third_party/tsl/tsl/platform/default/BUILD | 6 ++++++ xla/BUILD | 18 ++++++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/third_party/tsl/tsl/platform/BUILD b/third_party/tsl/tsl/platform/BUILD index 788614aeeb06b..3be1293fa25f4 100644 --- a/third_party/tsl/tsl/platform/BUILD +++ b/third_party/tsl/tsl/platform/BUILD @@ -1707,6 +1707,12 @@ bzl_library( deps = tf_platform_alias("rules_cc_bzl"), ) +bzl_library( + name = "build_config_root_bzl", + srcs = ["build_config_root.bzl"], + deps = tf_platform_alias("build_config_root_bzl"), +) + cc_library( name = "retrying_utils", srcs = [ diff --git a/third_party/tsl/tsl/platform/default/BUILD b/third_party/tsl/tsl/platform/default/BUILD index 98797a0b51d3e..5adfc6b58d972 100644 --- a/third_party/tsl/tsl/platform/default/BUILD +++ b/third_party/tsl/tsl/platform/default/BUILD @@ -554,6 +554,12 @@ bzl_library( srcs = ["rules_cc.bzl"], ) +bzl_library( + name = "build_config_root_bzl", + srcs = ["build_config_root.bzl"], + # copybara:uncomment parse_tests = False, +) + # Export source files needed for mobile builds, which do not use granular targets. filegroup( name = "additional_mobile_srcs_no_runtime", diff --git a/xla/BUILD b/xla/BUILD index 8e72e40886833..3fe97f90a56da 100644 --- a/xla/BUILD +++ b/xla/BUILD @@ -1,3 +1,4 @@ +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") load( "@tsl//tsl/platform:build_config.bzl", "tf_proto_library", @@ -1258,3 +1259,20 @@ alias( actual = ":empty", visibility = ["//visibility:public"], ) + +bzl_library( + name = "lit_bzl", + srcs = ["lit.bzl"], + deps = ["@bazel_skylib//lib:paths"], +) + +bzl_library( + name = "xla_bzl", + srcs = ["xla.bzl"], + deps = [ + "//xla/tsl:tsl_bzl", + "@local_config_rocm//rocm:build_defs_bzl", + "@tsl//tsl/platform:build_config_root_bzl", + "@tsl//tsl/platform/default:cuda_build_defs_bzl", + ], +)