Skip to content

build_variables.bzl: split PROGRAM_NO_PRIM_OPS_SRCS from EXECUTORCH_CORE_SRCS #8397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: gh/swolchok/240/head
Choose a base branch
from
Open
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
7 changes: 2 additions & 5 deletions runtime/executor/targets.bzl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@fbsource//xplat/executorch/build:build_variables.bzl", "PROGRAM_NO_PRIM_OPS_SRCS")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "get_aten_mode_options", "runtime")

def _program_preprocessor_flags():
Expand Down Expand Up @@ -58,11 +59,7 @@ def define_common_targets():

runtime.cxx_library(
name = "program_no_prim_ops" + aten_suffix,
srcs = [
"method.cpp",
"method_meta.cpp",
"program.cpp",
"tensor_parser_exec_aten.cpp",
srcs = PROGRAM_NO_PRIM_OPS_SRCS + [
"tensor_parser{}.cpp".format(aten_suffix if aten_mode else "_portable"),
],
headers = [
Expand Down
15 changes: 9 additions & 6 deletions shim_et/xplat/executorch/build/build_variables.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,21 @@ EXECUTORCH_SRCS = [
"kernels/prim_ops/register_prim_ops.cpp",
]

EXECUTORCH_CORE_SRCS = [
PROGRAM_NO_PRIM_OPS_SRCS = [
"method.cpp",
"method_meta.cpp",
"program.cpp",
"tensor_parser_exec_aten.cpp",
]

EXECUTORCH_CORE_SRCS = sorted([
"runtime/backend/interface.cpp",
"runtime/core/evalue.cpp",
"runtime/core/exec_aten/util/tensor_shape_to_c_string.cpp",
"runtime/core/exec_aten/util/tensor_util_portable.cpp",
"runtime/core/portable_type/tensor_impl.cpp",
"runtime/core/tag.cpp",
"runtime/core/tensor_layout.cpp",
"runtime/executor/method.cpp",
"runtime/executor/method_meta.cpp",
"runtime/executor/program.cpp",
"runtime/executor/tensor_parser_exec_aten.cpp",
"runtime/executor/tensor_parser_portable.cpp",
"runtime/kernel/operator_registry.cpp",
"runtime/platform/abort.cpp",
Expand All @@ -52,7 +55,7 @@ EXECUTORCH_CORE_SRCS = [
"runtime/platform/profiler.cpp",
"runtime/platform/runtime.cpp",
"schema/extended_header.cpp",
]
] + ["runtime/executor/" + x for x in PROGRAM_NO_PRIM_OPS_SRCS])

PORTABLE_KERNELS_SRCS = [
"kernels/portable/cpu/op__empty_dim_order.cpp",
Expand Down
Loading