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
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_test(
fbcode_target(_kind = runtime.python_test,
name = "test",
srcs = ["test.py"],
visibility = ["//executorch/extension/training/pybindings/test/..."],
Expand Down
15 changes: 13 additions & 2 deletions extension/training/test/BUCK
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
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/extension/training/test/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(":targets.bzl", "define_common_targets")


fbcode_target(_kind = define_common_targets,is_fbcode = True)
8 changes: 0 additions & 8 deletions extension/training/test/TARGETS

This file was deleted.

55 changes: 51 additions & 4 deletions extension/wasm/test/BUCK
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
load("@fbsource//tools/build_defs:fb_xplat_cxx_binary.bzl", "fb_xplat_cxx_binary")

oncall("executorch")

runtime.genrule(
non_fbcode_target(_kind = runtime.genrule,
name = "unittests_full",
srcs = [
"unittests.js",
Expand All @@ -13,7 +14,7 @@ runtime.genrule(
cmd = "cat $SRCS > $OUT",
)

runtime.genrule(
non_fbcode_target(_kind = runtime.genrule,
name = "unittests_full_etdump",
srcs = [
"unittests.js",
Expand All @@ -23,7 +24,7 @@ runtime.genrule(
cmd = "cat $SRCS > $OUT",
)

fb_xplat_cxx_binary(
non_fbcode_target(_kind = fb_xplat_cxx_binary,
name = "wasm.test.js",
linker_flags = [
"-lembind",
Expand All @@ -45,7 +46,7 @@ fb_xplat_cxx_binary(
],
)

fb_xplat_cxx_binary(
non_fbcode_target(_kind = fb_xplat_cxx_binary,
name = "wasm_etdump.test.js",
linker_flags = [
"-lembind",
Expand All @@ -66,3 +67,49 @@ fb_xplat_cxx_binary(
":unittests_full_etdump",
],
)

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

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


export_genrule_cmd = [
"$(exe //executorch/examples/portable/scripts:export)",
"--model_name={model_name}",
"--output_dir=$OUT",
]

fbcode_target(_kind = runtime.python_binary,
name = "test_model",
srcs = [
"test_model.py",
],
main_module = "executorch.extension.wasm.test.test_model",
deps = [
"//executorch/extension/export_util:export_util",
],
)

test_pte_genrule_cmd = [
"$(exe :test_model)",
"$OUT/test.pte",
]

models_genrule_cmd = [
"mkdir -p $OUT &&",
" ".join(export_genrule_cmd).format(model_name="add_mul"),
"&&",
" ".join(export_genrule_cmd).format(model_name="add"),
"&&",
" ".join(test_pte_genrule_cmd),
]

fbcode_target(_kind = runtime.genrule,
name = "models",
outs = {
"add.pte": ["add.pte"],
"add_mul.pte": ["add_mul.pte"],
"test.pte": ["test.pte"],
},
cmd = " ".join(models_genrule_cmd),
)
44 changes: 0 additions & 44 deletions extension/wasm/test/TARGETS

This file was deleted.

15 changes: 13 additions & 2 deletions kernels/aten/BUCK
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
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/kernels/aten/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(":targets.bzl", "define_common_targets")


fbcode_target(_kind = define_common_targets,)
8 changes: 0 additions & 8 deletions kernels/aten/TARGETS

This file was deleted.

Loading