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
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest")

python_unittest(
fbcode_target(_kind = python_unittest,
name = "test_delegate_aten_mode",
srcs = [
"test_delegate_aten_mode.py",
Expand Down
75 changes: 73 additions & 2 deletions exir/backend/test/demos/rpc/BUCK
Original file line number Diff line number Diff line change
@@ -1,8 +1,79 @@
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/test/demos/rpc/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!!

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

fbcode_target(_kind = define_common_targets,)

fbcode_target(_kind = runtime.python_library,
name = "executor_backend_preprocess",
srcs = [
"executor_backend_preprocess.py",
],
visibility = [
"//executorch/exir/backend/test/...",
"//executorch/test/...",
],
deps = [
"//caffe2:torch",
"//executorch/exir:lib",
"//executorch/exir/backend:backend_details",
"//executorch/exir/backend:compile_spec_schema",
"//nodeapi/py:base",
],
)

fbcode_target(_kind = runtime.python_library,
name = "executor_backend_partitioner",
srcs = [
"executor_backend_partitioner.py",
],
visibility = [
"//executorch/exir/backend/test/...",
"//executorch/exir/emit/test/...",
],
deps = [
":executor_backend_preprocess",
"//caffe2:torch",
"//executorch/exir:graph_module",
"//executorch/exir:lib",
"//executorch/exir/backend:partitioner",
"//executorch/exir/backend/canonical_partitioners:canonical_partitioner_lib",
"//executorch/exir/backend/test:backend_with_compiler_demo",
],
)

fbcode_target(_kind = python_unittest,
name = "test_rpc",
srcs = [
"test_rpc.py",
],
preload_deps = [
"//executorch/configurations:optimized_native_cpu_ops",
"//executorch/kernels/quantized:custom_ops_generated_lib",
# the executor backend is prebuilt and linked when building the unit test binary. When it's linked, it'll register the backend.
# It can also be loaded in PyThon runtime via torch.ops.load_library("//executorch/exir/backend/test/demos/rpc:executor_backend")
# However, it's a better practice to build/link everything at earlier stage, instead of during runtime
"//executorch/exir/backend/test/demos/rpc:executor_backend_register",
],
deps = [
":executor_backend_partitioner",
":executor_backend_preprocess",
"//caffe2:torch",
"//executorch/exir:lib",
"//executorch/exir/backend:backend_api",
"//executorch/exir/backend/test:op_partitioner_demo",
"//executorch/extension/pybindings:portable_lib", # @manual
],
)
67 changes: 0 additions & 67 deletions exir/backend/test/demos/rpc/TARGETS

This file was deleted.

50 changes: 49 additions & 1 deletion exir/capture/BUCK
Original file line number Diff line number Diff line change
@@ -1,4 +1,52 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
oncall("executorch")
# add this empty BUCK file to unblock landing. Without this, we get land error:
# "No build file at xplat/executorch/exir/BUCK when resolving target fbsource//xplat/executorch/exir:."

oncall("executorch")

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

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


fbcode_target(_kind = runtime.python_library,
name = "lib",
srcs = [
"__init__.py",
],
deps = [
":capture",
":config",
],
)

fbcode_target(_kind = runtime.python_library,
name = "capture",
srcs = [
"_capture.py",
],
deps = [
":config",
"//caffe2:torch",
"//executorch/exir:error",
"//executorch/exir:tracer",
"//executorch/exir/program:lib",
"//executorch/exir/program:program",
"//executorch/exir/verification:verifier",
],
)

fbcode_target(_kind = runtime.python_library,
name = "config",
srcs = [
"_config.py",
],
deps = [
"//caffe2:torch",
"//executorch/exir:dynamic_shape",
"//executorch/exir:pass_manager",
"//executorch/exir:tracer",
"//executorch/exir/passes:lib",
"//executorch/exir/passes:sym_shape_eval_pass",
],
)
45 changes: 0 additions & 45 deletions exir/capture/TARGETS

This file was deleted.

3 changes: 2 additions & 1 deletion exir/dialects/TARGETS → exir/dialects/BUCK
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 = "lib",
srcs = [
"_ops.py",
Expand Down
19 changes: 18 additions & 1 deletion exir/dialects/backend/BUCK
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
oncall("executorch")
# add this empty BUCK file to unblock landing. Without this, we get land error:
# "No build file at xplat/executorch/exir/dialects/backend/BUCK when resolving target fbsource//xplat/executorch/exir/dialects/backend:."

oncall("executorch")

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

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


fbcode_target(_kind = runtime.python_library,
name = "lib",
srcs = [
"_ops.py",
],
deps = [
"//caffe2:torch",
"//executorch/exir/dialects/edge:lib",
],
)
14 changes: 0 additions & 14 deletions exir/dialects/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("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest")

oncall("executorch")

python_unittest(
fbcode_target(_kind = python_unittest,
name = "test_backend_ops",
srcs = [
"test_backend_ops.py",
Expand Down
34 changes: 33 additions & 1 deletion exir/dialects/edge/BUCK
Original file line number Diff line number Diff line change
@@ -1,4 +1,36 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
oncall("executorch")
# add this empty BUCK file to unblock landing. Without this, we get land error:
# "No build file at xplat/executorch/exir/BUCK when resolving target fbsource//xplat/executorch/exir/dialects/edge:."

oncall("executorch")

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

load("@fbcode_macros//build_defs:export_files.bzl", "export_file")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")


fbcode_target(_kind = runtime.python_library,
name = "lib",
srcs = [
"_ops.py",
],
resources = {
":edge_yaml": "edge.yaml",
},
deps = [
"fbsource//third-party/pypi/ruamel-yaml:ruamel-yaml",
"fbsource//third-party/pypi/setuptools:setuptools",
"//caffe2:torch",
"//caffe2/torchgen:torchgen",
"//executorch/exir/dialects/edge/dtype:lib",
"//executorch/exir/dialects/edge/op:lib",
"//executorch/exir/dialects/edge/spec:lib",
],
)

fbcode_target(_kind = export_file,
name = "edge_yaml",
src = "edge.yaml",
visibility = ["//executorch/..."],
)
29 changes: 0 additions & 29 deletions exir/dialects/edge/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("ai_infra_mobile_platform")

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