Skip to content
Open
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
98 changes: 94 additions & 4 deletions backends/apple/mps/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,105 @@
# Provided subject to the LICENSE file in the top level directory.
#

# Any targets that should be shared between fbcode and xplat must be defined in
# targets.bzl. This file can contain xplat-only targets.

load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target")
load("@fbsource//tools/build_defs:default_platform_defs.bzl", "APPLE")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load(":targets.bzl", "define_common_targets")
load("@fbsource//tools/build_defs:fbsource_utils.bzl", "is_xplat")

oncall("executorch")

define_common_targets(
is_xplat = True,
is_xplat = is_xplat(),
platforms = [APPLE],
)

fbcode_target(
_kind = runtime.python_library,
name = "backend",
srcs = [
"__init__.py",
"mps_preprocess.py",
],
visibility = ["PUBLIC"],
deps = [
":operators",
":serialization",
":utils",
"//caffe2:torch",
"//executorch/exir/backend:backend_details",
"//executorch/exir/backend:compile_spec_schema",
],
)

fbcode_target(
_kind = runtime.python_library,
name = "operators",
srcs = glob([
"operators/*.py",
]),
deps = [
":serialization",
":utils",
"//executorch/backends/transforms:lib",
],
)

fbcode_target(
_kind = runtime.python_library,
name = "partitioner",
srcs = glob([
"partition/*.py",
]),
visibility = ["PUBLIC"],
deps = [
":backend",
"//caffe2:torch",
"//executorch/exir/backend:compile_spec_schema",
"//executorch/exir/backend:partitioner",
"//executorch/exir/backend/canonical_partitioners:canonical_partitioner_lib",
],
)

fbcode_target(
_kind = runtime.python_library,
name = "serialization",
srcs = glob([
"serialization/*.py",
]),
resources = [
"serialization/schema.fbs",
],
)

fbcode_target(
_kind = runtime.python_library,
name = "utils",
srcs = glob([
"utils/*.py",
]),
deps = [
":serialization",
"//caffe2:torch",
"//executorch/exir:lib",
],
)

fbcode_target(
_kind = runtime.python_test,
name = "test",
srcs = glob([
"test/*.py",
]),
deps = [
":backend",
":partitioner",
"//caffe2:torch",
"//executorch/examples/models:models",
"//executorch/exir/tests:models",
"//executorch/extension/export_util:export_util",
"//executorch/devtools:lib",
"//executorch/devtools/bundled_program/serialize:lib",
"fbsource//third-party/pypi/pytest:pytest",
],
)
98 changes: 0 additions & 98 deletions backends/apple/mps/TARGETS

This file was deleted.

29 changes: 29 additions & 0 deletions backends/xnnpack/serialization/BUCK
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load(":targets.bzl", "define_common_targets")

oncall("executorch")

define_common_targets()

fbcode_target(
_kind = runtime.python_library,
name = "xnnpack_schema",
srcs = [
"xnnpack_graph_schema.py",
],
visibility = ["PUBLIC"],
)

fbcode_target(
_kind = runtime.python_library,
name = "xnnpack_serializer",
srcs = [
"xnnpack_graph_serialize.py",
],
resources = [
"schema.fbs",
],
visibility = ["PUBLIC"],
deps = [
":xnnpack_schema",
"//executorch/exir/_serialize:lib",
],
)
29 changes: 0 additions & 29 deletions backends/xnnpack/serialization/TARGETS

This file was deleted.

43 changes: 43 additions & 0 deletions devtools/bundled_program/BUCK
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load(":targets.bzl", "define_common_targets")

oncall("executorch")

define_common_targets()

fbcode_target(
_kind = runtime.python_library,
name = "core",
srcs = [
"core.py",
],
visibility = ["PUBLIC"],
deps = [
":config",
":version",
"//caffe2:torch",
"//executorch/devtools/bundled_program/schema:bundled_program_schema_py",
"//executorch/exir:schema",
"//executorch/exir:tensor",
],
)

fbcode_target(
_kind = runtime.python_library,
name = "config",
srcs = [
"config.py",
],
visibility = ["PUBLIC"],
deps = [
"fbsource//third-party/pypi/typing-extensions:typing-extensions",
"//caffe2:torch",
],
)

fbcode_target(
_kind = runtime.python_library,
name = "version",
srcs = [
"version.py",
],
visibility = [
"//executorch/devtools/...",
],
)
44 changes: 0 additions & 44 deletions devtools/bundled_program/TARGETS

This file was deleted.

20 changes: 19 additions & 1 deletion devtools/bundled_program/schema/BUCK
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
# Any targets that should be shared between fbcode and xplat must be defined in
# targets.bzl. This file can contain xplat-only targets.
# targets.bzl. This file can contain fbcode-only targets.

load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load(":targets.bzl", "define_common_targets")

oncall("executorch")

define_common_targets()

fbcode_target(
_kind = runtime.python_library,
name = "bundled_program_schema_py",
srcs = [
"__init__.py",
"bundled_program_schema.py",
],
visibility = [
"//executorch/devtools/bundled_program/...",
"//executorch/devtools/etrecord/...",
],
deps = [
"//executorch/exir:scalar_type",
],
)
Loading
Loading