Skip to content

Commit 15a024a

Browse files
jakeharmon8copybara-github
authored andcommitted
Make targets used by TF/JAX publicly visible in OSS
PiperOrigin-RevId: 607472622
1 parent bba2ce9 commit 15a024a

File tree

77 files changed

+409
-338
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+409
-338
lines changed

BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ load("@rules_license//rules:license.bzl", "license")
22

33
package(
44
default_applicable_licenses = [":license"],
5-
default_visibility = ["//visibility:private"],
5+
default_visibility = ["//visibility:public"],
66
)
77

88
licenses(["notice"])

third_party/tsl/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ load("@rules_license//rules:license.bzl", "license")
22

33
package(
44
default_applicable_licenses = [":license"],
5-
default_visibility = ["//visibility:private"],
5+
default_visibility = ["//visibility:public"],
66
)
77

88
licenses(["notice"])

third_party/tsl/tsl/c/BUILD

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Description:
22
# C API for TensorFlow, for use by client language bindings.
33

4+
load("//tsl:tsl.bzl", "internal_visibility", "tsl_copts", "tsl_gpu_library")
45
load("//tsl/platform:build_config.bzl", "tsl_cc_test")
56
load("//tsl/platform:rules_cc.bzl", "cc_library")
6-
load("//tsl:tsl.bzl", "tsl_copts", "tsl_gpu_library")
77

88
# buildifier: disable=same-origin-load
99
load("//tsl:tsl.default.bzl", "filegroup")
@@ -21,7 +21,7 @@ filegroup(
2121
srcs = [
2222
"tsl_status.h",
2323
],
24-
visibility = ["//tensorflow:__subpackages__"],
24+
visibility = internal_visibility(["//tensorflow:__subpackages__"]),
2525
)
2626

2727
filegroup(
@@ -35,9 +35,9 @@ filegroup(
3535
"*test*",
3636
],
3737
),
38-
visibility = [
38+
visibility = internal_visibility([
3939
"//tensorflow/c:__subpackages__",
40-
],
40+
]),
4141
)
4242

