Skip to content

Commit 3dd80c1

Browse files
[executorch] Remove EXECUTORCH_CLIENTS visibility gating - Devtools, Examples & More (#16527)
This PR was created by the merge bot to help merge the original PR into the main branch. ghstack PR number: #16480 by @GregoryComer ^ Please use this as the source of truth for the PR details, comments, and reviews ghstack PR base: https://github.com/pytorch/executorch/tree/gh/GregoryComer/173/base ghstack PR head: https://github.com/pytorch/executorch/tree/gh/GregoryComer/173/head Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/GregoryComer/172/orig Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/GregoryComer/173/orig Differential Revision: [D89902031](https://our.internmc.facebook.com/intern/diff/D89902031/) @diff-train-skip-merge Co-authored-by: Gregory Comer <[email protected]>
1 parent 19e8654 commit 3dd80c1

File tree

30 files changed

+73
-310
lines changed

30 files changed

+73
-310
lines changed

codegen/targets.bzl

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,15 @@ def define_common_targets():
1515
"templates/**/*.ini",
1616
"templates/**/*.h",
1717
]),
18-
visibility = [
19-
"//executorch/...",
20-
"@EXECUTORCH_CLIENTS",
21-
],
18+
visibility = ["PUBLIC"],
2219
)
2320

2421
runtime.cxx_library(
2522
name = "macros",
2623
exported_headers = [
2724
"macros.h",
2825
],
29-
visibility = [
30-
"//executorch/runtime/kernel/...",
31-
"//executorch/kernels/...",
32-
"@EXECUTORCH_CLIENTS",
33-
],
26+
visibility = ["PUBLIC"],
3427
)
3528

3629
runtime.python_library(
@@ -61,10 +54,7 @@ def define_common_targets():
6154
deps = [
6255
":api",
6356
],
64-
visibility = [
65-
"@EXECUTORCH_CLIENTS",
66-
"//executorch/codegen/...",
67-
],
57+
visibility = ["PUBLIC"],
6858
)
6959

7060
runtime.python_binary(

codegen/tools/targets.bzl

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ def define_common_targets(is_fbcode = False):
2929
],
3030
preload_deps = ["//executorch/codegen/tools:selective_build"],
3131
package_style = "inplace",
32-
visibility = [
33-
"//executorch/...",
34-
"@EXECUTORCH_CLIENTS",
35-
],
32+
visibility = ["PUBLIC"],
3633
)
3734

3835
runtime.python_library(
@@ -72,10 +69,7 @@ def define_common_targets(is_fbcode = False):
7269
":gen_oplist_lib",
7370
],
7471
package_style = "inplace",
75-
visibility = [
76-
"//executorch/...",
77-
"@EXECUTORCH_CLIENTS",
78-
],
72+
visibility = ["PUBLIC"],
7973
)
8074

8175
runtime.python_library(
@@ -224,10 +218,7 @@ def define_common_targets(is_fbcode = False):
224218
srcs = ["gen_ops_def.py"],
225219
main_module = "executorch.codegen.tools.gen_ops_def",
226220
package_style = "inplace",
227-
visibility = [
228-
"//executorch/...",
229-
"@EXECUTORCH_CLIENTS",
230-
],
221+
visibility = ["PUBLIC"],
231222
deps = [
232223
"fbsource//third-party/pypi/pyyaml:pyyaml",
233224
":yaml_util",

configurations/targets.bzl

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ def define_common_targets():
2222
exported_deps = [
2323
"//executorch/extension/threadpool:threadpool",
2424
] + get_all_cpu_backend_targets(),
25-
visibility = [
26-
"//executorch/test/...",
27-
"@EXECUTORCH_CLIENTS",
28-
],
25+
visibility = ["PUBLIC"],
2926
)
3027

3128
# Add a common configuration of cpu optimized operators. This adds a bit of confusion
@@ -45,8 +42,5 @@ def define_common_targets():
4542
functions_yaml_target = "//executorch/kernels/optimized:optimized.yaml",
4643
fallback_yaml_target = "//executorch/kernels/portable:functions.yaml",
4744
define_static_targets = True,
48-
visibility = [
49-
"//executorch/examples/...",
50-
"@EXECUTORCH_CLIENTS",
51-
],
45+
visibility = ["PUBLIC"],
5246
)

