Skip to content

Commit 0023865

Browse files
authored
[executorch] Remove EXECUTORCH_CLIENTS visibility gating - Other Backends
Differential Revision: D89902029 Pull Request resolved: #16478
1 parent 7a3db7f commit 0023865

File tree

32 files changed

+80
-275
lines changed

32 files changed

+80
-275
lines changed

backends/aoti/targets.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def define_common_targets():
4949
supports_python_dlopen = True,
5050
# Constructor needed for backend registration.
5151
compiler_flags = ["-Wno-global-constructors"],
52-
visibility = ["@EXECUTORCH_CLIENTS"],
52+
visibility = ["PUBLIC"],
5353
deps = [
5454
"//executorch/runtime/core:core",
5555
"//executorch/runtime/core/exec_aten:lib",
@@ -67,7 +67,7 @@ def define_common_targets():
6767
supports_python_dlopen = True,
6868
# Constructor needed for backend registration.
6969
compiler_flags = ["-Wno-global-constructors"],
70-
visibility = ["@EXECUTORCH_CLIENTS"],
70+
visibility = ["PUBLIC"],
7171
deps = [
7272
"//executorch/runtime/backend:interface",
7373
"//executorch/runtime/core:core",
@@ -80,7 +80,7 @@ def define_common_targets():
8080
# @lint-ignore BUCKLINT: Avoid `link_whole=True` (https://fburl.com/avoid-link-whole)
8181
link_whole = True,
8282
supports_python_dlopen = True,
83-
visibility = ["@EXECUTORCH_CLIENTS"],
83+
visibility = ["PUBLIC"],
8484
exported_deps = [
8585
":common_shims",
8686
":delegate_handle",

backends/apple/coreml/TARGETS

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ oncall("executorch")
88
# TODO: this is a placeholder to support internal fbcode build. We should add the coreml backend target properly.
99
runtime.python_library(
1010
name = "coreml",
11-
visibility = [
12-
"@EXECUTORCH_CLIENTS",
13-
],
11+
visibility = ["PUBLIC"],
1412
)
1513

1614
runtime.python_library(
@@ -19,9 +17,7 @@ runtime.python_library(
1917
"compiler/*.py",
2018
"logging.py",
2119
]),
22-
visibility = [
23-
"@EXECUTORCH_CLIENTS",
24-
],
20+
visibility = ["PUBLIC"],
2521
deps = [
2622
"fbsource//third-party/pypi/coremltools:coremltools",
2723
":executorchcoreml",
@@ -36,9 +32,7 @@ runtime.python_library(
3632
"partition/*.py",
3733
"logging.py",
3834
]),
39-
visibility = [
40-
"@EXECUTORCH_CLIENTS",
41-
],
35+
visibility = ["PUBLIC"],
4236
deps = [
4337
"fbsource//third-party/pypi/coremltools:coremltools",
4438
":backend",
@@ -55,9 +49,7 @@ runtime.python_library(
5549
srcs = glob([
5650
"quantizer/*.py",
5751
]),
58-
visibility = [
59-
"@EXECUTORCH_CLIENTS",
60-
],
52+
visibility = ["PUBLIC"],
6153
)
6254

6355
runtime.python_library(
@@ -66,10 +58,7 @@ runtime.python_library(
6658
"recipes/__init__.py",
6759
"recipes/coreml_recipe_provider.py"
6860
],
69-
visibility = [
70-
"@EXECUTORCH_CLIENTS",
71-
"//executorch/export/...",
72-
],
61+
visibility = ["PUBLIC"],
7362
deps = [
7463
"fbsource//third-party/pypi/coremltools:coremltools",
7564
":coreml_recipe_types",
@@ -91,10 +80,7 @@ runtime.python_library(
9180
srcs = [
9281
"recipes/coreml_recipe_types.py",
9382
],
94-
visibility = [
95-
"@EXECUTORCH_CLIENTS",
96-
"//executorch/export/...",
97-
],
83+
visibility = ["PUBLIC"],
9884
deps = [
9985
"//executorch/export:recipe",
10086
],
@@ -124,10 +110,7 @@ runtime.cxx_python_extension(
124110
types = [
125111
"executorchcoreml.pyi",
126112
],
127-
visibility = [
128-
"//executorch/examples/apple/coreml/...",
129-
"@EXECUTORCH_CLIENTS",
130-
],
113+
visibility = ["PUBLIC"],
131114
deps = [
132115
"fbsource//third-party/nlohmann-json:nlohmann-json",
133116
"fbsource//third-party/pybind11:pybind11",

backends/apple/mps/TARGETS

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ runtime.python_library(
1919
"__init__.py",
2020
"mps_preprocess.py",
2121
],
22-
visibility = [
23-
"@EXECUTORCH_CLIENTS",
24-
],
22+
visibility = ["PUBLIC"],
2523
deps = [
2624
":operators",
2725
":serialization",
@@ -49,9 +47,7 @@ runtime.python_library(
4947
srcs = glob([
5048
"partition/*.py",
5149
]),
52-
visibility = [
53-
"@EXECUTORCH_CLIENTS",
54-
],
50+
visibility = ["PUBLIC"],
5551
deps = [
5652
":backend",
5753
"//caffe2:torch",

backends/apple/mps/targets.bzl

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,7 @@ def define_common_targets(is_xplat = False, platforms = []):
3939
"runtime/operations/*.h",
4040
]),
4141
"srcs": MPS_BACKEND_BUCK_SRCS,
42-
"visibility": [
43-
"//executorch/backends/apple/...",
44-
"//executorch/examples/...",
45-
"//executorch/exir/backend:backend_lib",
46-
"//executorch/extension/pybindings/...",
47-
"//executorch/runtime/backend/...",
48-
"//executorch/devtools/runners/...",
49-
"//executorch/test/...",
50-
"@EXECUTORCH_CLIENTS",
51-
],
42+
"visibility": ["PUBLIC"],
5243
"link_whole": True,
5344
}
5445

backends/arm/runtime/targets.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def define_common_targets():
55
name = "vela_bin_stream",
66
srcs = ["VelaBinStream.cpp"],
77
exported_headers = ["VelaBinStream.h"],
8-
visibility = ["@EXECUTORCH_CLIENTS"],
8+
visibility = ["PUBLIC"],
99
deps = [
1010
"//executorch/runtime/core:core",
1111
],
@@ -21,7 +21,7 @@ def define_common_targets():
2121
supports_python_dlopen = True,
2222
# Constructor needed for backend registration.
2323
compiler_flags = ["-Wno-global-constructors"],
24-
visibility = ["@EXECUTORCH_CLIENTS"],
24+
visibility = ["PUBLIC"],
2525
deps = [
2626
"//executorch/runtime/backend:interface",
2727
":vela_bin_stream",

backends/cadence/fusion_g3/operators/targets.bzl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ def define_operator(name: str, deps: list[str] | None = None) -> None:
2323
name = op_name,
2424
srcs = [op_name + ".cpp"],
2525
platforms = CXX,
26-
visibility = [
27-
"//executorch/backends/cadence/...",
28-
"@EXECUTORCH_CLIENTS",
29-
],
26+
visibility = ["PUBLIC"],
3027
compatible_with = ["ovr_config//cpu:xtensa"],
3128
deps = deps + common_deps,
3229
)

backends/cadence/generic/kernels/targets.bzl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ def define_common_targets():
88
exported_headers = [
99
"kernels.h",
1010
],
11-
visibility = [
12-
"//executorch/backends/cadence/...",
13-
"@EXECUTORCH_CLIENTS",
14-
],
11+
visibility = ["PUBLIC"],
1512
platforms = CXX,
1613
)

0 commit comments

Comments
 (0)