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

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

oncall("executorch")

define_common_targets()
define_common_targets(is_fbcode = is_fbcode())
30 changes: 0 additions & 30 deletions backends/cortex_m/test/TARGETS

This file was deleted.

24 changes: 18 additions & 6 deletions backends/cortex_m/test/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# 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:python_unittest.bzl", "python_unittest")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load("@fbsource//tools/build_defs:platform_defs.bzl", "CXX")

Expand All @@ -29,13 +30,24 @@ def define_operator_test_target(op):
]
)

def define_common_targets():
"""Defines targets that should be shared between fbcode and xplat.

The directory containing this targets.bzl file should also contain both
TARGETS and BUCK files that call this function.
"""
def define_common_targets(is_fbcode = False):
"""Defines targets that should be shared between fbcode and xplat."""
for op in OPERATORS:
define_operator_test_target(op)

if is_fbcode:
python_unittest(
name = "test_replace_quant_nodes",
srcs = [
"test_helpers_passes_utils.py",
"test_replace_quant_nodes.py",
],
deps = [
"//pytorch/ao:torchao", # @manual
"//caffe2:torch",
"//executorch/backends/cortex_m/passes:replace_quant_nodes_pass",
"//executorch/backends/cortex_m/ops:ops",
],
)


5 changes: 3 additions & 2 deletions examples/qualcomm/oss_scripts/llama/BUCK
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# 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.

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

oncall("executorch")

define_common_targets()
define_common_targets(is_fbcode = is_fbcode())
280 changes: 0 additions & 280 deletions examples/qualcomm/oss_scripts/llama/TARGETS

This file was deleted.

Loading
Loading