devtools/backend_debug/TARGETS

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ runtime.python_library(
88
"__init__.py",
99
"delegation_info.py",
1010
],
11-
visibility = [
12-
"//executorch/...",
13-
"//executorch/exir/backend/...",
14-
"//executorch/test/...",
15-
"@EXECUTORCH_CLIENTS",
16-
],
11+
visibility = ["PUBLIC"],
1712
deps = [
1813
"fbsource//third-party/pypi/pandas:pandas",
1914
"//caffe2:torch",

devtools/bundled_program/TARGETS

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ runtime.python_library(
1010
srcs = [
1111
"core.py",
1212
],
13-
visibility = [
14-
"//executorch/...",
15-
"@EXECUTORCH_CLIENTS",
16-
],
13+
visibility = ["PUBLIC"],
1714
deps = [
1815
":config",
1916
":version",
@@ -29,10 +26,7 @@ runtime.python_library(
2926
srcs = [
3027
"config.py",
3128
],
32-
visibility = [
33-
"//executorch/...",
34-
"@EXECUTORCH_CLIENTS",
35-
],
29+
visibility = ["PUBLIC"],
3630
deps = [
3731
"fbsource//third-party/pypi/typing-extensions:typing-extensions",
3832
"//caffe2:torch",

devtools/bundled_program/serialize/TARGETS

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,7 @@ runtime.python_library(
1616
# Currently serialization API should only be used in some dedicated targets,
1717
# to avoid ODR violation when linking with another Flatbuffers library.
1818
# Please ask before changing this.
19-
visibility = [
20-
"//executorch/bacends/...",
21-
"//executorch/backends/xnnpack/test/...",
22-
"//executorch/codegen/...",
23-
"//executorch/devtools/bundled_program/tests/...",
24-
"//executorch/examples/async_exec:emit_program_lib",
25-
"//executorch/exir:lib",
26-
"//executorch/extension/pybindings/test:test",
27-
"//executorch/extension/pybindings/test:test-library",
28-
"//executorch/profiler/...",
29-
"//executorch/test/...",
30-
"@EXECUTORCH_CLIENTS",
31-
],
19+
visibility = ["PUBLIC"],
3220
deps = [
3321
"fbsource//third-party/pypi/setuptools:setuptools",
3422
"//executorch/devtools/bundled_program/schema:bundled_program_schema_py",

devtools/bundled_program/targets.bzl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ def define_common_targets():
1313
name = "runtime" + aten_suffix,
1414
srcs = ["bundled_program.cpp"],
1515
exported_headers = ["bundled_program.h"],
16-
visibility = [
17-
"//executorch/...",
18-
"@EXECUTORCH_CLIENTS",
19-
],
16+
visibility = ["PUBLIC"],
2017
deps = [
2118
"//executorch/runtime/core/exec_aten/util:dim_order_util" + aten_suffix,
2219
"//executorch/devtools/bundled_program/schema:bundled_program_schema_fbs",

devtools/etdump/data_sinks/targets.bzl

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ def define_data_sink_target(data_sink_name, aten_suffix):
1717
"//executorch/runtime/core/exec_aten:lib" + aten_suffix,
1818
":data_sink_base" + aten_suffix,
1919
],
20-
visibility = [
21-
"//executorch/...",
22-
"@EXECUTORCH_CLIENTS",
23-
],
20+
visibility = ["PUBLIC"],
2421
)
2522

2623
def define_common_targets():
@@ -40,10 +37,7 @@ def define_common_targets():
4037
exported_deps = [
4138
"//executorch/runtime/core/exec_aten/util:scalar_type_util" + aten_suffix,
4239
],
43-
visibility = [
44-
"//executorch/...",
45-
"@EXECUTORCH_CLIENTS",
46-
],
40+
visibility = ["PUBLIC"],
4741
)
4842

4943
define_data_sink_target("buffer_data_sink", aten_suffix)

devtools/etdump/targets.bzl

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def define_common_targets():
4747
"""
4848
runtime.export_file(
4949
name = ETDUMP_SCHEMA_FLATCC,
50-
visibility = ["@EXECUTORCH_CLIENTS"],
50+
visibility = ["PUBLIC"],
5151
)
5252

5353
generate_schema_header_flatcc(
@@ -73,7 +73,7 @@ def define_common_targets():
7373
runtime.cxx_library(
7474
name = ETDUMP_STEM_FLATCC,
7575
srcs = [],
76-
visibility = ["//executorch/...", "@EXECUTORCH_CLIENTS"],
76+
visibility = ["PUBLIC"],
7777
exported_headers = {
7878
ETDUMP_SCHEMA_FLATCC_BUILDER: ":{}[{}]".format(ETDUMP_GEN_RULE_NAME_FLATCC, ETDUMP_SCHEMA_FLATCC_BUILDER),
7979
ETDUMP_SCHEMA_FLATCC_READER: ":{}[{}]".format(ETDUMP_GEN_RULE_NAME_FLATCC, ETDUMP_SCHEMA_FLATCC_READER),
@@ -116,10 +116,7 @@ def define_common_targets():
116116
"fbsource//third-party/re2:re2",
117117
"//executorch/runtime/core:event_tracer" + aten_suffix,
118118
],
119-
visibility = [
120-
"//executorch/...",
121-
"@EXECUTORCH_CLIENTS",
122-
],
119+
visibility = ["PUBLIC"],
123120
)
124121

125122
runtime.cxx_library(
@@ -145,8 +142,5 @@ def define_common_targets():
145142
"//executorch/runtime/core:event_tracer" + aten_suffix,
146143
"//executorch/runtime/core/exec_aten/util:scalar_type_util" + aten_suffix,
147144
],
148-
visibility = [
149-
"//executorch/...",
150-
"@EXECUTORCH_CLIENTS",
151-
],
145+
visibility = ["PUBLIC"],
152146
)

devtools/visualization/TARGETS

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ runtime.python_library(
1010
"__init__.py",
1111
"visualization_utils.py",
1212
],
13-
visibility = [
14-
"//executorch/...",
15-
"@EXECUTORCH_CLIENTS",
16-
],
13+
visibility = ["PUBLIC"],
1714
deps = [
1815
"//caffe2:torch",
1916
"//executorch/exir:lib",

0 commit comments

Comments
 (0)