Skip to content

Commit 0f79fbd

Browse files
authored
migrate backends/aoti/slim/factory/test (fbcode-only GPU tests)
Differential Revision: D109082041 Pull Request resolved: pytorch#21426
1 parent 24a1865 commit 0f79fbd

3 files changed

Lines changed: 18 additions & 5 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Any targets that should be shared between fbcode and xplat must be defined in
2+
# targets.bzl.
3+
4+
load("@fbsource//tools/build_defs:fbsource_utils.bzl", "is_fbcode")
5+
load(":targets.bzl", "define_common_targets")
6+
7+
oncall("executorch")
8+
9+
define_common_targets(is_fbcode = is_fbcode())

‎backends/aoti/slim/factory/test/TARGETS‎

Lines changed: 0 additions & 3 deletions
This file was deleted.

‎backends/aoti/slim/factory/test/targets.bzl‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,15 @@ def get_backend_mode():
55
"""Get the supported backend mode of slimtensor."""
66
return ["cuda", "cpu"]
77

8-
def define_common_targets():
9-
"""Define test targets for SlimTensor factory module."""
8+
def define_common_targets(is_fbcode = False):
9+
"""Define test targets for SlimTensor factory module.
10+
11+
Uses fbcode-only kwargs (keep_gpu_sections, re_test_utils.remote_execution)
12+
so we early-return outside fbcode to preserve pre-migration behavior
13+
(this dir was originally TARGETS-only, never evaluated by xplat).
14+
"""
15+
if not is_fbcode:
16+
return
1017

1118
# GPU empty test with CUDA support
1219
for backend_mode in get_backend_mode():

0 commit comments

Comments
 (0)