Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions codegen/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,15 @@ def define_common_targets():
"templates/**/*.ini",
"templates/**/*.h",
]),
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
)

runtime.cxx_library(
name = "macros",
exported_headers = [
"macros.h",
],
visibility = [
"//executorch/runtime/kernel/...",
"//executorch/kernels/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
)

runtime.python_library(
Expand Down Expand Up @@ -61,10 +54,7 @@ def define_common_targets():
deps = [
":api",
],
visibility = [
"@EXECUTORCH_CLIENTS",
"//executorch/codegen/...",
],
visibility = ["PUBLIC"],
)

runtime.python_binary(
Expand Down
15 changes: 3 additions & 12 deletions codegen/tools/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ def define_common_targets(is_fbcode = False):
],
preload_deps = ["//executorch/codegen/tools:selective_build"],
package_style = "inplace",
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
)

runtime.python_library(
Expand Down Expand Up @@ -72,10 +69,7 @@ def define_common_targets(is_fbcode = False):
":gen_oplist_lib",
],
package_style = "inplace",
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
)

runtime.python_library(
Expand Down Expand Up @@ -224,10 +218,7 @@ def define_common_targets(is_fbcode = False):
srcs = ["gen_ops_def.py"],
main_module = "executorch.codegen.tools.gen_ops_def",
package_style = "inplace",
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
deps = [
"fbsource//third-party/pypi/pyyaml:pyyaml",
":yaml_util",
Expand Down
10 changes: 2 additions & 8 deletions configurations/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ def define_common_targets():
exported_deps = [
"//executorch/extension/threadpool:threadpool",
] + get_all_cpu_backend_targets(),
visibility = [
"//executorch/test/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
)

# Add a common configuration of cpu optimized operators. This adds a bit of confusion
Expand All @@ -45,8 +42,5 @@ def define_common_targets():
functions_yaml_target = "//executorch/kernels/optimized:optimized.yaml",
fallback_yaml_target = "//executorch/kernels/portable:functions.yaml",
define_static_targets = True,
visibility = [
"//executorch/examples/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
)
7 changes: 1 addition & 6 deletions devtools/backend_debug/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ runtime.python_library(
"__init__.py",
"delegation_info.py",
],
visibility = [
"//executorch/...",
"//executorch/exir/backend/...",
"//executorch/test/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
deps = [
"fbsource//third-party/pypi/pandas:pandas",
"//caffe2:torch",
Expand Down
10 changes: 2 additions & 8 deletions devtools/bundled_program/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ runtime.python_library(
srcs = [
"core.py",
],
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
deps = [
":config",
":version",
Expand All @@ -29,10 +26,7 @@ runtime.python_library(
srcs = [
"config.py",
],
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
deps = [
"fbsource//third-party/pypi/typing-extensions:typing-extensions",
"//caffe2:torch",
Expand Down
14 changes: 1 addition & 13 deletions devtools/bundled_program/serialize/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,7 @@ runtime.python_library(
# Currently serialization API should only be used in some dedicated targets,
# to avoid ODR violation when linking with another Flatbuffers library.
# Please ask before changing this.
visibility = [
"//executorch/bacends/...",
"//executorch/backends/xnnpack/test/...",
"//executorch/codegen/...",
"//executorch/devtools/bundled_program/tests/...",
"//executorch/examples/async_exec:emit_program_lib",
"//executorch/exir:lib",
"//executorch/extension/pybindings/test:test",
"//executorch/extension/pybindings/test:test-library",
"//executorch/profiler/...",
"//executorch/test/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
deps = [
"fbsource//third-party/pypi/setuptools:setuptools",
"//executorch/devtools/bundled_program/schema:bundled_program_schema_py",
Expand Down
5 changes: 1 addition & 4 deletions devtools/bundled_program/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ def define_common_targets():
name = "runtime" + aten_suffix,
srcs = ["bundled_program.cpp"],
exported_headers = ["bundled_program.h"],
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
deps = [
"//executorch/runtime/core/exec_aten/util:dim_order_util" + aten_suffix,
"//executorch/devtools/bundled_program/schema:bundled_program_schema_fbs",
Expand Down
10 changes: 2 additions & 8 deletions devtools/etdump/data_sinks/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ def define_data_sink_target(data_sink_name, aten_suffix):
"//executorch/runtime/core/exec_aten:lib" + aten_suffix,
":data_sink_base" + aten_suffix,
],
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
)

def define_common_targets():
Expand All @@ -40,10 +37,7 @@ def define_common_targets():
exported_deps = [
"//executorch/runtime/core/exec_aten/util:scalar_type_util" + aten_suffix,
],
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
)

define_data_sink_target("buffer_data_sink", aten_suffix)
Expand Down
14 changes: 4 additions & 10 deletions devtools/etdump/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def define_common_targets():
"""
runtime.export_file(
name = ETDUMP_SCHEMA_FLATCC,
visibility = ["@EXECUTORCH_CLIENTS"],
visibility = ["PUBLIC"],
)

generate_schema_header_flatcc(
Expand All @@ -73,7 +73,7 @@ def define_common_targets():
runtime.cxx_library(
name = ETDUMP_STEM_FLATCC,
srcs = [],
visibility = ["//executorch/...", "@EXECUTORCH_CLIENTS"],
visibility = ["PUBLIC"],
exported_headers = {
ETDUMP_SCHEMA_FLATCC_BUILDER: ":{}[{}]".format(ETDUMP_GEN_RULE_NAME_FLATCC, ETDUMP_SCHEMA_FLATCC_BUILDER),
ETDUMP_SCHEMA_FLATCC_READER: ":{}[{}]".format(ETDUMP_GEN_RULE_NAME_FLATCC, ETDUMP_SCHEMA_FLATCC_READER),
Expand Down Expand Up @@ -116,10 +116,7 @@ def define_common_targets():
"fbsource//third-party/re2:re2",
"//executorch/runtime/core:event_tracer" + aten_suffix,
],
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
)

runtime.cxx_library(
Expand All @@ -145,8 +142,5 @@ def define_common_targets():
"//executorch/runtime/core:event_tracer" + aten_suffix,
"//executorch/runtime/core/exec_aten/util:scalar_type_util" + aten_suffix,
],
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
)
5 changes: 1 addition & 4 deletions devtools/visualization/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ runtime.python_library(
"__init__.py",
"visualization_utils.py",
],
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
deps = [
"//caffe2:torch",
"//executorch/exir:lib",
Expand Down
15 changes: 3 additions & 12 deletions examples/apple/coreml/llama/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ runtime.python_library(
],
_is_external_target = True,
base_module = "executorch.examples.apple.coreml.llama",
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
deps = [
"//caffe2:torch",
"//executorch/examples/models/llama:llama_transformer",
Expand All @@ -27,10 +24,7 @@ runtime.python_library(
],
_is_external_target = True,
base_module = "executorch.examples.apple.coreml.llama",
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
deps = [
"//caffe2:torch",
],
Expand All @@ -42,10 +36,7 @@ runtime.python_binary(
"export.py",
],
main_function = "executorch.examples.apple.coreml.llama.export.main",
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
deps = [
"fbsource//third-party/pypi/coremltools:coremltools",
":llama_transformer",
Expand Down
34 changes: 6 additions & 28 deletions examples/models/llama/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ runtime.python_library(
],
_is_external_target = True,
base_module = "executorch.examples.models.llama",
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
deps = [
":transformer_modules",
"//caffe2:torch",
Expand All @@ -39,10 +36,7 @@ runtime.python_library(
],
_is_external_target = True,
base_module = "executorch.examples.models.llama",
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
)

runtime.python_library(
Expand All @@ -52,10 +46,7 @@ runtime.python_library(
],
_is_external_target = True,
base_module = "executorch.examples.models.llama",
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
deps = [
":llama_transformer",
"//caffe2:torch",
Expand Down Expand Up @@ -116,10 +107,7 @@ runtime.command_alias(

runtime.python_library(
name = "source_transformation",
visibility = [
"//executorch/examples/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
srcs = [
"source_transformation/apply_spin_quant_r1_r2.py",
"source_transformation/attention.py",
Expand Down Expand Up @@ -155,12 +143,7 @@ runtime.python_library(
],
_is_external_target = True,
base_module = "executorch.examples.models.llama",
visibility = [
"//bento/...",
"//bento_kernels/...",
"//executorch/examples/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
deps = [
":hf_download",
":source_transformation",
Expand Down Expand Up @@ -207,12 +190,7 @@ runtime.python_library(
],
_is_external_target = True,
base_module = "executorch.examples.models.llama",
visibility = [
"//bento/...",
"//bento_kernels/...",
"//executorch/examples/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
deps = [
"fbsource//third-party/pypi/tqdm:tqdm",
"fbsource//third-party/pypi/datasets:datasets",
Expand Down
7 changes: 1 addition & 6 deletions examples/models/llama/runner/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ runtime.python_library(
],
_is_external_target = True,
base_module = "executorch.examples.models.llama.runner",
visibility = [
"//bento/...",
"//bento_kernels/...",
"//executorch/examples/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
deps = [
"//executorch/examples/models/llama:export_library",
],
Expand Down
8 changes: 2 additions & 6 deletions examples/models/llama/runner/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ def define_common_targets():
preprocessor_flags = [
"-DUSE_ATEN_LIB",
] if aten else [],
visibility = [
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
compiler_flags = [
"-Wno-missing-prototypes",
],
Expand Down Expand Up @@ -64,9 +62,7 @@ def define_common_targets():
exported_headers = [
"static_attention_io_manager.h",
],
visibility = [
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
exported_deps = [
"//executorch/runtime/executor:program",
]
Expand Down
Loading
Loading