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
21 changes: 3 additions & 18 deletions backends/arm/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ runtime.python_library(
"ethosu/partitioner.py"
],
deps = [
":arm_partitioner",
":arm_vela",
"//executorch/backends/arm/tosa:arm_partitioner",
]
)
runtime.python_library(
Expand All @@ -25,7 +26,7 @@ runtime.python_library(
"vgf/partitioner.py"
],
deps = [
":arm_partitioner",
"//executorch/backends/arm/tosa:arm_partitioner",
]
)
runtime.python_library(
Expand All @@ -50,21 +51,6 @@ runtime.python_library(
"//executorch/exir:lib",
],
)
runtime.python_library(
name = "arm_partitioner",
srcs = [
"tosa/backend.py",
"tosa/partitioner.py",
],
deps = [
":arm_backend",
":constants",
"//executorch/backends/arm/debug:schema",
"//executorch/backends/arm/operator_support:operator_support",
"//executorch/backends/arm/_passes:passes",
"//executorch/exir:lib",
],
)
runtime.python_library(
name = "arm_backend",
srcs = [
Expand All @@ -77,7 +63,6 @@ runtime.python_library(
"fbsource//third-party/tosa_tools/v1.00/serialization_lib/python/serializer:serializer",
"fbsource//third-party/tosa_tools/v0.80/serialization_lib/python/tosa:tosa",
"fbsource//third-party/tosa_tools/v1.00/serialization_lib/python/tosa:tosa",
":arm_vela",
":process_node",
"//executorch/backends/arm/operators:lib",
"//executorch/backends/arm/operators:node_visitor",
Expand Down
17 changes: 17 additions & 0 deletions backends/arm/tosa/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,20 @@ runtime.python_library(
":specification",
],
)

runtime.python_library(
name = "arm_partitioner",
srcs = [
"backend.py",
"partitioner.py",
],
deps = [
"//executorch/backends/arm:arm_backend",
"//executorch/backends/arm:constants",
"//executorch/backends/arm:process_node",
"//executorch/backends/arm/debug:schema",
"//executorch/backends/arm/operator_support:operator_support",
"//executorch/backends/arm/_passes:passes",
"//executorch/exir:lib",
],
)
6 changes: 3 additions & 3 deletions codegen/tools/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ def define_common_targets(is_fbcode = False):
],
deps = [
"//executorch/codegen:gen_lib",
] + select({
] + ([] if runtime.is_oss else select({
"DEFAULT": [],
"ovr_config//os:linux": [] if runtime.is_oss else ["//executorch/codegen/tools:selective_build"], # TODO(larryliu0820) :selective_build doesn't build in OSS yet
}),
"ovr_config//os:linux": ["//executorch/codegen/tools:selective_build"], # TODO(larryliu0820) :selective_build doesn't build in OSS yet
})),
)

runtime.python_binary(
Expand Down
12 changes: 12 additions & 0 deletions shim_et/xplat/executorch/build/runtime_wrapper.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ def _cxx_test(*args, **kwargs):

def _cxx_python_extension(*args, **kwargs):
_patch_kwargs_common(kwargs)
_remove_caffe2_deps(kwargs)
kwargs["srcs"] = _patch_executorch_references(kwargs["srcs"])
if "types" in kwargs:
kwargs["types"] = _patch_executorch_references(kwargs["types"])
Expand Down Expand Up @@ -324,8 +325,19 @@ def _genrule(*args, **kwargs):
kwargs["name"] += "_static"
env.genrule(*args, **kwargs)

def _remove_caffe2_deps(kwargs):
if not env.is_oss:
return
# We don't have Buckified PyTorch in OSS. At least let buck query work.
MISSING_BUCK_DIRS = ("//caffe2", "//pytorch", "fbsource//third-party")
for dep_type in ('deps', 'exported_deps'):
if dep_type not in kwargs:
continue
kwargs[dep_type] = [x for x in kwargs[dep_type] if not any([x.startswith(y) for y in MISSING_BUCK_DIRS])]

def _python_library(*args, **kwargs):
_patch_kwargs_common(kwargs)
_remove_caffe2_deps(kwargs)
env.python_library(*args, **kwargs)

def _python_binary(*args, **kwargs):
Expand Down
Loading