Skip to content

Commit 830e753

Browse files
authored
build_variables.bzl: split PATTERN_SRCS from PORTABLE_KERNELS_SRCS (#13353)
Making the structure in this file mirror buck's worldview more closely when it makes sense. #8268 Differential Revision: [D80187448](https://our.internmc.facebook.com/intern/diff/D80187448)
1 parent 3779028 commit 830e753

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

kernels/portable/cpu/pattern/targets.bzl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
load("@fbsource//xplat/executorch/build:build_variables.bzl", "PATTERN_SRCS")
12
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
23

34
def define_common_targets():
@@ -49,11 +50,7 @@ def define_common_targets():
4950

5051
runtime.cxx_library(
5152
name = "pattern",
52-
srcs = [
53-
"unary_ufunc_realhbbf16_to_bool.cpp",
54-
"unary_ufunc_realhbbf16_to_floathbf16.cpp",
55-
"unary_ufunc_realhbf16.cpp",
56-
],
53+
srcs = PATTERN_SRCS,
5754
exported_headers = [
5855
"pattern.h",
5956
],

shim_et/xplat/executorch/build/build_variables.bzl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ EXECUTORCH_CORE_SRCS = sorted([
6161
"schema/extended_header.cpp",
6262
] + ["runtime/executor/" + x for x in PROGRAM_NO_PRIM_OPS_SRCS] + ["runtime/platform/" + x for x in PLATFORM_SRCS])
6363

64+
PATTERN_SRCS = [
65+
"unary_ufunc_realhbbf16_to_bool.cpp",
66+
"unary_ufunc_realhbbf16_to_floathbf16.cpp",
67+
"unary_ufunc_realhbf16.cpp",
68+
]
69+
6470
PORTABLE_KERNELS_SRCS = [
6571
"kernels/portable/cpu/op__clone_dim_order.cpp",
6672
"kernels/portable/cpu/op__empty_dim_order.cpp",
@@ -227,10 +233,7 @@ PORTABLE_KERNELS_SRCS = [
227233
"kernels/portable/cpu/op_view_copy.cpp",
228234
"kernels/portable/cpu/op_where.cpp",
229235
"kernels/portable/cpu/op_zeros.cpp",
230-
"kernels/portable/cpu/pattern/unary_ufunc_realhbbf16_to_bool.cpp",
231-
"kernels/portable/cpu/pattern/unary_ufunc_realhbbf16_to_floathbf16.cpp",
232-
"kernels/portable/cpu/pattern/unary_ufunc_realhbf16.cpp",
233-
]
236+
] + ["kernels/portable/cpu/pattern/" + x for x in PATTERN_SRCS]
234237

235238
KERNELS_UTIL_ALL_DEPS_SRCS = [
236239
"kernels/portable/cpu/util/activation_ops_util.cpp",

0 commit comments

Comments
 (0)