Skip to content
Closed
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
104 changes: 102 additions & 2 deletions exir/backend/BUCK
Original file line number Diff line number Diff line change
@@ -1,8 +1,108 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
oncall("executorch")
# Any targets that should be shared between fbcode and xplat must be defined in
# targets.bzl. This file can contain xplat-only targets.

load(":targets.bzl", "define_common_targets")

oncall("executorch")

define_common_targets()
non_fbcode_target(_kind = define_common_targets,)

# !!!! fbcode/executorch/exir/backend/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!!

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

load("@fbsource//xplat/executorch/backends:backends.bzl", "get_all_cpu_aot_and_backend_targets")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load(":targets.bzl", "define_common_targets")


fbcode_target(_kind = define_common_targets,)

# Use runtime.python_library instead of the one defined in python_library.bzl,
# so we can have access to EXECUTORCH_CLIENTS list.
fbcode_target(_kind = runtime.python_library,
name = "backend_api",
srcs = [
"backend_api.py",
],
visibility = ["PUBLIC"],
deps = [
":backend_details",
":compile_spec_schema",
"//caffe2:torch",
"//executorch/exir/backend:utils",
"//executorch/exir/backend/canonical_partitioners:duplicate_constant_node_pass",
],
)

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

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

fbcode_target(_kind = runtime.python_library,
name = "partitioner",
srcs = [
"partitioner.py",
],
visibility = ["PUBLIC"],
deps = [
":compile_spec_schema",
"//caffe2:torch",
],
)

fbcode_target(_kind = runtime.python_library,
name = "backend_details",
srcs = [
"backend_details.py",
],
visibility = ["PUBLIC"],
deps = [
":compile_spec_schema",
":partitioner",
"//caffe2:torch",
"//executorch/exir:delegate",
"//executorch/exir:graph_module",
],
)

# backend_lib includes all ahead of time apis and supported backends,
# it's supposed to be only used on server side and not for production on device.
fbcode_target(_kind = runtime.python_library,
name = "backend_lib",
visibility = ["PUBLIC"],
deps = [
":backend_api",
":backend_details",
":utils",
"//executorch/exir/backend/canonical_partitioners:canonical_partitioner_lib",
] + get_all_cpu_aot_and_backend_targets(),
)

fbcode_target(_kind = runtime.python_library,
name = "utils",
srcs = [
"utils.py",
],
visibility = ["PUBLIC"],
deps = [
"fbsource//third-party/pypi/pandas:pandas",
"//caffe2:torch",
"//executorch/exir:lowered_backend_module",
"//executorch/exir/backend/canonical_partitioners:duplicate_constant_node_pass",
],
)
97 changes: 0 additions & 97 deletions exir/backend/TARGETS

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")

oncall("executorch")

runtime.python_library(
fbcode_target(_kind = runtime.python_library,
name = "canonical_partitioner_lib",
srcs = [
"duplicate_dequant_node_pass.py",
Expand All @@ -17,7 +18,7 @@ runtime.python_library(
],
)

runtime.python_library(
fbcode_target(_kind = runtime.python_library,
name = "duplicate_constant_node_pass",
srcs = [
"duplicate_constant_node_pass.py",
Expand All @@ -29,7 +30,7 @@ runtime.python_library(
],
)

runtime.python_library(
fbcode_target(_kind = runtime.python_library,
name = "config_partitioner_lib",
srcs = [
"config_partitioner.py",
Expand All @@ -41,7 +42,7 @@ runtime.python_library(
],
)

runtime.python_library(
fbcode_target(_kind = runtime.python_library,
name = "group_partitioner_lib",
srcs = [
"group_partitioner.py",
Expand Down
Loading
Loading