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
20 changes: 4 additions & 16 deletions kernels/aten/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,12 @@ def define_common_targets():

runtime.export_file(
name = "functions.yaml",
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
)

runtime.export_file(
name = "edge_dialect_aten_op.yaml",
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
)

et_operator_library(
Expand All @@ -33,10 +27,7 @@ def define_common_targets():
runtime.cxx_library(
name = "operators_edge_dialect_aten",
srcs = [],
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
exported_deps = [
"//executorch/kernels/aten/cpu:cpu",
],
Expand All @@ -61,8 +52,5 @@ def define_common_targets():
custom_ops_yaml_target = "//executorch/kernels/aten:edge_dialect_aten_op.yaml",
define_static_targets = True,
custom_ops_requires_aot_registration = False,
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
)
12 changes: 6 additions & 6 deletions kernels/optimized/cpu/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def define_common_targets():
name = "add_sub_impl",
srcs = [],
exported_headers = ["op_add_sub_impl.h"],
visibility = ["//executorch/kernels/optimized/cpu/...", "@EXECUTORCH_CLIENTS",],
visibility = ["PUBLIC"],
exported_deps = [
"//executorch/runtime/core:core",
"//executorch/kernels/portable/cpu/util:broadcast_indexes_range",
Expand All @@ -39,15 +39,15 @@ def define_common_targets():
name = "fft_utils",
srcs = [],
exported_headers = ["fft_utils.h"],
visibility = ["//executorch/kernels/optimized/cpu/...", "@EXECUTORCH_CLIENTS",],
visibility = ["PUBLIC"],
exported_deps = [] if runtime.is_oss else ["fbsource//third-party/pocket_fft:pocketfft"],
)

runtime.cxx_library(
name = "binary_ops",
srcs = ["binary_ops.cpp"],
exported_headers = ["binary_ops.h"],
visibility = ["//executorch/kernels/optimized/cpu/...", "@EXECUTORCH_CLIENTS",],
visibility = ["PUBLIC"],
exported_deps = [
"//executorch/runtime/core/exec_aten:lib",
"//executorch/runtime/kernel:kernel_includes",
Expand All @@ -68,7 +68,7 @@ def define_common_targets():
name = "moments_utils",
srcs = [],
exported_headers = ["moments_utils.h"],
visibility = ["//executorch/kernels/optimized/...", "@EXECUTORCH_CLIENTS",],
visibility = ["PUBLIC"],
exported_deps = [
"//executorch/runtime/core/portable_type/c10/c10:aten_headers_for_executorch",
"//executorch/kernels/optimized:libvec",
Expand All @@ -80,11 +80,11 @@ def define_common_targets():
runtime.filegroup(
name = "optimized_source_files",
srcs = native.glob(["*.cpp"]),
visibility = ["//executorch/...", "@EXECUTORCH_CLIENTS"],
visibility = ["PUBLIC"],
)

runtime.filegroup(
name = "optimized_header_files",
srcs = native.glob(["*.h"]),
visibility = ["//executorch/...", "@EXECUTORCH_CLIENTS"],
visibility = ["PUBLIC"],
)
15 changes: 3 additions & 12 deletions kernels/optimized/lib_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,7 @@ def define_libs(is_fbcode=False):
"vec/**/*.h",
]),
header_namespace = "executorch/kernels/optimized",
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
exported_deps = [
"//executorch/runtime/core/portable_type/c10/c10:aten_headers_for_executorch",
],
Expand All @@ -157,10 +154,7 @@ def define_libs(is_fbcode=False):
"utils/**/*.h",
]),
header_namespace = "executorch/kernels/optimized",
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
exported_deps = [
# Needed to access the ET_INLINE macro
"//executorch/runtime/platform:compiler",
Expand Down Expand Up @@ -222,10 +216,7 @@ def define_libs(is_fbcode=False):
"DEFAULT": ["-Os"],
}),
header_namespace = "executorch/kernels/optimized",
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
preprocessor_flags = get_preprocessor_flags(),
fbobjc_exported_preprocessor_flags = [
"-DET_BUILD_WITH_BLAS",
Expand Down
19 changes: 4 additions & 15 deletions kernels/optimized/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,13 @@ def define_common_targets(is_fbcode=False):

runtime.export_file(
name = "optimized.yaml",
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
)

runtime.cxx_library(
name = "optimized_operators",
srcs = [],
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
exported_deps = [
"//executorch/kernels/optimized/cpu:cpu_optimized",
],
Expand All @@ -34,9 +28,7 @@ def define_common_targets(is_fbcode=False):
et_operator_library(
name = "optimized_oplist",
ops_schema_yaml_target = ":optimized.yaml",
visibility = [
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
)

# Used mainly for operator testing. In practice, a generated lib specific
Expand All @@ -50,8 +42,5 @@ def define_common_targets(is_fbcode=False):
],
functions_yaml_target = ":optimized.yaml",
define_static_targets = True,
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
)
2 changes: 1 addition & 1 deletion kernels/portable/cpu/pattern/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def define_common_targets():
"//executorch/kernels/portable/cpu/pattern:comparison_op",
"//executorch/kernels/portable/cpu/pattern:logical_op"
],
visibility = ["//executorch/...", "@EXECUTORCH_CLIENTS"],
visibility = ["PUBLIC"],
)

