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
9 changes: 9 additions & 0 deletions backends/aoti/slim/factory/test/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())
3 changes: 0 additions & 3 deletions backends/aoti/slim/factory/test/TARGETS

This file was deleted.

11 changes: 9 additions & 2 deletions backends/aoti/slim/factory/test/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@ def get_backend_mode():
"""Get the supported backend mode of slimtensor."""
return ["cuda", "cpu"]

def define_common_targets():
"""Define test targets for SlimTensor factory module."""
def define_common_targets(is_fbcode = False):
"""Define test targets for SlimTensor factory module.

Uses fbcode-only kwargs (keep_gpu_sections, re_test_utils.remote_execution)
so we early-return outside fbcode to preserve pre-migration behavior
(this dir was originally TARGETS-only, never evaluated by xplat).
"""
if not is_fbcode:
return

# GPU empty test with CUDA support
for backend_mode in get_backend_mode():
Expand Down
9 changes: 9 additions & 0 deletions backends/aoti/tests/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())
59 changes: 0 additions & 59 deletions backends/aoti/tests/TARGETS

This file was deleted.

61 changes: 61 additions & 0 deletions backends/aoti/tests/targets.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest")
load("@fbcode_macros//build_defs/lib:re_test_utils.bzl", "re_test_utils")

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

cpp_unittest(
name = "test_resolve_blob_keys",
srcs = [
"test_resolve_blob_keys.cpp",
],
deps = [
"//executorch/backends/aoti:delegate_handle",
"//executorch/runtime/core:core",
"//executorch/runtime/core:evalue",
],
)

cpp_unittest(
name = "test_common_shims",
srcs = [
"test_common_shims.cpp",
],
headers = [
"utils.h",
],
deps = [
"//executorch/backends/aoti:common_shims",
"//executorch/extension/tensor:tensor",
"//executorch/runtime/core:core",
"//executorch/runtime/platform:platform",
"//executorch/runtime/core/exec_aten/testing_util:tensor_util",
"//executorch/runtime/core/exec_aten:lib",
"//executorch/extension/tensor:tensor",
],
Comment on lines +33 to +36
)

cpp_unittest(
name = "test_common_shims_slim",
srcs = [
"test_common_shims_slim.cpp",
],
deps = [
"//executorch/backends/aoti:common_shims_slim",
"//executorch/backends/aoti/slim/core:slimtensor",
"//executorch/backends/aoti/slim/factory:empty",
"//executorch/runtime/core:core",
"//executorch/runtime/platform:platform",
],
external_deps = [
("cuda", None, "cuda-lazy"),
],
preprocessor_flags = [
"-DCUDA_AVAILABLE=1",
],
keep_gpu_sections = True,
remote_execution = re_test_utils.remote_execution(
platform = "gpu-remote-execution",
),
)
9 changes: 9 additions & 0 deletions backends/cuda/runtime/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())
183 changes: 0 additions & 183 deletions backends/cuda/runtime/TARGETS

This file was deleted.

Loading
Loading