Skip to content

Commit f4a21b8

Browse files
authored
migrate examples/models/llama/config (fbcode-only python_unittest)
Differential Revision: D109082042 Pull Request resolved: pytorch#21428
1 parent 8a19761 commit f4a21b8

3 files changed

Lines changed: 18 additions & 10 deletions

File tree

‎examples/models/llama/config/BUCK‎

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())

‎examples/models/llama/config/TARGETS‎

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

‎examples/models/llama/config/targets.bzl‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
22
load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest")
33

4-
def define_common_targets():
4+
def define_common_targets(is_fbcode = False):
5+
"""Defines targets that should be shared between fbcode and xplat.
6+
7+
Uses fbcode-only python_unittest macro; gate on is_fbcode to preserve
8+
pre-migration behavior (this dir was originally TARGETS-only).
9+
"""
10+
if not is_fbcode:
11+
return
12+
513
python_unittest(
614
name = "test_llm_config",
715
srcs = [

0 commit comments

Comments
 (0)