runtime.cxx_library(
Expand Down
22 changes: 5 additions & 17 deletions kernels/portable/cpu/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,7 @@ def define_common_targets():
],
srcs = [],
exported_headers = ["vec_ops.h"],
visibility = [
"//executorch/kernels/portable/...",
"//executorch/kernels/quantized/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
)

# Only for use by targets in this directory. Defines constants like M_PI
Expand All @@ -62,23 +58,15 @@ def define_common_targets():
exported_headers = [
"math_constants.h",
],
visibility = [
"//executorch/kernels/portable/...", "@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
)

# Only for use by targets in this directory.
runtime.cxx_library(
name = "scalar_utils",
srcs = [],
exported_headers = ["scalar_utils.h", "selective_build.h"],
visibility = [
"//executorch/kernels/fb/...",
"//executorch/kernels/optimized/cpu/...",
"//executorch/kernels/portable/cpu/...",
"//executorch/kernels/portable/test/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
deps = [
"//executorch/runtime/core/exec_aten/util:scalar_type_util",
],
Expand All @@ -91,11 +79,11 @@ def define_common_targets():
runtime.filegroup(
name = "portable_source_files",
srcs = native.glob(["*.cpp"]),
visibility = ["//executorch/...", "@EXECUTORCH_CLIENTS"],
visibility = ["PUBLIC"],
)

runtime.filegroup(
name = "portable_header_files",
srcs = native.glob(["*.h"]),
visibility = ["//executorch/...", "@EXECUTORCH_CLIENTS"],
visibility = ["PUBLIC"],
)
26 changes: 9 additions & 17 deletions kernels/portable/cpu/util/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def define_common_targets():
"//executorch/kernels/portable/cpu/util:vectorized_math",
"//executorch/kernels/portable/cpu/util:grid_sampler_2d_util",
],
visibility = ["//executorch/...", "@EXECUTORCH_CLIENTS"],
visibility = ["PUBLIC"],
)

runtime.cxx_library(
Expand Down Expand Up @@ -88,7 +88,7 @@ def define_common_targets():
"//executorch/runtime/core/exec_aten/util:tensor_shape_to_c_string",
"//executorch/runtime/core/exec_aten/util:tensor_util",
],
visibility = ["//executorch/kernels/portable/cpu/...", "//executorch/kernels/optimized/cpu/...", "@EXECUTORCH_CLIENTS"],
visibility = ["PUBLIC"],
)

runtime.cxx_library(
Expand All @@ -101,7 +101,7 @@ def define_common_targets():
deps = [
"//executorch/runtime/kernel:kernel_includes",
],
visibility = ["//executorch/kernels/portable/cpu/...", "//executorch/kernels/optimized/cpu/...", "@EXECUTORCH_CLIENTS"],
visibility = ["PUBLIC"],
)

runtime.cxx_library(
Expand All @@ -124,7 +124,7 @@ def define_common_targets():
deps = [
"//executorch/runtime/kernel:kernel_includes",
],
visibility = ["//executorch/kernels/portable/cpu/...", "//executorch/kernels/optimized/cpu/...", "@EXECUTORCH_CLIENTS"],
visibility = ["PUBLIC"],
)

runtime.cxx_library(
Expand All @@ -139,7 +139,7 @@ def define_common_targets():
"//executorch/runtime/core/exec_aten/util:tensor_shape_to_c_string",
"//executorch/runtime/kernel:kernel_includes",
],
visibility = ["//executorch/kernels/portable/cpu/...", "//executorch/kernels/optimized/cpu/...", "@EXECUTORCH_CLIENTS"],
visibility = ["PUBLIC"],
)

runtime.cxx_library(
Expand Down Expand Up @@ -262,7 +262,7 @@ def define_common_targets():
"//executorch/runtime/core/exec_aten/util:tensor_util",
":broadcast_util",
],
visibility = ["//executorch/kernels/portable/cpu/...", "//executorch/kernels/quantized/...", "@EXECUTORCH_CLIENTS"],
visibility = ["PUBLIC"],
)

runtime.cxx_library(
Expand Down Expand Up @@ -308,7 +308,7 @@ def define_common_targets():
exported_deps = [
"//executorch/runtime/kernel:kernel_includes",
],
visibility = ["//executorch/kernels/portable/cpu/...", "@EXECUTORCH_CLIENTS"],
visibility = ["PUBLIC"],
)

runtime.cxx_library(
Expand All @@ -328,10 +328,7 @@ def define_common_targets():
"//executorch/runtime/core/exec_aten:lib",
"//executorch/runtime/core/exec_aten/util:tensor_dimension_limit",
],
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
)

runtime.cxx_library(
Expand Down Expand Up @@ -369,12 +366,7 @@ def define_common_targets():
"//executorch/extension/threadpool:threadpool",
],
exported_preprocessor_flags = ["-DUSE_ATEN_LIB"] if aten_mode else [],
visibility = [
"//executorch/extension/llm/custom_ops/...",
"//executorch/kernels/portable/cpu/...",
"//executorch/kernels/quantized/...",
"@EXECUTORCH_CLIENTS",
],
visibility = ["PUBLIC"],
)

runtime.cxx_library(
Expand Down
Loading
Loading