4343
tsl_gpu_library(
@@ -111,7 +111,7 @@ tsl_gpu_library(
111111
filegroup(
112112
name = "tsl_status_internal_headers",
113113
srcs = ["tsl_status_internal.h"],
114-
visibility = [
114+
visibility = internal_visibility([
115115
"//tensorflow/c:__subpackages__",
116-
],
116+
]),
117117
)

third_party/tsl/tsl/distributed_runtime/BUILD

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22
# Distributed runtime modules for machine learning, which allows coordination between multiple
33
# processes for distributed operations.
44

5+
load("//tsl:tsl.bzl", "internal_visibility")
56
load(
67
"//tsl/platform:rules_cc.bzl",
78
"cc_library",
89
)
910

1011
package(
1112
# copybara:uncomment default_applicable_licenses = ["//tensorflow:license"],
12-
default_visibility = [
13+
default_visibility = internal_visibility([
1314
"//tsl:internal",
14-
],
15+
]),
1516
licenses = ["notice"],
1617
)
1718

third_party/tsl/tsl/distributed_runtime/coordination/BUILD

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
load("//tsl:tsl.bzl", "if_oss", "set_external_visibility", "tsl_gpu_library")
1+
load("//tsl:tsl.bzl", "if_oss", "internal_visibility", "tsl_gpu_library")
22
load("//tsl/platform:build_config.bzl", "tf_proto_library", "tsl_cc_test")
33
load("//tsl/platform:rules_cc.bzl", "cc_library")
44

55
package(
66
# copybara:uncomment default_applicable_licenses = ["//tensorflow:license"],
7-
default_visibility = set_external_visibility([
7+
default_visibility = internal_visibility([
88
"//tsl:internal",
99
]),
1010
licenses = ["notice"],

third_party/tsl/tsl/distributed_runtime/preemption/BUILD

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
load("//tsl/platform:rules_cc.bzl", "cc_library")
2-
load("//tsl/platform:build_config.bzl", "tsl_cc_test")
1+
load("//tsl:tsl.bzl", "internal_visibility")
32
load("//tsl:tsl.default.bzl", "get_compatible_with_portable", "tsl_grpc_cc_dependencies")
4-
load("//tsl:tsl.bzl", "set_external_visibility")
3+
load("//tsl/platform:build_config.bzl", "tsl_cc_test")
4+
load("//tsl/platform:rules_cc.bzl", "cc_library")
55

66
package(
77
# copybara:uncomment default_applicable_licenses = ["//tensorflow:license"],
8-
default_visibility = set_external_visibility([
8+
default_visibility = internal_visibility([
99
"//tsl:internal",
1010
]),
1111
licenses = ["notice"],

third_party/tsl/tsl/distributed_runtime/rpc/BUILD

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Description:
22
# RPC communication interfaces and implementations for TensorFlow.
33

4-
load("//tsl:tsl.bzl", "set_external_visibility")
4+
load("//tsl:tsl.bzl", "internal_visibility")
55
load("//tsl:tsl.default.bzl", "tsl_grpc_cc_dependencies")
66
load("//tsl/platform:build_config.bzl", "tf_proto_library", "tsl_cc_test")
77
load("//tsl/platform:rules_cc.bzl", "cc_library")
88

99
package(
1010
# copybara:uncomment default_applicable_licenses = ["//tensorflow:license"],
11-
default_visibility = set_external_visibility([
11+
default_visibility = internal_visibility([
1212
"//tsl:internal",
1313
]),
1414
licenses = ["notice"],

third_party/tsl/tsl/distributed_runtime/rpc/coordination/BUILD

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
load("//tsl/platform:rules_cc.bzl", "cc_library")
1+
load("//tsl:tsl.bzl", "internal_visibility")
22
load("//tsl:tsl.default.bzl", "tsl_grpc_cc_dependencies")
3-
load("//tsl:tsl.bzl", "set_external_visibility")
3+
load("//tsl/platform:rules_cc.bzl", "cc_library")
44

55
package(
66
# copybara:uncomment default_applicable_licenses = ["//tensorflow:license"],
7-
default_visibility = set_external_visibility([
7+
default_visibility = internal_visibility([
88
"//tsl:internal",
99
]),
1010
licenses = ["notice"],

third_party/tsl/tsl/framework/BUILD

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# The libraries in this package are not allowed to have ANY dependencies
55
# to other TF components outside of TSL.
66

7-
load("//tsl:tsl.bzl", "set_external_visibility")
7+
load("//tsl:tsl.bzl", "internal_visibility")
88
load("//tsl:tsl.default.bzl", "filegroup", "get_compatible_with_portable")
99
load(
1010
"//tsl/platform:build_config_root.bzl",
@@ -82,7 +82,7 @@ filegroup(
8282
"tracking_allocator.h",
8383
"type_traits.h",
8484
],
85-
visibility = set_external_visibility(["//tensorflow/core:__subpackages__"]),
85+
visibility = internal_visibility(["//tensorflow/core:__subpackages__"]),
8686
)
8787

8888
# Files needed for tf2xla build.
@@ -154,7 +154,7 @@ cc_library(
154154
"cpu_allocator_impl.cc",
155155
"tracking_allocator.h",
156156
],
157-
visibility = set_external_visibility([
157+
visibility = internal_visibility([
158158
"//tensorflow/compiler/xla:__subpackages__",
159159
"//tensorflow/core:__subpackages__",
160160
"//tsl:__subpackages__",
@@ -291,7 +291,7 @@ filegroup(
291291
cc_library(
292292
name = "numeric_types",
293293
hdrs = ["numeric_types.h"],
294-
visibility = set_external_visibility([
294+
visibility = internal_visibility([
295295
"//tensorflow/compiler:__subpackages__",
296296
"//tensorflow/core:__subpackages__",
297297
]),
@@ -333,7 +333,7 @@ cc_library(
333333
cc_library(
334334
name = "type_traits",
335335
hdrs = ["type_traits.h"],
336-
visibility = set_external_visibility([
336+
visibility = internal_visibility([
337337
"//tensorflow/core/framework:__pkg__",
338338
]),
339339
deps = [
@@ -347,7 +347,7 @@ filegroup(
347347
srcs = [
348348
"cancellation.h",
349349
],
350-
visibility = set_external_visibility(["//tensorflow/core:__subpackages__"]),
350+
visibility = internal_visibility(["//tensorflow/core:__subpackages__"]),
351351
)
352352

353353
cc_library(
@@ -403,7 +403,7 @@ exports_files(
403403
"shared_counter.h",
404404
"tracking_allocator.h",
405405
],
406-
visibility = set_external_visibility([
406+
visibility = internal_visibility([
407407
"//tensorflow/core:__pkg__",
408408
"//tensorflow/core/common_runtime:__pkg__",
409409
"//tensorflow/core/common_runtime/gpu:__pkg__",

third_party/tsl/tsl/framework/fixedpoint/BUILD

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
load("//tsl/platform:rules_cc.bzl", "cc_library")
1+
load("//tsl:tsl.bzl", "internal_visibility")
22
load("//tsl:tsl.default.bzl", "get_compatible_with_portable")
3+
load("//tsl/platform:rules_cc.bzl", "cc_library")
34

45
package(
56
# copybara:uncomment default_applicable_licenses = ["//tensorflow:license"],
@@ -47,10 +48,10 @@ filegroup(
4748
"TypeCastingAVX512.h",
4849
],
4950
compatible_with = get_compatible_with_portable(),
50-
visibility = [
51+
visibility = internal_visibility([
5152
"//tensorflow:__subpackages__",
5253
"//tsl:internal",
53-
],
54+
]),
5455
)
5556

5657
# Files needed for core:mobile_srcs_no_runtime.

third_party/tsl/tsl/lib/core/BUILD

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
# The libraries in this package are not allowed to have ANY dependencies
55
# to other TF components outside of TSL.
66

7-
load("//tsl/platform:build_config.bzl", "tsl_cc_test")
8-
load("//tsl:tsl.bzl", "set_external_visibility")
7+
load("//tsl:tsl.bzl", "internal_visibility")
98
load("//tsl:tsl.default.bzl", "get_compatible_with_portable")
9+
load("//tsl/platform:build_config.bzl", "tsl_cc_test")
1010
load(
1111
"//tsl/platform:rules_cc.bzl",
1212
"cc_library",
@@ -28,7 +28,7 @@ filegroup(
2828
"bits.h",
2929
],
3030
compatible_with = get_compatible_with_portable(),
31-
visibility = set_external_visibility(["//tensorflow/core:__pkg__"]),
31+
visibility = internal_visibility(["//tensorflow/core:__pkg__"]),
3232
)
3333

3434
filegroup(
@@ -39,7 +39,7 @@ filegroup(
3939
"status_test_util.h",
4040
],
4141
compatible_with = get_compatible_with_portable(),
42-
visibility = set_external_visibility([
42+
visibility = internal_visibility([
4343
"//tensorflow/core:__pkg__",
4444
"//tensorflow/core/lib/core:__pkg__",
4545
]),
@@ -51,7 +51,7 @@ filegroup(
5151
"bitmap_test.cc",
5252
],
5353
compatible_with = get_compatible_with_portable(),
54-
visibility = set_external_visibility(["//tensorflow/core:__pkg__"]),
54+
visibility = internal_visibility(["//tensorflow/core:__pkg__"]),
5555
)
5656

5757
filegroup(
@@ -61,7 +61,7 @@ filegroup(
6161
"bits.h",
6262
],
6363
compatible_with = get_compatible_with_portable(),
64-
visibility = set_external_visibility(["//tensorflow/core:__pkg__"]),
64+
visibility = internal_visibility(["//tensorflow/core:__pkg__"]),
6565
)
6666

6767
filegroup(
@@ -70,7 +70,7 @@ filegroup(
7070
"status_test_util.h",
7171
],
7272
compatible_with = get_compatible_with_portable(),
73-
visibility = set_external_visibility([
73+
visibility = internal_visibility([
7474
"//tensorflow/core:__pkg__",
7575
"//tensorflow/core/lib/core:__pkg__",
7676
]),

third_party/tsl/tsl/lib/gtl/BUILD

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("//tsl:tsl.bzl", "set_external_visibility")
1+
load("//tsl:tsl.bzl", "internal_visibility")
22
load("//tsl:tsl.default.bzl", "filegroup")
33
load(
44
"//tsl/platform:build_config.bzl",
@@ -11,7 +11,7 @@ load(
1111

1212
package(
1313
# copybara:uncomment default_applicable_licenses = ["//tensorflow:license"],
14-
default_visibility = set_external_visibility([
14+
default_visibility = internal_visibility([
1515
# tensorflow/core:lib effectively exposes all targets under tensorflow/core/lib/**
1616
"//tensorflow/core:__pkg__",
1717
# tensorflow/core/lib/strings:proto_serialization uses on gtl:inlined_vector
@@ -116,7 +116,7 @@ filegroup(
116116
"inlined_vector.h",
117117
"iterator_range.h",
118118
],
119-
visibility = set_external_visibility([
119+
visibility = internal_visibility([
120120
"//tensorflow/core:__pkg__",
121121
"//tensorflow/core/lib/gtl:__pkg__",
122122
]),
@@ -128,7 +128,7 @@ filegroup(
128128
"int_type.h",
129129
"map_util.h",
130130
],
131-
visibility = set_external_visibility([
131+
visibility = internal_visibility([
132132
"//tensorflow/core:__pkg__",
133133
"//tensorflow/core/lib/gtl:__pkg__",
134134
]),
@@ -138,7 +138,7 @@ filegroup(
138138
name = "legacy_lib_test_internal_headers",
139139
srcs = [
140140
],
141-
visibility = set_external_visibility([
141+
visibility = internal_visibility([
142142
"//tensorflow/core:__pkg__",
143143
"//tensorflow/core/lib/gtl:__pkg__",
144144
]),
@@ -148,7 +148,7 @@ filegroup(
148148
name = "legacy_android_gif_internal_headers",
149149
srcs = [
150150
],
151-
visibility = set_external_visibility([
151+
visibility = internal_visibility([
152152
"//tensorflow/core:__pkg__",
153153
"//tensorflow/core/lib/gtl:__pkg__",
154154
]),
@@ -162,7 +162,7 @@ filegroup(
162162
"flatrep.h",
163163
"inlined_vector.h",
164164
],
165-
visibility = set_external_visibility([
165+
visibility = internal_visibility([
166166
"//tensorflow/core:__pkg__",
167167
"//tensorflow/core/lib/gtl:__pkg__",
168168
"//tsl:__subpackages__",
@@ -178,7 +178,7 @@ filegroup(
178178
"map_util.h",
179179
"//tsl/lib/gtl/subtle:map_traits",
180180
],
181-
visibility = set_external_visibility([
181+
visibility = internal_visibility([
182182
"//tensorflow/core:__pkg__",
183183
"//tensorflow/core/lib/gtl:__pkg__",
184184
]),
@@ -197,7 +197,7 @@ filegroup(
197197
"map_util.h",
198198
"//tsl/lib/gtl/subtle:map_traits",
199199
],
200-
visibility = set_external_visibility([
200+
visibility = internal_visibility([
201201
"//tensorflow/core:__pkg__",
202202
"//tensorflow/core/lib/gtl:__pkg__",
203203
]),

third_party/tsl/tsl/lib/gtl/subtle/BUILD

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Description:
22
# gtl subtle packages.
33

4+
load("//tsl:tsl.bzl", "internal_visibility")
45
load("//tsl:tsl.default.bzl", "filegroup")
56

67
package(
@@ -13,8 +14,8 @@ filegroup(
1314
srcs = [
1415
"map_traits.h",
1516
],
16-
visibility = [
17+
visibility = internal_visibility([
1718
"//tensorflow/core/lib/gtl/subtle:__pkg__",
1819
"//tsl/lib/gtl:__pkg__",
19-
],
20+
]),
2021
)

0 commit comments

Comments
 (0)