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
10 changes: 7 additions & 3 deletions backends/cortex_m/TARGETS → backends/cortex_m/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target")
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")

oncall("executorch")

python_library(
fbcode_target(
_kind = python_library,
name = "quantizer_reporter",
srcs = [
"quantizer_reporter.py",
Expand All @@ -20,7 +22,8 @@ python_library(
],
)

python_library(
fbcode_target(
_kind = python_library,
name = "cmsis_nn",
srcs = [
"library/__init__.py",
Expand All @@ -31,7 +34,8 @@ python_library(
],
)

python_library(
fbcode_target(
_kind = python_library,
name = "target_config",
srcs = [
"target_config.py",
Expand Down
9 changes: 9 additions & 0 deletions backends/cortex_m/quantizer/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Any targets that should be shared between fbcode and xplat must be defined in
# targets.bzl.

load("@fbsource//tools/build_defs:fbsource_utils.bzl", "is_fbcode")
load(":targets.bzl", "define_common_targets")

oncall("executorch")

define_common_targets(is_fbcode = is_fbcode())
49 changes: 0 additions & 49 deletions backends/cortex_m/quantizer/TARGETS

This file was deleted.

53 changes: 53 additions & 0 deletions backends/cortex_m/quantizer/targets.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")

def define_common_targets(is_fbcode = False):
if not is_fbcode:
return

# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.



python_library(
name = "quantizer",
srcs = [
"__init__.py",
"node_finders.py",
"pattern_checkers.py",
"pattern_matcher.py",
"quantization_configs.py",
"quantizer.py",
"quantizer_support.py",
],
deps = [
"//caffe2:torch",
"//executorch/backends/arm:common",
"//executorch/backends/arm:constants",
"//executorch/backends/arm/quantizer:arm_quantizer_utils",
"//executorch/backends/arm/quantizer:quantization_annotator",
"//executorch/backends/arm/quantizer:quantization_config",
"//executorch/backends/cortex_m:quantizer_reporter",
"//executorch/backends/cortex_m/passes:cortex_passes",
"//pytorch/ao:torchao",
"fbsource//third-party/pypi/tabulate:tabulate",
],
)


python_library(
name = "quantization_configs",
srcs = [
"quantization_configs.py",
],
deps = [
"//caffe2:torch",
"//executorch/backends/arm/quantizer:arm_quantizer_utils",
"//executorch/backends/arm/quantizer:quantization_config",
"//executorch/backends/cortex_m:quantizer_reporter",
"//pytorch/ao:torchao",
],
)
35 changes: 35 additions & 0 deletions backends/cortex_m/targets.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")

def define_common_targets(is_fbcode = False):
if not is_fbcode:
return

# Copyright 2026 Arm Limited and/or its affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.



python_library(
name = "quantizer_reporter",
srcs = [
"quantizer_reporter.py",
],
deps = [
"//caffe2:torch",
"//pytorch/ao:torchao",
"fbsource//third-party/pypi/tabulate:tabulate",
],
)

python_library(
name = "target_config",
srcs = [
"target_config.py",
],
deps = [
"fbsource//third-party/cmsis-nn:cmsis_nn_py",
],
)
9 changes: 9 additions & 0 deletions backends/example/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Any targets that should be shared between fbcode and xplat must be defined in
# targets.bzl.

load("@fbsource//tools/build_defs:fbsource_utils.bzl", "is_fbcode")
load(":targets.bzl", "define_common_targets")

oncall("executorch")

define_common_targets(is_fbcode = is_fbcode())
60 changes: 0 additions & 60 deletions backends/example/TARGETS

This file was deleted.

62 changes: 62 additions & 0 deletions backends/example/targets.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest")

def define_common_targets(is_fbcode = False):
if not is_fbcode:
return

runtime.python_library(
name = "example_quantizer",
srcs = [
"example_quantizer.py",
],
deps = [
"//caffe2:torch",
"//executorch/backends/example/example_operators:example_operators_lib",
"//executorch/backends/xnnpack/quantizer:xnnpack_quantizer",
],
)

runtime.python_library(
name = "example_backend",
srcs = [
"example_backend.py",
],
deps = [
"//executorch/backends/example/example_backend_delegate_passes:lib",
"//executorch/exir/backend:backend_details",
"//executorch/exir/backend:compile_spec_schema",
],
)

runtime.python_library(
name = "example_partitioner",
srcs = [
"example_partitioner.py",
],
deps = [
":example_backend",
"//caffe2:torch",
"//executorch/backends/example/example_operators:example_operators_lib",
"//executorch/exir:graph_module",
"//executorch/exir/backend:partitioner",
"//executorch/exir/backend/canonical_partitioners:canonical_partitioner_lib",
"//executorch/exir/dialects:lib",
],
)

python_unittest(
name = "test_example_delegate",
srcs = [
"test_example_delegate.py",
],
deps = [
":example_partitioner",
":example_quantizer",
"//caffe2:torch",
"//executorch/exir:delegate",
"//executorch/exir:lib",
"//executorch/exir/backend/canonical_partitioners:canonical_partitioner_lib",
"//pytorch/vision:torchvision",
],
)
9 changes: 9 additions & 0 deletions backends/vulkan/_passes/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Any targets that should be shared between fbcode and xplat must be defined in
# targets.bzl.

load("@fbsource//tools/build_defs:fbsource_utils.bzl", "is_fbcode")
load(":targets.bzl", "define_common_targets")

oncall("executorch")

define_common_targets(is_fbcode = is_fbcode())
Loading
Loading