Skip to content

Commit 40f6d18

Browse files
authored
rename pure-boilerplate fbcode-only TARGETS to BUCK (pytorch#20406)
Differential Revision: D109082059 Pull Request resolved: pytorch#20406
1 parent ddc5e7d commit 40f6d18

16 files changed

Lines changed: 33 additions & 1 deletion

File tree

backends/aoti/slim/c10/core/targets.bzl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
2+
load("@fbsource//tools/build_defs:fbsource_utils.bzl", "is_fbcode")
23

34
def define_common_targets():
45
"""Define targets for SlimTensor c10 core module."""
56

7+
if not is_fbcode():
8+
return
9+
610
# Header-only library for DeviceType
711
runtime.cxx_library(
812
name = "device_type",

backends/aoti/slim/util/targets.bzl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
2+
load("@fbsource//tools/build_defs:fbsource_utils.bzl", "is_fbcode")
23

34
def define_common_targets():
45
"""Define targets for SlimTensor util module."""
56

7+
if not is_fbcode():
8+
return
9+
610
# Header-only library for SharedPtr
711
runtime.cxx_library(
812
name = "shared_ptr",

backends/aoti/slim/util/test/targets.bzl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
2+
load("@fbsource//tools/build_defs:fbsource_utils.bzl", "is_fbcode")
23

34
def define_common_targets():
45
"""Define test targets for SlimTensor util module."""
56

7+
if not is_fbcode():
8+
return
9+
610
runtime.cxx_test(
711
name = "test_size_util",
812
srcs = [

backends/aoti/targets.bzl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
2+
load("@fbsource//tools/build_defs:fbsource_utils.bzl", "is_fbcode")
23

34
def define_common_targets():
5+
if not is_fbcode():
6+
return
7+
48
runtime.python_library(
59
name = "aoti_partitioner",
610
srcs = [

backends/qualcomm/partition/targets.bzl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
2+
load("@fbsource//tools/build_defs:fbsource_utils.bzl", "is_fbcode")
23

34
def define_common_targets():
5+
if not is_fbcode():
6+
return
7+
48
"""Defines targets that should be shared between fbcode and xplat.
59
The directory containing this targets.bzl file should also contain both
610
TARGETS and BUCK files that call this function.
711
"""
8-
12+
913
runtime.python_library(
1014
name = "partition",
1115
srcs = glob([

0 commit comments

Comments
 (0)